diff options
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' |