Debugging blinky_example in eclipse

nhalden gravatar image

asked 2014-06-12 03:35:07 +0100

updated 2014-06-24 06:20:07 +0100

Hello - I have gotten blinky_example up and running in eclipse using the SDK 5.2, nan-29, and some additional google-fu.

Now when I press debug and the play button, it correctly alternates blinking LED0 and LED1. However, Eclipse does not seem to be doing source file look ups correctly when debugging. For example, when I try to place a breakpoint at one of the pin_clear() function calls in the while(1) loop the console shows the following error:

No source file named C:Nordic Semiconductor RF51 SDK_v5.2.0.39364Nordic rf51822Board rf6310linky_examplemain.c.

It actually has some non-printable characters where some of the letters are missing. Also, when I press the pause button, Eclipse does not highlight a line in main.c to show me the currently executing line as I would expect.

Does anybody know what setting or property I need to fix to enable this functionality?

P.S. - One interesting thing I noticed that could potentially be related is that when I perform a build, I get the following warning (or a very similar one) for every single operation:

"C:/Program Files (x86)/GNU Tools ARM Embedded/4.8 2014q1/bin/arm-none-eabi-objcopy" -O ihex _build/blinky_gcc_xxaa.out _build/blinky_gcc_xxaa.hex cygwin warning: MS-DOS style path detected: C:\Nordic Semiconductor\nRF51 SDK_v5.2.0.39364\Nordic\nrf51822\Board\nrf6310\blinky_example\gcc Preferred POSIX equivalent is: /cygdrive/c/Nordic Semiconductor/nRF51 SDK_v5.2.0.39364/Nordic/nrf51822/Board/nrf6310/blinky_example/gcc CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using...

UPDATE: After messing around with the debug configurations, I can now place breakpoints in main.c and the program will correctly pause. For example, I can place a breakpoint in main.c:43 which is on one of the delay() statements between the pin toggles and then the program will correctly cycle through the LEDs once each time I press Go and then it will pause until I press Go again. However, it still will not highlight the current line when I press pause or when the breakpoint is hit. This is extremely annoying as any kind of more complex debugging 100% requires that functionality... any thoughts on what I have configured incorrectly? And just to be sure, has somebody gotten that functionality working with Eclipse Kepler and SDK v5.2?

Any help much appreciated, thanks.

edit retag flag offensive close delete report spam


The other interesting thing is that in my debug configuration, I have it set to put a breakpoint at main and that works. If I have that enabled when I press debug, it stops at main. If I don't have that enabled and I press debug, the LEDs just start blinking immediately. So that is clearly using a different way of finding main.c

nhalden ( 2014-06-12 03:40:42 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
nhalden gravatar image

answered 2014-06-25 03:40:12 +0100

hkn gravatar image

updated 2014-06-26 12:32:40 +0100

I figured out the problem. Segger had a bug in v4.86 of the JLink software. I finally noticed a bunch of warnings in the JLink GDB Server window and found some information on Segger's forum. See discussion here: http://forum.segger.com/index.php?pag...

Summary: If you see this warning: "WARNING: Unknown packet received: "qXfer:threads:read::0,fff" then update the Segger software to v4.86a

That solved the problem for me and now when I press pause it correctly shows me the disassembly and highlights a line in main.c.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower


Asked: 2014-06-12 03:35:07 +0100

Seen: 1,206 times

Last updated: juni 26 '14