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

Unable to flash compiled demo from NRF sdk

Hello everybody,

I successfully built a BLE demo application using Nordic SDK and arm-gcc makefiles and now I am trying to flash it. My board is a custom made one with NRF52832, and debug adapter is St-link, not a Jlink.

So I am unable to use provided nrfjprog utility from 'make flash'...

I usually use gdb and flash firmware from it via 'load' command in gdb shell. But with this demos (to my understanding) I need to flash SoftDevice separately. So I've tried to flash it using openocd (telnet localhost :4444; program ...), then I tried to flash my app, again, with openocd, and I have no success. Board seems to be completely dead.

I've tried different combinations with openocd and gdb and I am completely stuck now :) If I am loading app from gdb chip seems to stop at some early address (0x2b, if memory serves), so I guess gdb rewrites all memory. With openocd - loaded app it seems again stuck somewhere, and I am unable to catch main or reset handler or anything.

My OS is arch linux, softdevice S132. So can anybody point me what I am doing wrong?

Cheers!

Parents
  • Hi,

    You can merge the softdevice with your application using mergehex utility. You should then be able to flash a single file using gdb.

    Have you verified that the application works on a Nordic DK or another board? Do you have a J-Link device/Nordic DK that you can connect to your board to verify if you are able to flash it correctly using that?

    Best regards,
    Jørgen

  • Hi Jørgen,

    I've tried with mergehex utility, but it seems not working too. I've also tried with Arduino, and interestingly, it worked. I think implementation there is basically a set of wrappers above the original SDK so I am confused why I cant flash and run samples from SDK itself :) I've also tried older SDK 11, without any success.


    Unfortunately, I don't have any official Nordic development boards nor J-Link to verify this behavior. I used to experiment a bit on custom NRF boards without SDK (only bare registers), so I'm sure that my St-link works ok.

Reply
  • Hi Jørgen,

    I've tried with mergehex utility, but it seems not working too. I've also tried with Arduino, and interestingly, it worked. I think implementation there is basically a set of wrappers above the original SDK so I am confused why I cant flash and run samples from SDK itself :) I've also tried older SDK 11, without any success.


    Unfortunately, I don't have any official Nordic development boards nor J-Link to verify this behavior. I used to experiment a bit on custom NRF boards without SDK (only bare registers), so I'm sure that my St-link works ok.

Children
No Data
Related