Problem running/debugging nRF51822 GCC example project

Hello. I'm trying to start developing with the nRF51822 Eval kit with Eclipse and ARM GCC but I ran into some problems when trying to run the ble_app_hrs_example. I've been trying to solve it for the past two days but I'm pretty much out of ideas now so any help would be appreciated.

I installed and set-up everything the way it's described in the application note and flashed SoftDevice onto the eval board. The example program compiles without errors but when I try debugging I get strange behavior - I can step into and over lines of code, but the program doesn't stop at any breakpoints I set. In fact I get the following line (in red color) in the console every time I try to set a breakpoint:

Try to add breakpoint - No source file named C.

Another problem is that after I run he debugging session for the first time, the IDE starts reporting two errors in the file main.c on lines 308 and 673 -

Symbol 'app_timer_evt_schedule' could not be resolved

and

Symbol 'ble_stack_evt_schedule' could not be resolved

respectively. Both of these are defined as inline functions in headers which are included in the project so I don't understand what is the problem. Plese let me know if you need any more info, any help would be appreciated, thanks.

  • The results with v4.74a are the same. Another thing of note is that after I halt the debug session, I can no longer see the device and I have to recover it using nRF Go studio before I can try another debug session.

  • I have a little bit on new info: I have changed names of all the folders in the project, so that they contain no spaces, and I have set all the project file paths to be absolute. Some people have suggested that this helped them when getting the "No source file named XXX" error with GDB. Now instead of: No source file named C. I get the error: No source file named C:\Nordic-Semiconductor\nRF51-SDK\Nordic\nrf51822\Board\pca10001\blinky_example\main.c. Which is strange, as this file clearly exists.

  • Hi Viktor,

    We have been able to reproduce the same issue by update Eclipse to Kepler version. Before, I used Eclipse Juno as used in nAN29.

    The workaround that worked for me on Kepler is to select "Standard GDB Hardware Debugging Launcher" instead of "GDB (DSF) Hardware Debugging Launcher" as stated in nAN29.

    Could you please try and let me know the result ?

  • Everything seems to be working fine now :) Thanks for your support!

  • I'd like to contribute a workaround to at least one of these annoying issues, the "No source found". This is a common error, with common / simple solutions, but not in this case. Running gdb from the command line the source files are recognized, but not in the eclipse debugger.

    The workaround for this was to simply an alternate / additional source lookup path, relative to source folder, as show in the attached screenshot.

    I no longer get the "No source found" errors, and more importantly set breakpoints!

    As for the unresolved __INLINE... that's less of an issue. From quick googling it seems similar errors are known and will likely "resolve themselves" in future CDT releases.

    Capture.PNG

Related