Flashing a hex file (peripheral_lbs example built with vscode using NRF connect SDK) works when flashed with NRF Connect Desktop Programmer, but does not work when flashed with vscode directly.

Setup:

  • Connect SDK Version 2.4.1
  • Extension version: v2023.7.129
  • Hardware: NRF52840 dongle (PCA10059)
  • Tested on both Windows and Linux.

Steps to replicate the issue:

  • Run nrfjprog --recover and nrfjprog --eraseall.
  • Flash the built hex file using Flash button on the extension in VScode and JLink SWD debugger.
  • The board will not boot into the application.

Workaround:

  • Flash the original bootloader.
  • Open NRF connect Programmer and flash the hex file that was built by vscode.
  • The board will reset automatically and application will load.

From reading the forums, I know that I am missing something with bootloaders not being correctly merged with zephyr.hex that I build. I cannot figure out how exactly I can change peripheral_lbs so that I can flash with jlink debugger and make it boot. I also tried building the mcuboot example, but that did not boot either.

What I want to do is to not use USB at all for debugging and programming. I only would like to use the JLink debugger to flash the application and the bootloader.

Parents Reply Children
  • Hi Sam, Thank you for your reply. 

    Unfortunately that link does not answer my question. I am not trying to flash using the dongle. I am trying to flash a program onto the dongle. I do have a Jlink debugger, and a 10-pin tag connect plug of nails with me.


    My issue is that flashing with the debugger works with hex files in the examples with nrf5 sdk. (for example:  ble_app_blinky_pca10059_s140.hex file from nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_blinky\hex.

    But when I build an example with NRF Connect SDK, the hex file flashes successfully, but never boots up. 

  • Hi Dheepan,

    Apologies, I misunderstood your issue. 

    I'll let the DevZone engineers help resolve this for you!

    Sam

Related