diff options
author | xengineering <me@xengineering.eu> | 2022-01-23 12:13:24 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-01-23 12:17:33 +0100 |
commit | 5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8 (patch) | |
tree | 64e13cde9a65127314c2e815600b507d191517e1 /firmware/gdb.sh | |
parent | 5bdae1ce519bc67ab094c10da7bedbbf5b8a535a (diff) | |
download | ledcontrol-5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8.tar ledcontrol-5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8.tar.zst ledcontrol-5cc962d5fd6ab6b5d4f080a8afe920befe0a44c8.zip |
Introduce firmware directory
Diffstat (limited to 'firmware/gdb.sh')
-rwxr-xr-x | firmware/gdb.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/gdb.sh b/firmware/gdb.sh new file mode 100755 index 0000000..45d36ab --- /dev/null +++ b/firmware/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' |