aboutsummaryrefslogtreecommitdiff
path: root/scripts/execute.sh
blob: 6d284c9f4950841f6262519edd49ff6216dee89e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

board=$1
where=$(dirname "$0")
shift

trap "rm /tmp/runocd.cfg" EXIT

cat > /tmp/runocd.cfg <<EOF
init
reset halt
arm semihosting enable
arm semihosting_cmdline $*
resume
EOF

sudo openocd -d0 -s /usr/local/share/openocd -f scripts/board/$board.cfg -f /tmp/runocd.cfg