Make programming script take the elf file as an argument

This commit is contained in:
Mario Hüttel 2020-04-18 01:37:50 +02:00
parent 1e35af770f
commit cbd3e56503
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,10 @@
#!/bin/bash
if [[ -z $1 ]]; then
echo "Usage: $0 <ELF-file>"
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