From a2256acd94609163588c81aa66c445e0b2167501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 25 Feb 2020 17:28:38 +0100 Subject: [PATCH] Add programming scripts for Jlink --- program-device.gdb | 8 ++++++++ program-device.sh | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 program-device.gdb create mode 100755 program-device.sh diff --git a/program-device.gdb b/program-device.gdb new file mode 100644 index 0000000..6bec46f --- /dev/null +++ b/program-device.gdb @@ -0,0 +1,8 @@ +target extended-remote :2331 +monitor speed 4000 +monitor reset +load +monitor reset +kill +quit + diff --git a/program-device.sh b/program-device.sh new file mode 100755 index 0000000..b8e6fdf --- /dev/null +++ b/program-device.sh @@ -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