Re: Debugging NRF51822 (OpenOCD + GDB)


Chettimada, Vinayak Kariappa
 

Hi,


I wrote into the list about an issue I was having with an NRF51822 board a couple days ago. It’s occasionally ending up in _SysFatalErrorHandler but I’m still not sure why (though I suspect it may be something BLE related).
I can help you if its an issue with BLE, can you give details of the application you are using and the symptoms of the issue?

I’m trying to attach a debugger with the ultimate goal of printing a stack trace when the code ends up in the error handler. First I’m starting an OpenOCD server:

$ openocd -f interface/stlink-v2.cfg -f target/nrf51.cfg

And then trying to connect GDB:

$ arm-none-eabi-gdb outdir/nrf51_blenano/zephyr.elf
(gdb) set verbose on
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
warning: platform-specific solib_create_inferior_hook did not load initial shared libraries.
Reading in symbols for /Users/scott/Code/bms/zephyr/lib/libc/minimal/source/stdout/fprintf.c...done.
fprintf (F=<optimized out>, Abort trap: 6

The OpenOCD logs show:

accepting 'gdb' connection on tcp/3333
dropped 'gdb' connection

Any idea why I’m getting this error? I’m new to OpenOCD and GDB so I’m not sure if this is an issue with my toolchain setup or if it is something related to Zephyr. Any help would be much appreciated!
I have no experience myself with OpenOCD, I always have used our DK boards with JLinkGDBServer or pyocd-gdbserver (mbed debugger host firmware).

Thanks,
Scott
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

Join users@lists.zephyrproject.org to automatically receive all group messages.