summaryrefslogtreecommitdiff
path: root/ao-tools/ao-flash/ao-flash-stm32f0x
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2015-07-16 13:36:59 -0600
committerBdale Garbee <bdale@gag.com>2015-07-16 13:36:59 -0600
commitf4f0f044df1251d64d44bf62d25b488fd04a05c8 (patch)
tree12efee1447a67d8cf37b6f447c011708264b8266 /ao-tools/ao-flash/ao-flash-stm32f0x
parentb25690062ac04a588ad4d11740597c20e516eb1a (diff)
parent570daace9caf7647a09c53d5c75593cc4c98b93b (diff)
Merge branch 'branch-1.6' into debian
Diffstat (limited to 'ao-tools/ao-flash/ao-flash-stm32f0x')
-rwxr-xr-xao-tools/ao-flash/ao-flash-stm32f0x16
1 files changed, 16 insertions, 0 deletions
diff --git a/ao-tools/ao-flash/ao-flash-stm32f0x b/ao-tools/ao-flash/ao-flash-stm32f0x
new file mode 100755
index 00000000..45643a4f
--- /dev/null
+++ b/ao-tools/ao-flash/ao-flash-stm32f0x
@@ -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-v2.cfg \
+ -f target/stm32f0x_stlink.cfg \
+ -f $cmds \
+ -c shutdown