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

Eclipse CDT, GDB debugging with nRF51822: breaks on every line.

I have Eclipse CDT set up for debugging the ble_app_proximity sample code on a Mac. I can start the GDB server on the console and connect to it. Flashing the code seems to work. I've already flashed the softdevice from a Windows machine. Disconnecting GDB and powering up without debugging, I can connect to the device from the Master Control Panel on a Windows machine. So the device is working without debugging.

But when I try to debug from Eclipse, the debugger is stopping on every line within timers_init(). See thread screenshot attached. I would expect clicking the Resume (play) button to take me to my next breakpoint, or resume fully if I have no breakpoints. But no progress is made out of NVIC_SetPendingIRQ().

screenshot_nordic_gdb.png

Parents
  • Hi Ellot,

     I am using the same Eclipse plugins from livius as you.  I don't use the makefile.  I created the Eclipse project using the Wizard for generic ARM.  Then go to project properties and change the processor to Cortex-M0 and set all the include paths.  Add links to SDK sources as require.  Debug using the default settings.  I have no problem debugging blank app.  When using s110, it just doesn't break.  To be able to debug with s110, the trick I found is to first upload the code using nRFGo via DFU upload via serial.  I have the DFU project in Eclipse working.  After DFU flash the App, go back to Eclipse and start debuting, it should stop at system startup.  One other thing, there is a limit of 4 break points.  Debug won't start properly if you set more than 4 break points.  I hope this helps.  Good luck.
    

    Hoan

Reply
  • Hi Ellot,

     I am using the same Eclipse plugins from livius as you.  I don't use the makefile.  I created the Eclipse project using the Wizard for generic ARM.  Then go to project properties and change the processor to Cortex-M0 and set all the include paths.  Add links to SDK sources as require.  Debug using the default settings.  I have no problem debugging blank app.  When using s110, it just doesn't break.  To be able to debug with s110, the trick I found is to first upload the code using nRFGo via DFU upload via serial.  I have the DFU project in Eclipse working.  After DFU flash the App, go back to Eclipse and start debuting, it should stop at system startup.  One other thing, there is a limit of 4 break points.  Debug won't start properly if you set more than 4 break points.  I hope this helps.  Good luck.
    

    Hoan

Children
No Data
Related