VSCode Connected Devices sees the dev board, but not the target

I am quite new to the nRF SDK.  When setting up an nRF project in VSCode, I can build my project but I cannot flash the target.

My target in this case is an nRF52840-DK.

I checked the "Connected Devices" tab, and I can see that the dev board is recognised.  But I don't see any target CPU:

If I open a terminal, JLink is not seeing the target:


I tried another laptop and here everything is better.  I can build and flash the target.  In connected devices, I see the target:

And in the terminal, JLink is seeing the target:

Version of nrfjprog is identical between these two systems.

Unfortunately, the non-working system also happens to be my work laptop Blush my question is, how can I troubleshoot this issue?

Parents
  • Hello,

    Since it is working fine with another PC, I guess it is not an issue with the nRF52840DK or the VScode extension. See if your device is detected properly inside the PC device manager (see the Ports section inside the device manager). How the nRF Connect programmer app works when you try to read the device. See if the programmer's app is throwing any errors. Also, try to recover your device once and see if this resolves your issue.

    Kind Regards,

    Abhijith

  • Thanks for the response Abhijith,

    When I connect my dev board to the work PC, it enumerates as a COM port in device manager as expected.

    I have installed the nRF Connect programmer app.  When I launch it and click "connect device", it sees the board but then fails with a complaint "NO_EMULATOR_CONNECTED".  See full log below.

    2024-05-22T09:41:05.960Z INFO Initialising nrfutil module: device
    2024-05-22T09:41:05.988Z DEBUG Application data folder: C:\Users\brihos\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
    2024-05-22T09:41:06.019Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:06.020Z DEBUG App pc-nrfconnect-programmer v4.3.0 (official)
    2024-05-22T09:41:06.020Z DEBUG App path: C:\Users\brihos\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
    2024-05-22T09:41:06.020Z DEBUG nRFConnect 5.0.0, required by the app is (>=4.4.1)
    2024-05-22T09:41:06.020Z DEBUG nRFConnect path: C:\Users\brihos\AppData\Local\Programs\nrfconnect\resources\app.asar
    2024-05-22T09:41:06.020Z DEBUG HomeDir: C:\Users\brihos
    2024-05-22T09:41:06.020Z DEBUG TmpDir: C:\Users\brihos\AppData\Local\Temp
    2024-05-22T09:41:06.723Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.693Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.693Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.714Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.804Z INFO Using nrfutil-device core version: 7.7.1
    2024-05-22T09:41:08.395Z INFO Using nrfutil-device version: 2.1.1
    2024-05-22T09:41:08.395Z INFO Using nrf-device-lib version: 0.17.5
    2024-05-22T09:41:08.395Z INFO Using nrfjprog DLL version: 10.24.0
    2024-05-22T09:41:08.395Z INFO Using JLink version: JLink_V7.94e
    2024-05-22T09:41:08.762Z INFO Getting serialport options from persistent store 000683307548.pc-nrfconnect-programmer
    2024-05-22T09:41:08.762Z DEBUG Sending event "programmer: device connected"
    2024-05-22T09:41:15.263Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:16.613Z ERROR Error: Failed with exit code 1.
    Failed to device info one or more devices:
    * 683307548: [jlink] NO_EMULATOR_CONNECTED, code: Nrfjlink.
    Message: Operation device-info failed, [jlink] NO_EMULATOR_CONNECTED.
    2024-05-22T09:41:16.613Z INFO Using nrfutil device to communicate with target via JLink
    2024-05-22T09:41:16.633Z DEBUG Sending event "programmer: device selected"
    2024-05-22T09:41:16.633Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:16.946Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:19.854Z INFO Reading readback protection status for Application core
    2024-05-22T09:41:19.855Z ERROR Failed to reading readback protection status for application core core. Error: [object Object], message: Batch task protection-get failed, [jlink] NO_EMULATOR_CONNECTED
    2024-05-22T09:41:20.046Z ERROR Error: Failed with exit code 1.
    One or more batch tasks failed:
    - [jlink] NO_EMULATOR_CONNECTED, code: Nrfjlink.
    Message: Batch task protection-get failed, [jlink] NO_EMULATOR_CONNECTED.
    2024-05-22T09:41:20.046Z ERROR Error: Failed with exit code 1.
    One or more batch tasks failed:
    - [jlink] NO_EMULATOR_CONNECTED, code: Nrfjlink.
    Message: Batch task protection-get failed, [jlink] NO_EMULATOR_CONNECTED.

Reply
  • Thanks for the response Abhijith,

    When I connect my dev board to the work PC, it enumerates as a COM port in device manager as expected.

    I have installed the nRF Connect programmer app.  When I launch it and click "connect device", it sees the board but then fails with a complaint "NO_EMULATOR_CONNECTED".  See full log below.

    2024-05-22T09:41:05.960Z INFO Initialising nrfutil module: device
    2024-05-22T09:41:05.988Z DEBUG Application data folder: C:\Users\brihos\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
    2024-05-22T09:41:06.019Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:06.020Z DEBUG App pc-nrfconnect-programmer v4.3.0 (official)
    2024-05-22T09:41:06.020Z DEBUG App path: C:\Users\brihos\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
    2024-05-22T09:41:06.020Z DEBUG nRFConnect 5.0.0, required by the app is (>=4.4.1)
    2024-05-22T09:41:06.020Z DEBUG nRFConnect path: C:\Users\brihos\AppData\Local\Programs\nrfconnect\resources\app.asar
    2024-05-22T09:41:06.020Z DEBUG HomeDir: C:\Users\brihos
    2024-05-22T09:41:06.020Z DEBUG TmpDir: C:\Users\brihos\AppData\Local\Temp
    2024-05-22T09:41:06.723Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.693Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.693Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.714Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:07.804Z INFO Using nrfutil-device core version: 7.7.1
    2024-05-22T09:41:08.395Z INFO Using nrfutil-device version: 2.1.1
    2024-05-22T09:41:08.395Z INFO Using nrf-device-lib version: 0.17.5
    2024-05-22T09:41:08.395Z INFO Using nrfjprog DLL version: 10.24.0
    2024-05-22T09:41:08.395Z INFO Using JLink version: JLink_V7.94e
    2024-05-22T09:41:08.762Z INFO Getting serialport options from persistent store 000683307548.pc-nrfconnect-programmer
    2024-05-22T09:41:08.762Z DEBUG Sending event "programmer: device connected"
    2024-05-22T09:41:15.263Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:16.613Z ERROR Error: Failed with exit code 1.
    Failed to device info one or more devices:
    * 683307548: [jlink] NO_EMULATOR_CONNECTED, code: Nrfjlink.
    Message: Operation device-info failed, [jlink] NO_EMULATOR_CONNECTED.
    2024-05-22T09:41:16.613Z INFO Using nrfutil device to communicate with target via JLink
    2024-05-22T09:41:16.633Z DEBUG Sending event "programmer: device selected"
    2024-05-22T09:41:16.633Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:16.946Z DEBUG Sending event "programmer: running nrfutil device"
    2024-05-22T09:41:19.854Z INFO Reading readback protection status for Application core
    2024-05-22T09:41:19.855Z ERROR Failed to reading readback protection status for application core core. Error: [object Object], message: Batch task protection-get failed, [jlink] NO_EMULATOR_CONNECTED
    2024-05-22T09:41:20.046Z ERROR Error: Failed with exit code 1.
    One or more batch tasks failed:
    - [jlink] NO_EMULATOR_CONNECTED, code: Nrfjlink.
    Message: Batch task protection-get failed, [jlink] NO_EMULATOR_CONNECTED.
    2024-05-22T09:41:20.046Z ERROR Error: Failed with exit code 1.
    One or more batch tasks failed:
    - [jlink] NO_EMULATOR_CONNECTED, code: Nrfjlink.
    Message: Batch task protection-get failed, [jlink] NO_EMULATOR_CONNECTED.

Children
No Data
Related