This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51-DK OpenOCD GDB

Setup: Ubuntu14.04 ARM gcc version 4.8.4 20140725 OpenOCD 0.9

OpenOCD: openocd -f openocd/share/openocd/scripts/interface/jlink.cfg -c "transport select swd" -f openocd/share/openocd/scripts/target/nrf51.cfg

GDB: arm-none-eabi-gdb -tui _build/nrf51422_xxac_s110.out target extended-remote:3333 load monitor reset init b main c

After loading the code from GDB I am unable to step through code. The it seems the main function never get called. I go sometimes get a warning on openocd:

arn : not enough working area available(requested 32) Warn : no working area available, falling back to slow memory writes Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (6337). Workaround: increase "set remotetimeout" in GDB

I'm using a out of the box dev kit. OpenOCD seems to connect to the segger fine:

Info : JLink SWD mode enabled swd cortex_m reset_config sysresetreq adapter speed: 1000 kHz Info : J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 21 2016 17:58:20 Info : J-Link caps 0xb8ea5a33 Info : J-Link hw version 10000 Info : J-Link hw type J-Link Info : J-Link max mem block 19664 Info : J-Link configuration Info : USB-Address: 0x0 Info : Kickstart power on JTAG-pin 19: 0xffffffff Info : Vref = 3.300 TCK = 0 TDI = 1 TDO = 1 TMS = 1 SRST = 1 TRST = 1 Info : J-Link JTAG Interface ready Info : clock speed 1000 kHz Info : SWD IDCODE 0x0bb11477 Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints Info : accepting 'gdb' connection on tcp/3333 Info : nRF51822-QFAC(build code: A1) 256kB Flash undefined debug reason 7 - target needs reset

Related