Unable to Flash Blinky

Hello,

I just got started with the nRF5340 DK.  I went through the example which instructs how to load the "Blinky" applications, build it, and then flash it to the Board.

Everything works except for flashing it to the board.  I get the following error:

* Executing task: nRF Connect: Build: blinky/build (active)

Building blinky
west build --build-dir c:/nordic/myapps/blinky/build c:/nordic/myapps/blinky

[0/16] Performing build step for 'tfm'
ninja: no work to do.
* Terminal will be reused by tasks, press any key to close it.

* Executing task: nRF Connect: Flash: blinky/build (active)

Flashing build to 1050099720
west flash -d c:\nordic\myapps\blinky\build --skip-rebuild --dev-id 1050099720

-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: c:\nordic\myapps\blinky\build\zephyr\merged.hex
ERROR: No debuggers were discovered.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 41: nrfjprog --program 'c:\nordic\myapps\blinky\build\zephyr\merged.hex' --sectorerase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 1050099720

* The terminal process terminated with exit code: 41.
* Terminal will be reused by tasks, press any key to close it.

  • Hi,

    I see. There are a few things we can check:

    1. Verify that you are using the USB port on the left side on the DK, as thi sis the one that is connected to the onboard debugger.
    2. Verify that SW6 is in the default position

    If it still does not work, can you try a different USB cable and avoid any USB hubs? Also, have you done any modifications on the DK? If still no luck, please upload a photo of your DK so that I can see both switch positions and how it is connected.

  • Hello,

    I have tried multiple different use cables for both the nRF5340 and nRF5340DK,

    I have verified that the USB is connected to the left side of the DK, and I have tried every USB port on my PC.

    and I have verified that SW6 is set to default.

    Attached are some pictures for reference.

    The only thing left I can try is to install everything on a difference PC.

  • Hello,

    I have tried installing everything from scratch on a different PC, and same results:

    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: \blinky\build\zephyr\merged.hex
    ERROR: No debuggers were discovered.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    FATAL ERROR: command exited with status 41: nrfjprog --program '\blinky\build\zephyr\merged.hex' --sectorerase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 1050126393

    These are the installation instructions I am following. Is this the correct procedure for installing everything?

    developer.nordicsemi.com/.../install_ncs.html

  • I was just having the EXACT same problem. I have an nRF52840-DK and nRF52-DK, a brand new PC with Windows 11, and had freshly installed VS Code, nRF command line tools, and extension pack for VSC. Was trying the same blinky app from the SDK fundamentals course, following the instructions to the letter.

    Only deviation was that I had also installed the latest J-Link Software (7.94k, from yesterday).

    I was getting the exact same errors, J-Link Configurator was not seeing either DK, and in Device Manager, there was a "BULK device" and two "USB-Serial" devices (but not the usual "JLink CDC" type). Very weird.

    Out of curiosity, I uninstalled JLink 7.94k and installed an older version, 7.88j. Suddenly the DKs were seen by Configurator and all worked fine in VSC.

    Then (even more strangely), I uninstalled 7.88j and reinstalled 7.94k, and everything still seems to be working. Need to try rebooting to see if it survives that.

    Maybe give this a shot and report back?

  • You are a lifesaver!

    I had JLink 7.94e installed.  I believe this was automatically installed during the installation process/instructions.

    I then installed 7.88j as you suggested, and it worked!  

    Hopefully the installation instructions can be updated to use working versions of JLink.

Related