Getting started with vscode in Linux toolchain not found

System details:

- Ubuntu Linux version 20.04.5 LTS
- nRF Connect for Desktop v3.12.0
- Toolchain Manager v1.2.1
- NCS v2.2.0
- Visual Studio Code 1.74.3

I want to get started with Visual Studio Code and NCS 2. I found a guide on youtube that I followed:
https://www.youtube.com/watch?v=zcMCaODyISo

Because I had installed vscode before, I never got it to work and the forum suggested to uninstall everything before trying again I performed the following actions:
- removed all NCS versions
- uninstalled Visual Studio Code
- uninstalled nRF connect
- restarted my computer

Then I followed the steps in the video. The video suggests that it works on any operating system.

I installed the nRF Connect and installed the Toolchain Manager.
I installed NCS v2.2.0
From the Toolchain manager I started vscode, which was not installed.
After installing vscode I installed all the plugins.
Then the video suggest to go to the nRF welcome page and select the correct toolchain.

But I cannot change the toolchain, instead it's set to version 2.0.2, which is not installed?!

And there is a message saying:
An SDK is already selected in this workspace, so another cannot be selected.

I don't see an option to close the workspace or to create a new workspace.
But in the explorer I do not see a workspace. so I don't understand the error message?

I also tried copying blinky example to a new directory, then choose file - open folder - blinky. But I still cannot change the toolchain.

Parents Reply Children
  • And when you select the v2.2.0, do you still get the loading.... problem ?

  • Most of the time I get loading problems, I tried a few times until I no longer got loading problems.

    Then I created build configuration for my Nordic DK and I got the following error message:

    I also attach it as text so it's searchable:

     *  Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for /home/ephimee/vscode/blinky 
    
    Building blinky
    west build --build-dir /home/ephimee/vscode/blinky/buildDK /home/ephimee/vscode/blinky --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/ephimee/vscode/blinky
    -- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
    -- Cache files will be written to: /home/ephimee/.cache/zephyr
    -- Zephyr version: 3.2.99 (/home/ephimee/ncs2/v2.2.0/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    CMake Error at /home/ephimee/ncs2/v2.2.0/zephyr/cmake/modules/FindZephyr-sdk.cmake:63 (find_package):
      Could not find a configuration file for package "Zephyr-sdk" that is
      compatible with requested version "0.15".
    
      The following configuration files were considered but not accepted:
    
        /home/ephimee/zephyr-sdk-0.14.2/cmake/Zephyr-sdkConfig.cmake, version: 0.14.2
        /home/ephimee/zephyr-sdk-0.12.4/cmake/Zephyr-sdkConfig.cmake, version: 0.12.4
        /home/ephimee/zephyr-sdk-0.11.4/cmake/Zephyr-sdkConfig.cmake, version: 0.11.4
    
    Call Stack (most recent call first):
      /home/ephimee/ncs2/v2.2.0/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package)
      /home/ephimee/ncs2/v2.2.0/zephyr/cmake/modules/dts.cmake:8 (find_package)
      /home/ephimee/ncs2/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
      /home/ephimee/ncs2/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      /home/ephimee/ncs2/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:4 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: /home/ephimee/.local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/ephimee/vscode/blinky/buildDK -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -S/home/ephimee/vscode/blinky
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    
    

    Do I need to install the zephyr SDK manually? It's not part of the installation guide.

  • It shows Zephyr_SDK 0.15 not found. Could you try following this guide to install and then try again to build?

Related