Hi,
I installed nRF Connect SDK manually by following the instruction in this page. I had 2 problems but I did a trick and it seems it solved for now. However I need to know for the future.
OS: Ubuntu 22.04
ncs: In home directory and the structure is lie below.
ncs |___ .west |___ bootloader |___ modules |___ nrf |___ nrfxlib |___ zephyr |___ ...
SDK: In home directory with the name like zephyr-sdk-0.14.1 and also isntalled 0.15.1 at the same time. However VSCode has given an error that v2.2.0 requires zephyr-sdk-0.15.1. It couldn't detect automatically. I have checked the $PATH env. var. There is no toolchain variable in it, but I don't understand how VScode can find 0.14.1. Anyway I renamed folders 0.14.1 to 0.15.1 and 0.15.1 to 0.14.1. Now VSCode doesn't give any error and it accepts. It seems that this problem has been solved temporarily.
The setting VSCode extention:
nRF Connect SDK: 2.2.0 (/home/soz/ncs) => as detected
nRF Connect Toolchain: PATH (Zephyr SDK: /home/soz/zephyr-sdk-0.14.1) => as detected. 0.15.1 couldn't detected so as mentioned above renamed folder.
Output of PATH env.
soz@salihonur-lnx:~/ncs/zephyr$ echo $PATH /home/soz/ncs/zephyr/scripts:/home/soz/.local/bin:/home/soz/gn:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/soz/nRF52/gcc-arm/bin soz@salihonur-lnx:~/ncs/zephyr$
Output of ZEPHYR_BASE variable:
soz@salihonur-lnx:~$ echo $ZEPHYR_BASE soz@salihonur-lnx:~$ cd ncs/zephyr/ soz@salihonur-lnx:~/ncs/zephyr$ source zephyr-env.sh soz@salihonur-lnx:~/ncs/zephyr$ echo $ZEPHYR_BASE /home/soz/ncs/zephyr soz@salihonur-lnx:~/ncs/zephyr$ echo $BOARD soz@salihonur-lnx:~/ncs/zephyr$ echo $CONF_FILE soz@salihonur-lnx:~/ncs/zephyr$ echo $DTS_OVERLAY_FILE
Error of compling "blinky" example in VSCode:
Building blinky west build --build-dir /home/soz/ELEKTRONIK/Test/blinky/build_1 /home/soz/ELEKTRONIK/Test/blinky --pristine --board nrf52840dongle_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONF_FILE:STRING="/home/soz/ELEKTRONIK/Test/blinky/prj.conf" -- west build: generating a build system STATUS,XXXXX: Loading Zephyr default modules (Zephyr base). -- Application: /home/soz/ELEKTRONIK/Test/blinky -- Found Python3: /usr/bin/python3.10 (found suitable exact version "3.10.6") found components: Interpreter -- Cache files will be written to: /home/soz/.cache/zephyr -- Zephyr version: 3.2.99 (/home/soz/ncs/zephyr) -- Found west (found suitable version "0.14.0", minimum required is "0.7.1") -- Board: nrf52840dongle_nrf52840 -- Found host-tools: zephyr 0.15.1 (/home/soz/zephyr-sdk-0.14.1) -- Found toolchain: zephyr 0.15.1 (/home/soz/zephyr-sdk-0.14.1) -- Found Dtc: /home/soz/zephyr-sdk-0.14.1/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (Required is at least version "1.4.6") -- Found BOARD.dts: /home/soz/ncs/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts -- Generated zephyr.dts: /home/soz/ELEKTRONIK/Test/blinky/build_1/zephyr/zephyr.dts -- Generated devicetree_generated.h: /home/soz/ELEKTRONIK/Test/blinky/build_1/zephyr/include/generated/devicetree_generated.h -- Including generated dts.cmake file: /home/soz/ELEKTRONIK/Test/blinky/build_1/zephyr/dts.cmake CMake Error at /home/soz/ncs/zephyr/cmake/modules/dts.cmake:308 (message): command failed with return code: No such file or directory Call Stack (most recent call first): /home/soz/ncs/zephyr/cmake/modules/zephyr_default.cmake:108 (include) /home/soz/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:67 (include) /home/soz/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:93 (include_boilerplate) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /home/soz/.local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/soz/ELEKTRONIK/Test/blinky/build_1 -GNinja -DBOARD=nrf52840dongle_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONF_FILE:STRING=/home/soz/ELEKTRONIK/Test/blinky/prj.conf -S/home/soz/ELEKTRONIK/Test/blinky
Questions:
- I guess the compiler can't find PATH variables. Only ZEPHYR_BASE variable comes if "source zephyr-env.sh" is executed. What are the default location of these variables below? I can define them manually.
- BOARD
- CONF_FILE
- SHIELD
- ZEPHYR_BASE
- ZEPHYR_EXTRA_MODULES
- ZEPHYR_MODULES
- ZEPHYR_BOARD_ALIASES
- ZEPHYR_SDK_INSTALL_DIR
- ZEPHYR_TOOLCHAIN_VARIANT
- {TOOLCHAIN}_TOOLCHAIN_PATH
- Where can I change the toolchain path?






