diff --git a/stm-firmware/program-device.sh b/stm-firmware/program-device.sh index bcb13b7..780d4db 100755 --- a/stm-firmware/program-device.sh +++ b/stm-firmware/program-device.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ -z $1 ]]; then + echo "Usage: $0 " + exit -1 +fi + JLinkGDBServer -if SWD -device STM32F407VE & sleep 2 @@ -12,7 +17,7 @@ if [[ $gdbpid == "" ]]; then exit fi -arm-none-eabi-gdb -x program-device.gdb reflow-controller.elf +arm-none-eabi-gdb -x program-device.gdb $1 sleep 2 kill $gdbpid