- Install OpenOCD.
- Plug the JTAG cable into the Bus Blaster's adapter board and the target.
- Run
arm-none-eabi-gdb path/to/firmware.elf -ex 'target remote | openocd -c "gdb_port pipe;" -f ../jtag/busblaster.cfg'
(adjust paths as appropriate) to launch gdb.
c
- continuectrl-c
- stopp expr
- print the value of the C expressionexpr
bt
- stack backtraces
- step instruction, goes into callsn
- next instruction, skips over callsfin
- run until return from functionbreak function
- break at the beginning of a function (can also passfile.c:line
)delete 1
- delete the first breakpointtbreak
- break only once
mon reset
- Reset cpu and all on-chip peripherals (like the reset button)mon soft_reset_halt
- Reset the CPU only
adapter driver ftdi
adapter speed 1000
ftdi_device_desc "Dual RS232-HS"
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0c08 0x0f1b
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
reset_config srst_only
transport select jtag
#the other option is swd - this bit I had to look up