From: Keith Packard Date: Sat, 5 Apr 2014 06:37:15 +0000 (-0700) Subject: ao-tools: Use 'program' command in ao-flash-lpc instead of 'flash' X-Git-Tag: 1.3.2.2~152 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=2424c0e6fe53789dc83d1e96439dcdc13e847b07;ds=sidebyside 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 --- diff --git a/ao-tools/ao-flash/ao-flash-lpc b/ao-tools/ao-flash/ao-flash-lpc old mode 100644 new mode 100755 index 57f632b4..7ac5b523 --- 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