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

  • Did you ever flash any arduino bootloader or similar to the board? If you have not done that already, you should erase all flash in the nRF52832 device and try again.

    The only supported debugger for the nRF5 series ICs are J-Link, so it makes it much harder to get help from us if you use 3rd party tools. At a minimum, we recommend having a nRF5 DK available, as this includes an J-Link OB debugger that can be used to flash/erase/debug external designs.

  • We found a problem and it was not related to flashing, but SoftDevice related. Board has no LE crystal and for some reason (may be it was clearly stated somewhere, but I designed this board based on reference manual) LE crystal is required for SoftDevice to work. So I changed config file (SoftDevice clock section, select synthesized instead of crystal) and now demo runs fine. I was unable to find an issue with debugger because with softdevice stlink + openocd + gdb were working poorly.

    So anyway, thanks for your support and I think this issue can be considered solved.

Reply
  • We found a problem and it was not related to flashing, but SoftDevice related. Board has no LE crystal and for some reason (may be it was clearly stated somewhere, but I designed this board based on reference manual) LE crystal is required for SoftDevice to work. So I changed config file (SoftDevice clock section, select synthesized instead of crystal) and now demo runs fine. I was unable to find an issue with debugger because with softdevice stlink + openocd + gdb were working poorly.

    So anyway, thanks for your support and I think this issue can be considered solved.

Children
No Data
Related