From 4c5b3add1d9d0ec05540abd55e6e920c0a097260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sat, 15 Feb 2020 22:25:41 +0100 Subject: [PATCH] Add scripts for device programming using JLINK --- stm-firmware/program-device.gdb | 4 ++++ stm-firmware/program-device.sh | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 stm-firmware/program-device.gdb create mode 100755 stm-firmware/program-device.sh diff --git a/stm-firmware/program-device.gdb b/stm-firmware/program-device.gdb new file mode 100644 index 0000000..35f65b9 --- /dev/null +++ b/stm-firmware/program-device.gdb @@ -0,0 +1,4 @@ +target extended-remote :2331 +load +monitor reset +quit diff --git a/stm-firmware/program-device.sh b/stm-firmware/program-device.sh new file mode 100755 index 0000000..1c07d86 --- /dev/null +++ b/stm-firmware/program-device.sh @@ -0,0 +1,17 @@ +#!/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 reflow-controller.elf + +kill $gdbpid