diff options
author | xengineering <me@xengineering.eu> | 2021-09-26 16:59:03 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2021-09-26 16:59:44 +0200 |
commit | 9e822663cbbb841ee7636cfd169426e91d8fa643 (patch) | |
tree | c14cf0c90a5fc8da4b44c01b50e389a7e8459e9d /gdb.sh | |
parent | 45a6fdb04f3bf605eb4280473dd22db041ece6a7 (diff) | |
download | ledcontrol-9e822663cbbb841ee7636cfd169426e91d8fa643.tar ledcontrol-9e822663cbbb841ee7636cfd169426e91d8fa643.tar.zst ledcontrol-9e822663cbbb841ee7636cfd169426e91d8fa643.zip |
Add Helper Scripts and Documentation
Diffstat (limited to 'gdb.sh')
-rwxr-xr-x | gdb.sh | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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' |