ao-tools: Use 'program' command in ao-flash-lpc instead of 'flash'
authorKeith Packard <keithp@keithp.com>
Sat, 5 Apr 2014 06:37:15 +0000 (23:37 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 5 Apr 2014 07:22:30 +0000 (00:22 -0700)
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>
ao-tools/ao-flash/ao-flash-lpc [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 57f632b..7ac5b52
@@ -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