Hello everyone,
I'm having some issues working with the nRF Connect for VS Code extension in combination with the nrf_desktop application demo from the nRF Connect SDK.
When I use the default project configuration (prj.conf) the extension works fine but when I use e.g. the prj_dongle.conf I have this issues:
- Pristine build doesn't work when I add the prj*.conf with "Extra CMake arguments". It seems like that the west build command that is called by the extension uses an empty string instead of the project configuration I configured. This is the build log when I try to do a pristine build:
Building nrf_desktop_demo west build --build-dir d:\dev\_temp_projects\nrf_desktop_demo\build_dongle d:\dev\_temp_projects\nrf_desktop_demo --pristine --board nrf52840dk_nrf52840 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONF_FILE:STRING="" -DDTC_OVERLAY_FILE:STRING="d:/dev/_temp_projects/nrf_desktop_demo/configuration/nrf52840dk_nrf52840/app.overlay" -- west build: generating a build system Including boilerplate (Zephyr base): C:/dev/NordicSemi/ncs/v1.9.0/zephyr/cmake/app/boilerplate.cmake -- Application: D:/dev/_temp_projects/nrf_desktop_demo -- Zephyr version: 2.7.99 (C:/dev/NordicSemi/ncs/v1.9.0/zephyr), build: v2.7.99-ncs1 -- Found Python3: C:/dev/NordicSemi/ncs/v1.9.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter -- Found west (found suitable version "0.12.0", minimum required is "0.7.1") -- Board: nrf52840dk_nrf52840 -- Cache files will be written to: C:/dev/NordicSemi/ncs/v1.9.0/zephyr/.cache -- Found dtc: C:/dev/NordicSemi/ncs/v1.9.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") -- Found toolchain: gnuarmemb (c:/dev/NordicSemi/ncs/v1.9.0/toolchain/opt) -- Found BOARD.dts: C:/dev/NordicSemi/ncs/v1.9.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts -- Found devicetree overlay: d:/dev/_temp_projects/nrf_desktop_demo/configuration/nrf52840dk_nrf52840/app.overlay -- Generated zephyr.dts: D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/zephyr/zephyr.dts -- Generated devicetree_unfixed.h: D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/zephyr/include/generated/devicetree_unfixed.h -- Generated device_extern.h: D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/zephyr/include/generated/device_extern.h -- Including generated dts.cmake file: D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/zephyr/dts.cmake Parsing D:/dev/_temp_projects/nrf_desktop_demo/Kconfig Loaded configuration 'C:/dev/NordicSemi/ncs/v1.9.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig' Configuration saved to 'D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/zephyr/.config' Kconfig header saved to 'D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/zephyr/include/generated/autoconf.h' -- The C compiler identification is GNU 9.2.1 -- The CXX compiler identification is GNU 9.2.1 -- The ASM compiler identification is GNU -- Found assembler: C:/dev/NordicSemi/ncs/v1.9.0/toolchain/opt/bin/arm-none-eabi-gcc.exe CMake Error at C:\dev\NordicSemi\ncs\v1.9.0\zephyr\cmake\extensions.cmake:2030 (message): Assertion failed: HID report descriptor file must be specified Call Stack (most recent call first): d:\dev\_temp_projects\nrf_desktop_demo\build_dongle\CMakeLists.txt:29 (assert) -- Configuring incomplete, errors occurred! See also "D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/CMakeFiles/CMakeOutput.log". See also "D:/dev/_temp_projects/nrf_desktop_demo/build_dongle/CMakeFiles/CMakeError.log". FATAL ERROR: command exited with status 1: 'c:\dev\NordicSemi\ncs\v1.9.0\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\dev\NordicSemi\ncs\v1.9.0\toolchain\opt\bin\python.exe' '-Bd:\dev\_temp_projects\nrf_desktop_demo\build_dongle' '-Sd:\dev\_temp_projects\nrf_desktop_demo' -GNinja -DBOARD=nrf52840dk_nrf52840 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONF_FILE:STRING= -DDTC_OVERLAY_FILE:STRING=d:/dev/_temp_projects/nrf_desktop_demo/configuration/nrf52840dk_nrf52840/app.overlay
- The Kconfig window in the VS Code extension doesn't open when I add the prj*.conf with "Extra CMake arguments". No errors are popping up or shown in the terminal.
I also tried the guiconfig option but that gave me an error although the same west build command call worked when I manually copied the line into the terminal.> Executing task: west build -d d:\dev\RoomController\roomconplus-nrf52\firmware\build_bgr100664_nrf52840 -t guiconfig < The terminal process failed to launch: A native exception occurred during launch (File not found: C:\dev\NordicSemi\ncs\v1.9.0\toolchain\cmd). Terminal will be reused by tasks, press any key to close it.
In the following I will describe how I created my demo development environment:
- I created a new application from sample with this settings:
- I added a build configuration that uses the default prj.conf:
- I added a build configuration that uses the prj_dongle.conf:
Thanks in advance!
Specifiations:
OS: Windows 10 (21H2)
VS Code: v1.64.2
nRF Connect SDK: v1.9.0
nRF Connect for VS Code: v2022.1.192