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

Problem when debugging esb prx example on nrf52823 in eclipse

OS: Ubuntu 14.04 IDE: Eclipse, installed as per tutorial. Board: pca10040

When trying to debug esb prx and esb low power trx I get the following error:

No source file named /home/username/nrf5_SDK/examples/proprietary_rf/esb_ptx/main.c.

Program received signal SIGTRAP, Trace/breakpoint trap.

0x00000000 in __isr_vector ()

*** stack smashing detected ***: gdb terminated

I have successfully entered debug mode with the blinky example and esb trx. Also I can upload the examples successfully to the board and run them through eclipse. Also the source file is there, but for some reason I'm still getting an error.

I've been battling with this all day, any help would be welcome. Thanks!

  • I've not seen this error before. Have you done any modifications to the example besides turning off the optimization? I debugged the same example with GDB but was unable to reproduce.

    Please post screenshots of your debug launcher settings, disassembly view and the register view. This might give a clue.

  • It turns out that the problem was to do with the GDB client setup. The ${cross_prefix} variable wasn't set so the debugger was calling gdb instead of arm-none-eabi-gdb. I just added the full path of the debugger instead of ${cross_prefix}gdb${cross_suffix}.... This should really be added to the tutorial as I see that other people had the same problem.

    This screenshot is from Windows but it also fixed the problem on Ubuntu as well.

    image description

Related