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

Debugging blinky_example in eclipse

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: cygwin.com/.../using.html

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.

Parents
  • 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: forum.segger.com/index.php

    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.

Reply
  • 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: forum.segger.com/index.php

    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.

Children
No Data
Related