I followed the different guides to install zephyr, nordic toolchain and nRF Connect SDK for VS Code, but I am unable to compile the RGB_LED sample program for my thingy:91 device.
I could compile and run hello world program, although I can not see any traffic in the serial monitor.
I tried so many things that I have lost track of the status of my VSCode install.
- I am running kubuntu 22.04, not tested according the instructions, but this is the last LTS (Long Term Support), and it is very much in use in 2023.
- The python version at the host level is python3.10, but I installed python3,.8 using the deadsnake repositories
- I followed the video guide, this it means, I installed nRF Connect for Desktop, the Toolchain Manager, and the nRF Connect SDK (v2.2.0 and v2.3.0 recently released), VSCode and all the different nRF plugings, the JLink softwre and the nrf-command-line-tools.
- I am creating a freestanding application based on zephyr/samples/hello_world, which generates de signed_app.hex firmware, and then zephyr/sample/basic/rgb_led, but I can not compile it.
This is the specific error I am getting if I compile from the command line using west:
quino@Quino:~/ncs/v2.3.0/zephyr/samples/hello_world$ west build -b nrf9160dk_nrf9160_ns -- west build: generating a build system Loading Zephyr default modules (Zephyr base (cached)). -- Application: /home/quino/ncs/v2.3.0/zephyr/samples/hello_world -- Using NCS Toolchain 2.3.0 for building. (/home/quino/ncs/toolchains/v2.3.0/cmake) -- Cache files will be written to: /home/quino/.cache/zephyr -- Zephyr version: 3.2.99 (/home/quino/ncs/v2.3.0/zephyr) -- Found west (found suitable version "1.0.0", minimum required is "0.7.1") -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0 CMake Error at /home/quino/ncs/v2.3.0/zephyr/cmake/modules/FindZephyr-sdk.cmake:56 (find_package): Could not find a package configuration file provided by "Zephyr-sdk" (requested version 0.15) with any of the following names: Zephyr-sdkConfig.cmake zephyr-sdk-config.cmake Add the installation prefix of "Zephyr-sdk" to CMAKE_PREFIX_PATH or set "Zephyr-sdk_DIR" to a directory containing one of the above files. If "Zephyr-sdk" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /home/quino/ncs/v2.3.0/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package) /home/quino/ncs/v2.3.0/zephyr/cmake/modules/dts.cmake:8 (find_package) /home/quino/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include) /home/quino/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) /home/quino/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate) CMakeLists.txt:5 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /home/quino/.local/bin/cmake -DWEST_PYTHON=/usr/bin/python3.8 -B/home/quino/ncs/v2.3.0/zephyr/samples/hello_world/build -GNinja -S/home/quino/ncs/v2.3.0/zephyr/samples/hello_world
And this is the last lines of the OUTPUT Terminal inside VS-Code:
/home/quino/Documents/Sm4rtB10S1st3m/Nordic_Test/rgb_led/src/main.c:21:9: note: in expansion of macro 'PWM_DT_SPEC_GET' 21 | PWM_DT_SPEC_GET(DT_ALIAS(blue_pwm_led)); | ^~~~~~~~~~~~~~~ /home/quino/ncs/v2.3.0/zephyr/include/zephyr/devicetree.h:230:25: note: in expansion of macro 'DT_CAT' 230 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias) | ^~~~~~ /home/quino/Documents/Sm4rtB10S1st3m/Nordic_Test/rgb_led/src/main.c:21:25: note: in expansion of macro 'DT_ALIAS' 21 | PWM_DT_SPEC_GET(DT_ALIAS(blue_pwm_led)); | ^~~~~~~~ ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: /home/quino/ncs/toolchains/v2.3.0/usr/local/bin/cmake --build /home/quino/Documents/Sm4rtB10S1st3m/Nordic_Test/rgb_led/build
This is the output generated using the Generate Support Information
For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/. { "platform": { "os": "linux", "osVersion": "#36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2", "osKernel": "5.19.0-35-generic", "vscode": "1.76.0", "electron": "19.1.11", "node": "v16.14.2" }, "system": { "date": "2023-03-14T21:42:30.261Z", "vscodeRoot": "/usr/share/code/resources/app", "nrfConnectForDesktopInstalled": "unknown", "vscodeUptime": "01:16:40", "osUptime": "29:01:30", "cpu": { "model": "Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz", "speed": "1901 MHz", "count": 2 }, "memory": { "total": "7.65 GB", "free": "1.78 GB" } }, "workspace": { "name": "Untitled (Workspace)", "workspaceFile": "1678702149315", "folders": [ "/home/quino/Documents/Sm4rtB10S1st3m/Nordic_Test/hello_world", "/home/quino/Documents/Sm4rtB10S1st3m/Nordic_Test/rgb_led" ] }, "extensions": { "internal": { "nordic-semiconductor.nrf-connect": { "version": "2023.2.56", "path": "/home/quino/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.2.56-linux-x64", "isActive": true }, "nordic-semiconductor.nrf-terminal": { "version": "2022.11.29", "path": "/home/quino/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.11.29", "isActive": true }, "nordic-semiconductor.nrf-devicetree": { "version": "2022.11.153", "path": "/home/quino/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2022.11.153", "isActive": true }, "nordic-semiconductor.nrf-kconfig": { "version": "2022.11.50", "path": "/home/quino/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2022.11.50", "isActive": true } }, "external": { "marus25.cortex-debug": "1.10.0", "ms-vscode.cpptools": null, "ms-vscode.js-debug": "1.76.0", "ms-vscode.js-debug-companion": "1.0.18", "ms-vscode.vscode-js-profile-table": "1.0.3", "eamodio.gitlens": "13.3.2", "mcu-debug.debug-tracker-vscode": "0.0.14", "mcu-debug.memory-view": "0.0.20", "mcu-debug.rtos-views": "0.0.6", "ms-azuretools.vscode-docker": "1.24.0", "redhat.vscode-yaml": "1.12.1", "trond-snekvik.gnu-mapfiles": "1.1.0", "twxs.cmake": "0.0.17" } }, "tools": { "/home/quino/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.15.2", "/opt/SEGGER/JLink/JLinkExe": "7.86a", "/usr/local/bin/nrfjprog": "10.19.0", "nrfutil": "Not found", "/home/quino/ncs/toolchains/v2.3.0/usr/local/bin/cmake": "3.20.5", "/home/quino/ncs/toolchains/v2.3.0/usr/local/bin/west": "0.14.0", "/home/quino/ncs/toolchains/v2.3.0/usr/local/bin/python3": "3.8.2", "/home/quino/ncs/toolchains/v2.3.0/usr/local/bin/ninja": "1.9.0", "/home/quino/ncs/toolchains/v2.3.0/usr/bin/gperf": "3.1", "/home/quino/ncs/toolchains/v2.3.0/usr/bin/dtc": "1.4.7", "/home/quino/ncs/toolchains/v2.3.0/opt/bin/gn": "1871", "/home/quino/ncs/toolchains/v2.3.0/usr/local/bin/git": "2.37.3", "gdbPath": "/home/quino/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb" }, "sdks": [ { "version": "2.3.0", "path": "/home/quino/ncs/v2.3.0" }, { "version": "2.2.0", "path": "/home/quino/ncs/v2.2.0" } ], "toolchains": [ { "version": "2.2.0", "path": "/home/quino/ncs/toolchains/v2.2.0" }, { "version": "2.3.0", "path": "/home/quino/ncs/toolchains/v2.3.0" } ], "connectedDevices": [], "deviceProviders": [ "nrfjprog" ], "config": { "nordic-semiconductor.nrf-connect": { "topdir": "${nrf-connect.sdk:2.3.0}", "toolchain": { "path": "${nrf-connect.toolchain:2.3.0}" }, "ozonePath": "", "applications": [ "${workspaceFolder}/blinky", "/home/quino/Documents/Sm4rtB10S1st3m/Nordic_Test/rgb_led", "${workspaceFolder}" ], "applicationOptions": {}, "kconfig": { "interface": "kconfig", "executeInDefaultShell": false }, "welcome": { "showOnStartup": true }, "west": { "env": { "$base": "terminal" } }, "boardRoots": [], "enableTelemetry": true, "taskBindings": {}, "debugging": { "backend": "nRF Debug", "flash": true, "bindings": {} }, "activeAppFollowActiveEditor": true }, "nordic-semiconductor.nrf-terminal": { "terminalMode": "character", "scrollBack": 1000 }, "marus25.cortex-debug": { "armToolchainPath": null, "armToolchainPrefix": "arm-none-eabi", "gdbPath": null, "objdumpPath": null, "JLinkGDBServerPath": null, "openocdPath": null, "pyocdPath": null, "PEGDBServerPath": null, "stutilPath": null, "stlinkPath": null, "stm32cubeprogrammer": null, "enableTelemetry": true, "registerUseNaturalFormat": true, "variableUseNaturalFormat": true, "dbgServerLogfile": null, "showDevDebugOutput": "none" } }, "environment": { "westExe": "west", "westEnv": { "ELECTRON_RUN_AS_NODE": "1", "GIT_EXEC_PATH": "/home/quino/ncs/toolchains/v2.3.0/usr/lib/git-core", "HOME": "/home/quino", "PATH": "/home/quino/ncs/toolchains/v2.3.0/usr/bin:/home/quino/ncs/toolchains/v2.3.0/usr/local/bin:/home/quino/ncs/toolchains/v2.3.0/opt/bin:/home/quino/ncs/toolchains/v2.3.0/opt/nanopb/generator-bin:/home/quino/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin:/home/quino/ncs/toolchains/v2.3.0/arm-zephyr-eabi/bin:/home/quino/.local/bin:/home/quino/ncs/v2.3.0/zephyr/scripts:/home/quino/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", "ZEPHYR_BASE": "/home/quino/ncs/v2.3.0/zephyr", "GNUARMEMB_TOOLCHAIN_PATH": "/opt", "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr", "ZEPHYR_SDK_INSTALL_DIR": "/home/quino/ncs/toolchains/v2.3.0/opt/zephyr-sdk", "PYTHONPATH": "/home/quino/ncs/toolchains/v2.3.0/usr/local/lib/python3.8/site-packages", "USER": "quino" }, "inherited": { "ELECTRON_RUN_AS_NODE": "1", "HOME": "/home/quino", "PATH": "/home/quino/.local/bin:/home/quino/ncs/v2.3.0/zephyr/scripts:/home/quino/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", "ZEPHYR_BASE": "/home/quino/ncs/v2.3.0/zephyr", "GNUARMEMB_TOOLCHAIN_PATH": "/opt", "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb", "PYTHONPATH": "/usr/lib/python3.8", "USER": "quino" }, "toolchainPath": "/home/quino/ncs/toolchains/v2.3.0", "toolchainBinPath": "/home/quino/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin", "toolchainVersion": "2.3.0" }, "terminal": { "shell": null, "defaultProfile": null } }
Can you please hep me to finish the configuration, or rebuild my VSCode?
Why can I compile the hello world example, but not the rgb_led one?