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

debugging nRF51 dk within Eclipse IDE

I am using SDK 8.1.0 and Eclipse on a Mac. I am having difficulty flashing my app that uses the nRF51 sdk onto nRF51. I am using JLink I assume I need to flash two things: 1) s110_softdevice.hex (which comes with the nRF51 sdk) and 2)my app - Blinky.hex

How do I do this within Eclipse? Thank you.

Parents Reply Children
  • I have gotten the project to build. It is only debugging in Eclipse I don't have right. Regarding the JLink commands (as in one of the posts and listed below), isn't the device nrf51822 ? Or more generically - what is the device name for the nrf51822. then - 0 for the starting address of the s110 soft device and then 0x1600 for the starting address of the program are probably not the same as for nrf51 sdk's s110 soft device. What values of starting address should be used? Then finally, I don't see the connection between using the JLink commander and source line debugging of the program in Eclipse.. Here are the JLink commands:

    _build em$ JLinkExe -device nrf51822_xxaa -if swd -speed 4000
    [...]
    

    J-Link>loadbin s110_nrf51822_7.0.0_softdevice.bin 0

    J-Link>loadbin ble_app_hrs_s110_xxaa.hex 0x16000
    
        J-Link>r
        J-Link>g
        J-Link>exit
    
  • softdevice start address is always 0

    start address for application is given here for your case it will be 0X18000

    Jlink now only recognises full device name "nRF51422_xxaa, nRF51422_xxab,nRF51422_xxac, nRF51822_xxaa, nRF51822_xxab, nRF51822_xxac"

    I have no expertise in Mac but I think the connection is made witwh GDB and the MBED chip.

  • Thank you. What I didn't understand was the difference between using a .hex and a .bin. Moving forward, I plan to use .hex (has the addressing included) and instead of loadbin (which requires an address) I'll be using loadfile. I am sure this info is documented somewhere. However, on the tutorials and pages I read it did not have this simplification (to use .hex and loadfile instead of .bin and loadbin).

    I was able to get debugging working. Yay!

  • There are always improvements and new ways to do things. You could give your feedback with the hex option in the comments of that tutorials. And great that you got debugging working, what was the trick that worked for you?

Related