From cbd3e56503fe55dcef66f3f96db7f5773ca58f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sat, 18 Apr 2020 01:37:50 +0200 Subject: [PATCH] Make programming script take the elf file as an argument --- stm-firmware/program-device.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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