nRF Connect SDK always fails with error "not found"

I am trying to follow along the Nordic DevAcademy courses for nRF Connect SDK and have a problem properly setting up the nRF Connect SDK.

I did as requested and installed the 'nRF Connect SDK for VS Code Extension pack".

The installation went smooth and successful (i.e. toolchain is installed successfully)

Later on I am asked to install a nRF Connect SDK and choose v2.5.0. The extension started cloning the SDK into c:\ncs\v2.5.0 which took around 10 minutes (I watched a lot of GIT clones into that directory) and seemed to be finished successful from what  I saw (exit code 0 in the end) but I got the message "installation failed"and I cannot build anything.

I then retried the same with v2.4.2 and v2.4.1 but just received the same errors. All the folders are there in c:\ncs and have a size of > 1 GB.

I then tried doing it manually on the commandline:

nrfutil toolchain-manager launch --terminal
west init -m github.com/.../sdk-nrf --mr v2.5.0
west update
west zephyr-export


Everything ran smoothly.

Opening an application in VS Code just shows again:

"The nRF Connect SDK is required, but not found. Install the nRF Connect SDK".

For some reason the VS Code extension does not seem to consider the installations successfull, but I cannot see any reason why this is.

When I tried the option "Convert to West workspace" I am asked for the folder of my opened app (c:\nordic\ncs-fund\v2.x.x\lesson2\fund_less2_exer1 in this case)
and am again asked for the SDK version (selecting v2.5.0 here again)

Now I get the option to "Some workspace modules are missing or incomplete and must be updated. Run West update". When I choose this it's again cloning the SDK but this
time into the application directory (again 1GB) and this time everything is fine - but of course I don't want to have the SDK in every single application directory I develop/open.

What could be wrong here?

Looking at all the messages seen it seems as if I was not in a "West workspace" when I installed the SDKs but I can't say way, as I followed along all instructions very closely.

Any idea?


  • Maybe you can find this thread useful:
    No boards found in nRF Connect for VS Code

    It's not directly related, but I just noticed he wrote: "It works now. I have removed everything VS Code and nRF related in the Appdata directory."

    Kenneth

  • Didn't help... removed %APPDATA%\Code and nrf*, removed %USERHOME%\.vscode, reinstalled all extensions from scratch.

    Toolchain got successfully installed, tried to install SDK.... failed....

    Removed the SDK directory and tried to manually install:

    c:\Users\daubsi\.vscode\extensions\nordic-semiconductor.nrf-connect-2023.11.24-win32-x64\platform\nrfutil\bin>.\nrfutil-toolchain-manager.exe launch --terminal

    in new terminal:

    cd c:\ncs
    mkdir v2.5.0
    cd v2.5.0

    west init -m github.com/.../sdk-nrf --mr v2.5.0

    west update

    west zephyr-export

    It all went fine, but starting up VS Code again said "No SDK found"....

    I don't get it... what could be wrong? Where else could something be stored if not in the initially deleted directories? 

  • One suspecting windows registry permissions. west zephyr-export registers the SDK in the registry on Windows, same is also true for the toolchains. Could that be it?

    Kenneth

  • Hm, that's what I did as the last step (see above). If I remember correctly it wrote to something with "CMake" in the key name (not at PC right now)... Hm, I will check this. Thanks!
    So the very first time I install something it will write an initial key to that location, that's when "C:\ncs" is preset and all subsequent activities can then refer to that one (that's why I get c:\ncs offered as the default install path for the SDK once the toolchain is installed).... 

    What's really weird is that on the problematic PC the installation explicitly ends with "exit code 0, installation failed" after the git checkouts, whereas a 0 normally indicates success and I don't see the execution of "west zephy-export" ... hm... again, will follow up along the registry route!

  • Unfortunately this all looks correct... :-/

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\SOFTWARE\Kitware]
    
    [HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake]
    
    [HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages]
    
    [HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages\NcsToolchain]
    "2073ef81d18f343c09db6ca832d0447c"="C:/ncs/toolchains/c57af46cb7/cmake"
    
    [HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages\Zephyr]
    "87694d4b7ae596a17259a949445ed3b2"="C:/ncs/v2.4.2/zephyr/share/zephyr-package/cmake"
    "6c371fc2c9f6dea9b27f871b340743d9"="C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake"
    
    [HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages\ZephyrUnittest]
    "86d4bd571f44a996a306ef39d35a4803"="C:/ncs/v2.4.2/zephyr/share/zephyrunittest-package/cmake"
    "341012d60e50f627e8070edea583f2d9"="C:/ncs/v2.5.0/zephyr/share/zephyrunittest-package/cmake"
    
    

Related