Re: Debugging NRF51822 (OpenOCD + GDB)
Hi Scott,toggle quoted messageShow quoted text
I don’t know why you are getting the gdb error (here at Nordic we all use Segger debug ICs), but if the _SysFatalErrorHandler is getting called because of BLE then it’s highly likely that there is a preceding printk() statement giving the cause. I understand you don’t have a serial port connected, so could you try enabling the RAM console and dumping the memory with gdb once you hit the fatal error?
You should be able to do so with this option:
On 22/08/2017, 21:16, "firstname.lastname@example.org on behalf of Scott Nelson" <email@example.com on behalf of firstname.lastname@example.org> wrote:
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’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!
Zephyr-users mailing list