19 lines
216 B
Bash
19 lines
216 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
HEXFILE="$1"
|
||
|
|
||
|
if [ ! -f "$HEXFILE" ]; then
|
||
|
echo "$HEXFILE cannot be accessed."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
JLinkExe -device STM32L010K8 -speed 1000 -if SWD <<EOF
|
||
|
connect
|
||
|
loadfile $HEXFILE
|
||
|
r
|
||
|
g
|
||
|
exit
|
||
|
EOF
|