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

nRFgo Studio and IAR Using SEGGER J-Link Question

Hello all,

I'm new to embedded development and could use some help here.

I am currently working on our own board with a nRF51822 chip on it and using SEGGER j-link to program. It took quite a bit of work, but I eventually got it to compile the HRS example onto the board and get it to show up on my phone. During that process, I realized I had to use nRFGo Studio to upload the softdevice.hex file first before I used IAR to add the example code.

I was wondering, how can I use IAR to reduce this two step process to one step so that I don't have to do this for every test board?

Thanks.

  • Hi John,

    Yes, it is possible to load the softdevice directly from IAR. First, I would recommend that you start off with a "nrfjprog -e" to ensure that your device is blank.

    If you go to your IAR project settings

    Options.. -> Debugger
    

    Then select the "Images" tab, you have the option to download an extra image when entering debug mode.

    You check this option and browse to the selected softdevice .hex location. image description

    Now, when you enter debug mode from IAR, it will load the softdevice .hex as well.

    Cheers, Håkon

  • Thank you so much. The only problem now is that I have to download and debug twice after erasing it for it to work. On the first download, I get " Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF" and it does not run properly. After downloading again, it makes it to main and runs the code no problem. Any solution for this?

  • I see the same issue with EWB 7.30. If there's something present in flash, IAR will erase the sections and flash the softdevice. In this scenario, I see errors sometime, and have to restart the session. Haven't seen a workaround yet, but I recommend checking out their latest EWB version to see if it has improved. Also try to update your Segger drivers to the latest.

Related