Debian Codegraph @

ao-tools/ao-flash/ao-flash-stm

raw
1 #!/bin/sh
2 case "$#" in
3 0)
4 echo "usage: $0 <filename> ..."
5 exit 1
6 ;;
7 esac
8 cmds=/tmp/flash$$
9 trap "rm $cmds" 0 1 15
10 file="$1"
11 echo "program $file reset" > $cmds
12 openocd \
13 -f interface/stlink-v2.cfg \
14 -f target/stm32l1.cfg \
15 -f $cmds \
16 -c shutdown