diff options
| author | Keith Packard <keithp@keithp.com> | 2013-12-07 23:27:30 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-12-07 23:27:30 -0800 |
| commit | 5fd0dc6f69e7614ba71bbc215b32260a11595af3 (patch) | |
| tree | 92aa3e3fc8e15980d3405ed36b96764a26af0d56 /ao-tools/ao-flash | |
| parent | eee9b3ce1e5adae5aa4566050b6d6048344e92c4 (diff) | |
ao-tools: Add ao-flash-stm and ao-flash-lpc scripts
These use openocd to download boot loaders to the arm-based products
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-flash')
| -rw-r--r-- | ao-tools/ao-flash/Makefile.am | 1 | ||||
| -rw-r--r-- | ao-tools/ao-flash/ao-flash-lpc | 21 | ||||
| -rw-r--r-- | ao-tools/ao-flash/ao-flash-stm | 21 |
3 files changed, 43 insertions, 0 deletions
diff --git a/ao-tools/ao-flash/Makefile.am b/ao-tools/ao-flash/Makefile.am new file mode 100644 index 00000000..97dc91cd --- /dev/null +++ b/ao-tools/ao-flash/Makefile.am @@ -0,0 +1 @@ +bin_SCRIPTS=ao-flash-stm ao-flash-lpc
\ No newline at end of file diff --git a/ao-tools/ao-flash/ao-flash-lpc b/ao-tools/ao-flash/ao-flash-lpc new file mode 100644 index 00000000..57f632b4 --- /dev/null +++ b/ao-tools/ao-flash/ao-flash-lpc @@ -0,0 +1,21 @@ +#!/bin/sh +case "$#" in +0) + echo "usage: $0 <filename> ..." + exit 1 + ;; +esac +cmds=/tmp/flash$$ +trap "rm $cmds" 0 1 15 +for file in "$@"; do + echo "flash write_image $file" +done > $cmds +openocd \ + -f interface/stlink-v2.cfg \ + -f target/lpc11u14.cfg \ + -c init \ + -c 'reset halt' \ + -f $cmds \ + -c 'reset init' \ + -c 'reset run' \ + -c shutdown diff --git a/ao-tools/ao-flash/ao-flash-stm b/ao-tools/ao-flash/ao-flash-stm new file mode 100644 index 00000000..c5aeb7ae --- /dev/null +++ b/ao-tools/ao-flash/ao-flash-stm @@ -0,0 +1,21 @@ +#!/bin/sh +case "$#" in +0) + echo "usage: $0 <filename> ..." + exit 1 + ;; +esac +cmds=/tmp/flash$$ +trap "rm $cmds" 0 1 15 +for file in "$@"; do + echo "flash write_image $file" +done > $cmds +openocd \ + -f interface/stlink-v2.cfg \ + -f target/stm32lx_stlink.cfg \ + -c init \ + -c 'reset halt' \ + -f $cmds \ + -c 'reset init' \ + -c 'reset run' \ + -c shutdown |
