These are the details of my system:
- Ubuntu 20.04.5 LTS
- nRF Connect for Desktop v3.12.0
- Toolchain Manager v1.2.1
- Visual Studio Code 1.73.1
- NCS 2.1.2
If I start Visual Studio Code from the Nordic Toolchain Manager, the global environment variable ZEPHYR_TOOLCHAIN_VARIANT is set to the value "zephyr".
This setting causes my project to not compile.
I also tried to set the correct ZEPHYR_TOOLCHAIN_VARIANT in the file ~/.zephyrrc:
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
My workaround is not to start Visual Studio Code from the Toolchain Manager.
Instead set all environment settings manually before starting Visual Studio Code:
export ZEPHYR_BASE="/home/ephimee/ncs2/v2.1.2/zephyr" export BOARD_ROOT=/home/ephimee/git/myproject
export BOARD=nrf52840dk_nrf52840
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
code
A few questions:
- why does Toolchain Manager set ZEPHYR_TOOLCHAIN_VARIANT to the value "zephyr"?
- can you provide a list of all environment settings the Toolchain Manager sets before running Visual Studio Code?
- which script is executed by the Toolchain Manager before running Visual Studio Code?
- is this a bug?