summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-04-04 23:37:15 -0700
committerKeith Packard <keithp@keithp.com>2014-04-05 00:22:30 -0700
commit2424c0e6fe53789dc83d1e96439dcdc13e847b07 (patch)
treebb0e2f8726e2d5f4f72df36cbea65840ae4b2865
parent4800497fa1fc449807ef0097cc3fed367641ae29 (diff)
ao-tools: Use 'program' command in ao-flash-lpc instead of 'flash'
The program meta-command is supposed to do the whole thing, and seems more reliable in actually getting what we want flashed to the board. Signed-off-by: Keith Packard <keithp@keithp.com>
-rwxr-xr-x[-rw-r--r--]ao-tools/ao-flash/ao-flash-lpc9
1 files changed, 2 insertions, 7 deletions
diff --git a/ao-tools/ao-flash/ao-flash-lpc b/ao-tools/ao-flash/ao-flash-lpc
index 57f632b4..7ac5b523 100644..100755
--- a/ao-tools/ao-flash/ao-flash-lpc
+++ b/ao-tools/ao-flash/ao-flash-lpc
@@ -7,15 +7,10 @@ case "$#" in
esac
cmds=/tmp/flash$$
trap "rm $cmds" 0 1 15
-for file in "$@"; do
- echo "flash write_image $file"
-done > $cmds
+file="$1"
+echo "program $file verify reset" > $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