Initial Commit - Copy from Altus Metrum AltOS
This commit is contained in:
3
ao-tools/ao-flash/Makefile.am
Normal file
3
ao-tools/ao-flash/Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
||||
bin_SCRIPTS=ao-flash-stm ao-flash-lpc ao-flash-stm32f0x ao-reset-lpc ao-flash-samd21 ao-flash-stm32f1
|
||||
|
||||
man_MANS = ao-flash-stm.1 ao-flash-lpc.1 ao-flash-stm32f0x.1 ao-reset-lpc.1 ao-flash-samd21.1 ao-flash-stm32f1.1
|
17
ao-tools/ao-flash/ao-flash-lpc
Executable file
17
ao-tools/ao-flash/ao-flash-lpc
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
case "$#" in
|
||||
0)
|
||||
echo "usage: $0 <filename> ..."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
cmds=/tmp/flash$$
|
||||
trap "rm $cmds" 0 1 15
|
||||
file="$1"
|
||||
echo "program $file reset" > $cmds
|
||||
openocd \
|
||||
-f interface/stlink-v2.cfg \
|
||||
-f target/lpc11xx.cfg \
|
||||
-c 'adapter speed 1000' \
|
||||
-f $cmds \
|
||||
-c shutdown
|
36
ao-tools/ao-flash/ao-flash-lpc.1
Normal file
36
ao-tools/ao-flash/ao-flash-lpc.1
Normal file
@@ -0,0 +1,36 @@
|
||||
.\"
|
||||
.\" Copyright © 2013 Keith Packard <keithp@keithp.com>
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful, but
|
||||
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
.\" General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License along
|
||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
.\"
|
||||
.\"
|
||||
.TH AO-FLASH-LPC 1 "ao-flash-lpc" ""
|
||||
.SH NAME
|
||||
ao-flash-lpc \- flash a program to an LPC11U14-based AltOS device using openocd
|
||||
.SH SYNOPSIS
|
||||
.B "ao-flash-lpc"
|
||||
\fIfile.elf\fP
|
||||
.SH DESCRIPTION
|
||||
.I ao-flash-lpc
|
||||
loads the specified .elf file into the target device flash memory.
|
||||
.SH USAGE
|
||||
.I ao-flash-lpc
|
||||
is a simple script that passes the correct arguments to openocd to
|
||||
load a file into the target device via a connected STlink
|
||||
debugging dongle.
|
||||
.SH "SEE ALSO"
|
||||
openocd(1)
|
||||
.SH AUTHOR
|
||||
Keith Packard
|
19
ao-tools/ao-flash/ao-flash-samd21
Executable file
19
ao-tools/ao-flash/ao-flash-samd21
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
case "$#" in
|
||||
1)
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 <filename> ..."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
openocd -f interface/stlink.cfg \
|
||||
-c 'transport select hla_swd' \
|
||||
-c 'set CHIPNAME at91samd21g18' \
|
||||
-c 'set CPUTAPID 0x0bc11477' \
|
||||
-f target/at91samdXX.cfg \
|
||||
-c init \
|
||||
-c 'reset halt' \
|
||||
-c 'at91samd bootloader 0' \
|
||||
-c "program $1 verify reset" \
|
||||
-c "shutdown"
|
36
ao-tools/ao-flash/ao-flash-samd21.1
Normal file
36
ao-tools/ao-flash/ao-flash-samd21.1
Normal file
@@ -0,0 +1,36 @@
|
||||
.\"
|
||||
.\" Copyright © 2022 Keith Packard <keithp@keithp.com>
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful, but
|
||||
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
.\" General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License along
|
||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
.\"
|
||||
.\"
|
||||
.TH AO-FLASH-LPC 1 "ao-flash-samd21" ""
|
||||
.SH NAME
|
||||
ao-flash-samd21 \- flash a program to an SAMD21-based AltOS device using openocd
|
||||
.SH SYNOPSIS
|
||||
.B "ao-flash-samd21"
|
||||
\fIfile.elf\fP
|
||||
.SH DESCRIPTION
|
||||
.I ao-flash-samd21
|
||||
loads the specified .elf file into the target device flash memory.
|
||||
.SH USAGE
|
||||
.I ao-flash-samd21
|
||||
is a simple script that passes the correct arguments to openocd to
|
||||
load a file into the target device via a connected STlink
|
||||
debugging dongle.
|
||||
.SH "SEE ALSO"
|
||||
openocd(1)
|
||||
.SH AUTHOR
|
||||
Keith Packard
|
16
ao-tools/ao-flash/ao-flash-stm
Executable file
16
ao-tools/ao-flash/ao-flash-stm
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
case "$#" in
|
||||
0)
|
||||
echo "usage: $0 <filename> ..."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
cmds=/tmp/flash$$
|
||||
trap "rm $cmds" 0 1 15
|
||||
file="$1"
|
||||
echo "program $file reset" > $cmds
|
||||
openocd \
|
||||
-f interface/stlink-v2.cfg \
|
||||
-f target/stm32l1.cfg \
|
||||
-f $cmds \
|
||||
-c shutdown
|
38
ao-tools/ao-flash/ao-flash-stm.1
Normal file
38
ao-tools/ao-flash/ao-flash-stm.1
Normal file
@@ -0,0 +1,38 @@
|
||||
.\"
|
||||
.\" Copyright © 2013 Keith Packard <keithp@keithp.com>
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful, but
|
||||
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
.\" General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License along
|
||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
.\"
|
||||
.\"
|
||||
.TH AO-FLASH-STM 1 "ao-flash-stm" ""
|
||||
.SH NAME
|
||||
ao-flash-stm \- flash a program to an STM32-based AltOS device using st-flash
|
||||
.SH SYNOPSIS
|
||||
.B "ao-flash-stm"
|
||||
\fIfile.elf\fP
|
||||
.SH DESCRIPTION
|
||||
.I ao-flash-stm
|
||||
loads the specified .elf file into the target device flash memory.
|
||||
.SH USAGE
|
||||
.I ao-flash-stm
|
||||
converts the specified .elf file into a raw binary file and then uses
|
||||
st-flash to load it into the target device via a connected STlink
|
||||
debugging dongle. If st-flash is not available,
|
||||
.I ao-flash-stm
|
||||
will emit an error message and terminate.
|
||||
.SH "SEE ALSO"
|
||||
st-flash(1)
|
||||
.SH AUTHOR
|
||||
Keith Packard
|
16
ao-tools/ao-flash/ao-flash-stm32f0x
Executable file
16
ao-tools/ao-flash/ao-flash-stm32f0x
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
case "$#" in
|
||||
0)
|
||||
echo "usage: $0 <filename> ..."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
cmds=/tmp/flash$$
|
||||
trap "rm $cmds" 0 1 15
|
||||
file="$1"
|
||||
echo "program $file verify reset" > $cmds
|
||||
openocd \
|
||||
-f interface/stlink.cfg \
|
||||
-f target/stm32f0x.cfg \
|
||||
-f $cmds \
|
||||
-c shutdown
|
36
ao-tools/ao-flash/ao-flash-stm32f0x.1
Normal file
36
ao-tools/ao-flash/ao-flash-stm32f0x.1
Normal file
@@ -0,0 +1,36 @@
|
||||
.\"
|
||||
.\" Copyright © 2013 Keith Packard <keithp@keithp.com>
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful, but
|
||||
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
.\" General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License along
|
||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
.\"
|
||||
.\"
|
||||
.TH AO-FLASH-LPC 1 "ao-flash-stm32f0x" ""
|
||||
.SH NAME
|
||||
ao-flash-stm32f0x \- flash a program to a STM32F0x-based AltOS device using openocd
|
||||
.SH SYNOPSIS
|
||||
.B "ao-flash-stm32f0x"
|
||||
\fIfile.elf\fP
|
||||
.SH DESCRIPTION
|
||||
.I ao-flash-stm32f0x
|
||||
loads the specified .elf file into the target device flash memory.
|
||||
.SH USAGE
|
||||
.I ao-flash-stm32f0x
|
||||
is a simple script that passes the correct arguments to openocd to
|
||||
load a file into the target device via a connected STlink
|
||||
debugging dongle.
|
||||
.SH "SEE ALSO"
|
||||
openocd(1)
|
||||
.SH AUTHOR
|
||||
Keith Packard
|
15
ao-tools/ao-flash/ao-flash-stm32f1
Executable file
15
ao-tools/ao-flash/ao-flash-stm32f1
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
case "$#" in
|
||||
0)
|
||||
echo "usage: $0 <filename> ..."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
openocd \
|
||||
-f interface/stlink.cfg \
|
||||
-c 'transport select hla_swd' \
|
||||
-f target/stm32f1x.cfg \
|
||||
-c init \
|
||||
-c 'reset halt' \
|
||||
-c "program $1 verify reset" \
|
||||
-c 'shutdown'
|
36
ao-tools/ao-flash/ao-flash-stm32f1.1
Normal file
36
ao-tools/ao-flash/ao-flash-stm32f1.1
Normal file
@@ -0,0 +1,36 @@
|
||||
.\"
|
||||
.\" Copyright © 2022 Keith Packard <keithp@keithp.com>
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful, but
|
||||
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
.\" General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License along
|
||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
.\"
|
||||
.\"
|
||||
.TH AO-FLASH-LPC 1 "ao-flash-stm32f1" ""
|
||||
.SH NAME
|
||||
ao-flash-stm32f1 \- flash a program to an STM32F1x-based AltOS device using openocd
|
||||
.SH SYNOPSIS
|
||||
.B "ao-flash-stm32f1"
|
||||
\fIfile.elf\fP
|
||||
.SH DESCRIPTION
|
||||
.I ao-flash-stm32f1
|
||||
loads the specified .elf file into the target device flash memory.
|
||||
.SH USAGE
|
||||
.I ao-flash-stm32f1
|
||||
is a simple script that passes the correct arguments to openocd to
|
||||
load a file into the target device via a connected STlink
|
||||
debugging dongle.
|
||||
.SH "SEE ALSO"
|
||||
openocd(1)
|
||||
.SH AUTHOR
|
||||
Keith Packard
|
9
ao-tools/ao-flash/ao-reset-lpc
Executable file
9
ao-tools/ao-flash/ao-reset-lpc
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cmds=/tmp/flash$$
|
||||
trap "rm $cmds" 0 1 15
|
||||
echo "reset" > $cmds
|
||||
openocd \
|
||||
-f interface/stlink-v2.cfg \
|
||||
-f target/lpc11xx.cfg \
|
||||
-f $cmds \
|
||||
-c shutdown
|
35
ao-tools/ao-flash/ao-reset-lpc.1
Normal file
35
ao-tools/ao-flash/ao-reset-lpc.1
Normal file
@@ -0,0 +1,35 @@
|
||||
.\"
|
||||
.\" Copyright © 2018 Bdale Garbee <bdale@gag.com>
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful, but
|
||||
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
.\" General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License along
|
||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
.\"
|
||||
.\"
|
||||
.TH AO-RESET-LPC 1 "ao-reset-lpc" ""
|
||||
.SH NAME
|
||||
ao-reset-lpc \- reset an LPC11U14-based AltOS device using openocd
|
||||
.SH SYNOPSIS
|
||||
.B "ao-reset-lpc"
|
||||
.SH DESCRIPTION
|
||||
.I ao-reset-lpc
|
||||
resets the target device.
|
||||
.SH USAGE
|
||||
.I ao-reset-lpc
|
||||
is a simple script that passes the correct arguments to openocd to
|
||||
reset the target device via a connected STlink debugging dongle.
|
||||
.SH "SEE ALSO"
|
||||
openocd(1)
|
||||
.SH AUTHOR
|
||||
Bdale Garbee
|
||||
|
Reference in New Issue
Block a user