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 Children
  • Hi Travis,

    Could you then try downloading the nRF Connect for Desktop application?

    In this, you will find the "Toolchain manager" app:

    Please select the SDK version that you wish to download from within the Toolchain Manager:

    Once the installation is complete, please check whether VSCode again throws any problems.

    Regards,

    Priyanka

  • VSCode still will not run any nrf-connect commands after installing nRF Connect for Desktop. 

  • Did you install any SDK from the Toolchain Manager? Which SDK? Could you show the downloaded SDKs in your file path location?

    -Priyanka

  • Thank you Priyanka, I think you're narrowing down the issues. Please bear with my length response as I have several questions that other users may also be interested in.

    I have SDK 1.92 installed at c:\ncs as shown here:

    I think the problem is that I first started with SDK 2.x while following the "nRF Connect SDK Fundamentals" tutorial, but then had to switch to SDK 1.9.2 for a work project I inherited. The work project still uses Segger Embedded Studio for ARM that doesn't appear to play well with Nordic SDK 2.x, thus why we still use 1.x. I suspect the the nRF Connect for VS Code extension settings are now confused. What are best practices when needing to switch between 1.x SDK and 2.x? I suspect that one would need to manually update the extension settings when switching between 1.x and 2.x SDKs. 

    The instructions in "nRF Connect SDK Fundamentals" Lesson 1, Exercise 1 show instructions for both v2.x.x SDK install and v1.60-v1.9.1, however when following the  v1.60-v1.9.1 instructions, if you install the latest nRF Connect for Desktop app, the Toolchain Manager will only display SDKs to install for v2.x. What is the best method to install 1.x SDK packages? There is an "Install 1.x package from other source" option in the UI but it expects a Path to the package. Are there recommended instructions to install 1.x packages to use this option? 

    Instructions for 1.x SDK installation in the "nRF Connect SDK Fundamentals" tutorial recommend saving SDKs in folder "C:\nordicsemi", whereas the Toolchain Manager in the nRF for Desktop app defaults to "c:\ncs". Is the preferred practice to install 1.x SDKs in "C:\nordicsemi" and 2.x SDKs in "C:\ncs" and then change the nRF Connect for VS Code User extension settings when switching between the two? The instructions in "nRF Connect SDK Fundamentals" Lesson 1, Exercise 1 step 7.3 for SDK v1.6.0-v1.9.1 seem to be obsolete as latest nRF Connect for VS Code extension no longer show these settings in the extension:

    The new settings for the extension are this:

    These settings are critical for the extension to run commands such as "Manage SDKs", so mine are obviously incorrect currently as any command run from the extension throws an error indicating that it cannot run any "nrf-connect.x" commands:

    Any insights into proper extension settings when switching between 1.x and 2.x SDKs would be greatly appreciated. Thank you!

  • Hi Travis,

    I guess you are getting confused with everything, which I understand as there have been a lot of new changes within a very short period. I will try to explain everything to my best, in here. Please bear with me. Slight smile

    First, we will go through the installations. It's true that in case you are using the SES, then you need to have the SDK v1.x.x . But since you also need to work with the v2.x.x, it would be great if you install the "nRF Connect for Desktop" application (which you have already done).

    Within this, please select the Toolchain Manager and go to the "settings" on the top left. There, please de-select the following option:

    This will allow you to see all possible nRF Connect SDK versions in Toolchain Manager and you can manage them easily.

    Regarding the path location, it would be better if you could save all SDK versions in one place to avoid confusions. It can be either C:\ncs or C:\nordicsemi or C:\anything_of_your_choice. Just make sure that you have a small path length and not too lengthy ones, to avoid building errors related to this. This is how my path location looks like, for reference:

    Now, moving on to operating in the VSCode extension, as you had mentioned, the previous settings no longer exist, but the new ones are pretty user-friendly too. First, select the "Manage toolchains" option, followed by "set active toolchain":

    And this will allow you to select the required toolchain:

    The same applies for selecting SDK version too:

    Hope this helps. Slight smile

    Regards,

    Priyanka

Related