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

Attaching gdb to running nRF51822

I have an nRF51822 board that is running fine for a while. At some point, it runs into an error and calls ble_debug_assert_handler() and goes into an infinite loop. At that point, I would like to hook it up to a JLink and start gdb to find what the error is and where it occurs. My question: Would someone help showing how I can attach gdb to a running nRF51822 please?

Note: I do not want to attach the JLink to the board and running gdb from the start (before an error occurs), because I need to have the board unattached to move it around to generate the errors.

Thanks!

Parents
  • Thanks for pointing that out, but, yes, unfortunately, that does not work. I imagine there ought to be a way to attach gdb and some Nordic engineers must have done this before.

    In case attaching gdb to a running board does not work, the documentation for ble_debug_assert_handler() says that it writes the error code, line number, and filename to flash. I am thinking another way is to hook up the board after the error occurred and read the flash for those values. But I am not sure at the moment where in flash those values are stored at. developer.nordicsemi.com/.../a00111.html

Reply
  • Thanks for pointing that out, but, yes, unfortunately, that does not work. I imagine there ought to be a way to attach gdb and some Nordic engineers must have done this before.

    In case attaching gdb to a running board does not work, the documentation for ble_debug_assert_handler() says that it writes the error code, line number, and filename to flash. I am thinking another way is to hook up the board after the error occurred and read the flash for those values. But I am not sure at the moment where in flash those values are stored at. developer.nordicsemi.com/.../a00111.html

Children
No Data
Related