Add programming scripts for Jlink

This commit is contained in:
Mario Hüttel 2020-02-25 17:28:38 +01:00
parent 641a6a88af
commit a2256acd94
2 changed files with 26 additions and 0 deletions

8
program-device.gdb Normal file
View File

@ -0,0 +1,8 @@
target extended-remote :2331
monitor speed 4000
monitor reset
load
monitor reset
kill
quit

18
program-device.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
JLinkGDBServer -if SWD -device STM32F407VE &
sleep 2
# Check if GDB server is still running
gdbpid=`pidof JLinkGDBServer`
if [[ $gdbpid == "" ]]; then
echo ""
echo "GDB Server not running! Check target connection."
exit
fi
arm-none-eabi-gdb -x program-device.gdb stm32f4sdio.elf
sleep 2
kill $gdbpid