After installing SDK 2.7 I am unable to get nRF Connect SDK to function in VS Code.

After I installed nRF Connect SDK 2.7 and tried to run the pre-release version of VS Code extension, I am now compleatly unable to make nRF Connect for VS Code function. 

When using the menu to select toolchains, I get nothing to select installed SDK or toolchain. I see an error dispolayed by VS Code "command 'nrf-connect.mangeWestWorkspace' not found" or "command 'nrf-connect.mangeToolchains' not found".

I have uninstalled everything two times (both VS Code extensions (all) and the SDK and reinstalled again. One time from within VS Code extension and one time through the nRF Connect for Desktop Toolchain Manager.

None of the reinstallation have brought my installation back to a functional state.

I am sure it is a simple thing, but I do not know where to look....

  • I have an installation now where I only have SDK 2.6.1 installed. I was hoping that it would work even if I cant change toolchain or SDK. But that is not the case. Just creating a new application based on the hallo_world sample wont build succesfully.

    The result below is from creating a new application selecting a nRF board and building...

    [proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --version
    [proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E capabilities
    [variant] Loaded new set of variants
    [kit] Successfully loaded 9 kits from C:\Users\ThomasMaltesen\AppData\Local\CMakeTools\cmake-tools-kits.json
    [proc] The command: ninja --version failed with error: Error: spawn ninja ENOENT
    [proc] The command: ninja-build --version failed with error: Error: spawn ninja-build ENOENT
    [main] Configuring project: hello_world_1
    [proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -SD:/Workspaces/hello_world_1 -Bd:/Workspaces/hello_world_1/build -G "Unix Makefiles"
    [cmake] Not searching for unused variables given on the command line.
    [cmake] Loading Zephyr default modules (Freestanding).
    [cmake] -- Application: D:/Workspaces/hello_world_1
    [cmake] -- CMake version: 3.28.3-msvc11
    [cmake] -- Using NCS Toolchain 2.6.20240304.889616714482 for building. (D:/ncs/toolchains/cf2149caf2/cmake)
    [cmake] -- Found Python3: D:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    [cmake] -- Cache files will be written to: D:/ncs/v2.6.1/zephyr/.cache
    [cmake] -- Zephyr version: 3.5.99 (D:/ncs/v2.6.1/zephyr)
    [cmake] -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    [cmake] CMake Error at D:/ncs/v2.6.1/zephyr/cmake/modules/extensions.cmake:2891 (message):
    [cmake]   BOARD is not being defined on the CMake command-line, in the environment or
    [cmake]   by the app.
    [cmake] Call Stack (most recent call first):
    [cmake]   D:/ncs/v2.6.1/zephyr/cmake/modules/boards.cmake:56 (zephyr_check_cache)
    [cmake]   D:/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
    [cmake]   D:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    [cmake]   D:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:159 (include_boilerplate)
    [cmake]   CMakeLists.txt:5 (find_package)
    [cmake]
    [cmake]
    [cmake] -- Configuring incomplete, errors occurred!
    [proc] The command: "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE --no-warn-unused-cli -SD:/Workspaces/hello_world_1 -Bd:/Workspaces/hello_world_1/build -G "Unix Makefiles" exited with code: 1
  • Hello,

    Could you tell me which OS  and version you are working with? Were you able to generate support information from VS Code? I recommend sharing the support information here. There are some issues with NCS v2.7.0 and the VS Code extension, as indicated by the "experimental support" tag in VS Code, but it should work out of the box.

    Kind regards,

    Abhijith

  • Im running Windows 11, build 26257 and VS Code is 1.91.1.

    The "generate support information", is that a nRF thing? I do not find that command...

    I have compleatly removed all 2.7 and is not running the prerelease anymore. But still it somehow killed my installation.

Related