NCS toolchain path missing in VSCode

I followed the directions/videos to install the nRF development environment for VSCode on a Windows machine: https://www.youtube.com/playlist?list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl

I created the Blinky example and it compiled and ran on the nRF52840 Development Kit.

I then tried to build the peripheral_lbs example and ran into errors.

The path in the VSCode Terminal doesn't include all the paths for the nRF toolchain. This is what I find in VSCode Terminal:

C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\

If I go to Toolchain Manger::nRF Connect SDK v2.10::Open command prompt. This is what I get:

C:\Depot\Source\Library\ncs\toolchains\v2.1.0
C:\Depot\Source\Library\ncs\toolchains\v2.1.0\mingw64\bin
C:\Depot\Source\Library\ncs\toolchains\v2.1.0\bin
C:\Depot\Source\Library\ncs\toolchains\v2.1.0\opt\bin
C:\Depot\Source\Library\ncs\toolchains\v2.1.0\opt\bin\Scripts
C:\Depot\Source\Library\ncs\toolchains\v2.1.0\nanopb\generator-bin
C:\Depot\Source\Library\ncs\toolchains\v2.1.0\opt\zephyr-sdk\arm-zephyr-eabi\bin
Q: How do I fix the nRF Connect VSCode environment to have the same path as that from the Toolchain Manager?
  • Hi, 

    Sorry for the delay. The team can't reproduce the errors, however, they are all cmake related and apart from the last minor one they are reported by the cmake extension (we don't control them). The error message is curious though: BOARD is not being defined on the CMake command-line in the environment or by the app. A build cannot be generated by west on the command line without specifying a valid board, and neither it is possible within VS Code (that also just calls west). I'd say these are stale reports and they can be ignored, otherwise, it would be nice to know the exact steps to reproduce.

    Regards,
    Amanda H.

Related