From 9e822663cbbb841ee7636cfd169426e91d8fa643 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 26 Sep 2021 16:59:03 +0200 Subject: Add Helper Scripts and Documentation --- gdb.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 gdb.sh (limited to 'gdb.sh') diff --git a/gdb.sh b/gdb.sh new file mode 100755 index 0000000..45d36ab --- /dev/null +++ b/gdb.sh @@ -0,0 +1,17 @@ +#!/bin/bash + + +# Usage: bash gdb.sh path/to/my/firmware.elf # call ocd.sh script before this + + +ELF_FILE=$1 + + +# disable confirmation messages, connect to MCU via openocd server, reset MCU +# and instantly stop execution +arm-none-eabi-gdb "${ELF_FILE}" \ + -ex 'set confirm off' \ + -ex 'target extended-remote localhost:3333' \ + -ex 'monitor reset halt' + +# now you can flash the firmware with 'load' and run it with 'run' -- cgit v1.2.3-70-g09d2