nRF Connect Extension for VS Code Unable to run most commands

While following the "nRF Connect SDK Fundamentals" tutorial, my nRF Connect extension fails on the "Install Toolchain" step with error command 'nrf-connect.installToolchain' not found. I'm able to circumvent for now by using nRF Connect for Desktop and installing the toolchain with its Toolchain Manager, but still troubling that none of the commands seem to work directly from the VS Code nRF Connect extension. Nearly all nRF Connect commands similarly fail from VS Code including "Install SDK", "Manage Toolchains", "Check nRF Command Line Tools Update".

Any help to resolve would be greatly appreciated!

My setup:

  • Windows 10 64bit PC
  • VS Code v1.86.1
  • nRF Connect for VS Code Extension pack v2023.11.3
  • nRF Command Line tools v10.24.0
Parents Reply
  • Hi Travis, Priyanka,

    I have been looking through this thread as I'm having the same issues:

    1. Watching the "Zephyr and Nordic nRF Connect SDK - 01 Intro and Installation" video.
    2. Trying to run the install toolchain and from the button which doesn't work.
    3. Trying to manually run install toolchain and getting the same error message.
    4. Seeing that the three extensions above are not activate.

    I am running windows and ran the installer for nrf-command-line-tools-10.24.0-x64.exe and the command line tools were installed into C:\Program Files\Nordic Semiconductor\nrf-command-line-tools.

    Since this wasn't working I was going to try this manually.  I installed nrfconnect-setup-4.4.0-x64.exe (nRF Connect for Desktop v4.4.0).  I ran the GUI for this and installed the Toolchain Manger.  In my case this created c:\ncs.  My c:\nsc was empty since I haven't actually run the Toolchain Manger and hadn't previously installed any tools chains on this computer.

    I went back to VSCode and now magically rRF Connect for VS Code runtime status is activated.  If I click on Install Toolchain I now get the list of installable toolschains.

    I think what is happening is that the video is missing the step to install the Toolchain Manager.  Also it appears that the Extension Pack needs to have the Toolchain Manager installed before it will work.  Looks like nRF Connect for VS Code depends on this as well.

    I can now have VSCode download and install toolchains.  I suspect installing SDKs will work as well.

    Hope this helps.

    Lenny

Children
  • Thanks, Lenny!

    I first installed nRF Connect for Desktop v4.4.0 and then used its Toolchain Manager to install both the v1.9.1 and v2.5.2 SDKs as Priyanka described earlier in this thread, so my ncs folder looks like this:

    I'm wondering if, to follow what you did Lenny, I should have only installed the Toolchain Manager using nRF Connect for Desktop then immediately go to VS Code to see if the Toolchain Manager would work and let me install install SDKs directly from VS Code.

      if you think I should try a different order of installing dependencies could you please give guidance on how to properly uninstall what I have and the preferred order? I'm particularly curious how to clear out the existing Toolchain manager and SDKs in my ncs folder.

  • Hi,

    Yes that's indeed interesting. We could try a different order then. Could you try uninstalling everything from the control panel --> Program and features --> Uninstall a program

    and then select the nRF Connect for Desktop and uninstall it? 

    This should uninstall everything.

    Then you could once again try to install the nRF Connect for Desktop, followed by installing the Toolchain Manager and then from the Toolchain Manager try installing the SDK version that you want.

    Please try this and let's see how it goes for you.

    -Priyanka

  • I noticed that at some point after installing nRF Connect for Desktop, a new directory .nrfconnect-apps was created in my "home" directory (i.e. C:\Users\username\.nrfconnect-apps).  There is a bunch of stuff in there including node_modules which now has pc-nrfconnect-toolchain-manager.  My guess is that the VSCode extension needs this information to work. 

    Interestingly you can find code for all of the Desktop apps here (they start with pc- and pc-nrfconnect-launcher is the Desktop app).

  • I'm afraid I can only report what does not work so far as everything I've tried doesn't not seem to work. Here is are the steps I most recently took:

    1. Uninstall nRF for Desktop
    2. Delete ncs folder and its contents
    3. Uninstall nRF Connect for VS Code Extension Pack in VS Code
    4. Delete C:\Users\username\.nrfconnect.apps folder
    5. Delete all Nordic related folders in C:\Users\username\.vscode
    6. Install nRF Connect for Desktop 4.4.0
    7. Install nRF Connect for VS Code Extension Pack in VS Code
    8. nRF Connect for VS Code extension reports as not activated
    9. from nRF Connect for Desktop install Toolchain Manager
    10. nRF Connect for VS Code extension still reports as not activated and none of the nRF related commands in VS Code ("Install Toolchain", "Manage Toolchains, "Install SDK") work via button press or Command Palette  

    I also tried steps 1-5 and then starting by only installing the nRF Connect for VS Code Extension Pack in VS Code. This is in-line with the steps to install v2.x.x SDK in the "nRF Connect SDK Fundamentals" tutorial, Lesson 1 Exercise 1.  This also resulted in the results of step 10 where none of the extension commands work in VS Code. This is especially frustrating in that nothing in VS Code nRF Connect for FS Code works properly with a clean install. It seems that something installed during the many failed attempts to get this extension to work properly in VS Code is still lurking somewhere on my PC and interfering with proper operation. 

  • Hi,

    Could you try one more thing?

    1. Click on Help → Toggle Developer Tools (and then select Console, if that is not already open)
    2. In the command palette execute “Developer: Reload Window”
    3. Select “Manage Toolchains” again, to trigger the error notification.
    4. See whether any additional output appears in the developer console, which might tell us anything about why the extension did not activate correctly.

    This might tell us more about what the problem is.

    Regards,

    Priyanka

Related