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

nRF Connect VS Code extension no connected devices

Hello,

I recently installed the nRF Connect extension for VS Code on my Mac M1. I am unable to see my connected board as part of the nRF Connect extension.

Setup

  • nrfjprog version: 10.14.0 external
  • JLinkARM.dll version: 7.54c
  • M1 Macbook

Something odd I noticed is when I ran the nrfjprog command in the terminal I get:

nrfjprog --version --log
ERROR: [SeggerBackend] - The J-Link library does not support execution inside rosetta 2. Try executing with arch -arch arm64 nrfjprog...
ERROR: An internal error has occurred, please try again.

If I run with the suggested option then it completes successfully:

arch -arch arm64 nrfjprog -v
nrfjprog version: 10.14.0 external
JLinkARM.dll version: 7.54c

I am then also able to see the serial number of the debugger connected:

arch -arch arm64 nrfjprog --ids
683511319

Am I missing something in my VS Code setup? Is there a known issue with the VS Code extension on M1 mac?

Parents
  • I am on windows and experiencing a similar issue after switching to nrf connect extension.

    The "tools" in the json settings all show a null.

    Might help with debugging this issue

    After adding  

    "terminal.integrated.inheritEnv"false

    to my vsc setting.json I get :

    "tools": {
    "jlink": null,
    "nrfjprog": null,
    "cmake": "3.21.3",
    "west": "0.11.1",
    "python": "3.10.0",
    "ninja": "1.10.2",
    "gperf": "3.1",
    "dtc": null,
    "gnuarmemb": null,
    "gn": null
    },

    And connected devices show up but unable to flash since nrfjprog still isnt detected properly.

    Might be worth mentioning that the first flash with using the extension worked before changign vsc settings. Subsequent tries failed.

    EDIT:
    Reinstalling nrf connect and nrf terminal extensions in vsc fixed my issues on windows for now.

  • This is a different issue than the original poster and I have. Ours is caused by the fact that we are using MacBook M1 devices, and the toolchain has some components that do not work under the MacBook M1. We look forward to this being updated. -- Steve

  • I'm having the same problems on my M1 Mac Mini with VS Code extension. I can build the NCS project no problems but cannot connect to the development board. It is failing with a JLink error that it isn't able to find the connected board, but when I issue the same nrfjprog command from a zsh terminal it works fine. I can also read and write to the board using the nRF Connect Desktop Programmer App so it's not an issue with the M1 Mac. It's only having trouble within VS Code. -- Doug

  • You're in good company, Doug.  A few of us are raring to go with VS Code and our M1 Macs, but we're waiting for the good folks at Nordics to update the command line tools. 

    Bence on the Nordic VS Code team acknowledged this around October 1 2021, thankfully. 

    Thanks for pointing out that using nrfjprog could be a simple workaround in the mean time. 

    Best, Steve

Reply
  • You're in good company, Doug.  A few of us are raring to go with VS Code and our M1 Macs, but we're waiting for the good folks at Nordics to update the command line tools. 

    Bence on the Nordic VS Code team acknowledged this around October 1 2021, thankfully. 

    Thanks for pointing out that using nrfjprog could be a simple workaround in the mean time. 

    Best, Steve

Children
Related