nrfutil: Error: Failed to find default toolchain

I'm using nrf SDK v2.4.1, when I use "nrfutil toolchain-manager  list" command I get the below 

However when I try to use command like launch or env, I got the below:

Also from vs code extension, when I try to use the Manage toolchains button, I got the below error

Any Idea how to fix this?

Parents
  • Hello,

    I spoke to the team who develops nrfutil, and they wrote the following:

    ------------------------

    The default version of the nrfutil toolchain should have an asterix in front of it when you use nrfutil toolchain-manager list. The user doesn't have that, so I believe they do not have a default toolchain set. It seems like the nrfutil toolchain version that you install latest is always the default version. If you install a new (or old) version, and then uninstall it, there is no mechanism to set another version to the default version. 

    Two ways of fixing this:

    -When running things like launch or env, you can specify the version of the toolchain to use. E.g. run "nrfutil toolchain-manager launch --ncs-version v2.4.1 --terminal"

    -you can issue to install the already installed toolchain, v2.4.1. It will say that it is already installed, but after this it wil set v2.4.1 as the default version again.

    ------------------------

    Can this be the case, that you installed another version at some point?

    Can you try to run "nrfutil toollchain-manager install --ncs-version v2.4.1", and then "nrfutil toolchain-manager list" to see if it now has an asterix in front of " * v2.4.1"?

    Best regards,

    Edvin

  • Hi,

    When I posted the problem, I had only one toolchain installed, but after I posted the issue I was trying to find a fix by installing different versions.

    I tried the second solution to reinstall the same version. Now I see the asterix right next to v2.4.1

    even after this, I'm still getting the below error, when I try the Manage toolchains button on the UI

    However the "nrfutil toolchain-manager launch --terminal" command now doesn't throw the error, It didn't launch the terminal. When I try west command it fails.

  • Based on the title of the post my understanding was, that you wanted to make `nrfutil` run. And that seems to work now?!?

    But while `nrfutil` is a command line tool and only partially connected to the VS Code extension, my understanding now is that your actual goal is to make “nRF Connect for VS Code” work correctly for you? (I don't have the impression that why `nrfutil` didn't work before and why some things in the VS Code extension do not work correctly for you have are related to one root case.)

    If this really is about “nRF Connect for VS Code” then please provide more information about that: Which version of VS Code and the VS Code extension are you using? Did you try to reinstall the VS Code extension and restart VS Code after that? 

  • It occurs to me now that you are trying to use this from the terminal inside VS Code. Is that necessary? You know that you can use the IDE itself to build and flash, right?

    You can use nrfutil if you want to build in a terminal outside of VS Code, such as in a normal cmd window in Windows.

    I am not able to build from the terminal inside VS Code either (but I guess I never tried it). 

    So if you want to set up your environment in a terminal outside VS Code, you can use nrfutil toolchain-manager.

    Disclaimer:

    I still use the "old" environment workaround to set up the environment, becuase I find it more convenient. In nRF Connect for Desktop -> Toolchain Manager, you can download and install the different NCS versions. There you can also "Generate environment scripts". This generates a file called "env.cmd". If you save the file to a folder in your environment path, you can call this file from any terminal, and it will set up the environment in that terminal. 

    Best regards,

    Edvin

  • my goal is to get nrfutil to work and VS Code extension as well. I was under the impression that both issues related, but you are the expert :D 

    Now nrfutil works fine.

    For VS Code extenstion, yes I tried to re-install and close/open VS Code, but this didn't help.

    The extension currently works fine for build and flashing, but it doesn't work for manage toolchains, manage west workspace and debugging. 

    Actually the most important feature missing is the debugging.

    Here is the extension details:

  • I have a problem with the toolchain manager, it doesn't open. Do I need to modify any folder paths in the extension settings to get it to work. I installed the ncs folder in C:/ as recommended.

    For the environment file, what is the usage of this file. Is this to call west from terminal?

  • Ahmed Samir said:
    I have a problem with the toolchain manager

    Are you talking about the nrfutil toolchain-manager, or the nRF Connect for Desktop -> Toolchain manager now? If it is the desktop tool, try opening it as administrator, or try to move it down a folder or two, such as C:/nordic/ncs

    The environment file is used to call west from a terminal, yes. It sets all the paths for the tools in your terminal.

    BR,
    Edvin

Reply
  • Ahmed Samir said:
    I have a problem with the toolchain manager

    Are you talking about the nrfutil toolchain-manager, or the nRF Connect for Desktop -> Toolchain manager now? If it is the desktop tool, try opening it as administrator, or try to move it down a folder or two, such as C:/nordic/ncs

    The environment file is used to call west from a terminal, yes. It sets all the paths for the tools in your terminal.

    BR,
    Edvin

Children
No Data
Related