nRF Connect for VS Code no longer building project

Hello,

for some time I didn't have to work on my project that uses nRF Connect SDK but recently I had to work on it again and noticed that I am not able to build my before working configurations anymore.

This is my build log:

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: <path-to-project>
-- Found Python3: C:/ncs/toolchains/v2.0.2/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Cache files will be written to: C:/ncs/v2.0.2/zephyr/.cache
-- Zephyr version: 3.0.99 (C:/ncs/v2.0.2/zephyr)
-- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Found host-tools: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.2/opt/zephyr-sdk)
-- Found dtc: C:/ncs/toolchains/v2.0.2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.14.1 (C:/ncs/toolchains/v2.0.2/opt/zephyr-sdk)
-- Found BOARD.dts: C:/ncs/v2.0.2/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: <path-to-project>/configuration/nrf52840dk_nrf52840/app.overlay
-- Generated zephyr.dts: <path-to-project>/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: <path-to-project>/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: <path-to-project>/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: <path-to-project>/build/zephyr/dts.cmake
CMake Error at C:/ncs/v2.0.2/zephyr/cmake/modules/kconfig.cmake:226 (message):
  File not found:
  <path-to-project>/configuration/nrf52840dk_nrf52840/configuration/nrf52840dk_nrf52840/prj.conf
Call Stack (most recent call first):
  C:/ncs/v2.0.2/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
  C:/ncs/v2.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include)
  C:/ncs/v2.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:76 (include_boilerplate)
  CMakeLists.txt:22 (find_package)

And this is the build command:

west build --build-dir <path-to-project>/build <path-to-project> --pristine --board nrf52840dk_nrf52840 --cmake-only -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=configuration/nrf52840dk_nrf52840/prj.conf -DBOARD_ROOT=<path-to-project>

The error says it doesn't find the configuration file and this is correct because it is looking in the wrong path. It is looking under <path-to-project>/configuration/nrf52840dk_nrf52840/configuration/nrf52840dk_nrf52840/prj.conf but the actual path should be just <path-to-project>/configuration/nrf52840dk_nrf52840/prj.conf.

This seems like a bug to me or am I missing something?

OS: Windows 11 24H2
VS Code: 1.102.2
nRF Connect for VS Code: 2025.5.152

Edit:

When adjusting the build command like below and run it manually it works.

west build --build-dir <path-to-project>/build <path-to-project> --pristine --board nrf52840dk_nrf52840 --cmake-only -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DBOARD_ROOT=<path-to-project>

  • Hello Priyanka,

    I am having the exact same issue as David and can not build my projects. Please do not give up.

  • Hi,

    Thank you for reporting. We are yet to find a solution and are still working on this.

    -Priyanka

  • Maybe this can help to fix the issue.

    These are the steps how I can consistently reproduce the issue:

    1. Create a folder test-workspace

    2. Open the folder test-workspace in VS Code

    3. Create the file ".devcontainer/devcontainer.json" and add the following content to this file:

    {
        "image": "ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.1.1",
        "customizations": {
            "vscode": {
                "extensions": [
                    "nordic-semiconductor.nrf-connect-extension-pack"
                ]
            }
        }
    }

    4. Press F1 in VS Code and select "Dev Containers: Reopen in Container"

    5. Use the internal bash terminal of VS Code to execute:

    west init -m https://github.com/nrfconnect/sdk-nrf.git --mr v3.1.1 . && west update

    6. Create the file ".vscode/settings.json" and add the following content to this file:

    {
        "nrf-connect.toolchainManager.installDirectory": "/opt/ncs",
        "nrf-connect.applications": [
            "${workspaceFolder}/nrf/applications/nrf_desktop"
        ]
    }

    7. Press F1 in VS Code and select "Developer: Reload Window"

    8. Add build configuration with this settings:
        - Board target=nrf52840dk/nrf52840
        - Base config file=configuration/nrf52840dk_nrf52840/prj.conf
        - Generate only=True
        - Everything else should be untouched

    9. Building should fail with similar error message:

    Building nrf_desktop
    west build --build-dir /workspaces/test-workspace/nrf/applications/nrf_desktop/build /workspaces/test-workspace/nrf/applications/nrf_desktop --pristine --board nrf52840dk/nrf52840 --cmake-only -- -DCONF_FILE=configuration/nrf52840dk_nrf52840/prj.conf
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /opt/ncs/toolchains/b2ecd2435d/usr/local/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /opt/.cache/zephyr
    -- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    Parsing /workspaces/test-workspace/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/workspaces/test-workspace/nrf/applications/nrf_desktop/build/_sysbuild/empty.conf'
    Merged configuration '/workspaces/test-workspace/nrf/applications/nrf_desktop/sysbuild/../configuration/nrf52840dk_nrf52840/sysbuild.conf'
    Configuration saved to '/workspaces/test-workspace/nrf/applications/nrf_desktop/build/zephyr/.config'
    Kconfig header saved to '/workspaces/test-workspace/nrf/applications/nrf_desktop/build/_sysbuild/autoconf.h'
    -- 
       *********************************
       * Running CMake for nrf_desktop *
       *********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /workspaces/test-workspace/nrf/applications/nrf_desktop
    -- CMake version: 3.21.0
    -- Found Python3: /opt/ncs/toolchains/b2ecd2435d/usr/local/bin/python (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /opt/.cache/zephyr
    -- Zephyr version: 4.1.99 (/workspaces/test-workspace/zephyr)
    -- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.0 (/opt/ncs/toolchains/b2ecd2435d/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (/opt/ncs/toolchains/b2ecd2435d/opt/zephyr-sdk)
    -- Found Dtc: /opt/ncs/toolchains/b2ecd2435d/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /workspaces/test-workspace/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /workspaces/test-workspace/nrf/applications/nrf_desktop/configuration/nrf52840dk_nrf52840/app.overlay
    -- Generated zephyr.dts: /workspaces/test-workspace/nrf/applications/nrf_desktop/build/nrf_desktop/zephyr/zephyr.dts
    -- Generated pickled edt: /workspaces/test-workspace/nrf/applications/nrf_desktop/build/nrf_desktop/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /workspaces/test-workspace/nrf/applications/nrf_desktop/build/nrf_desktop/zephyr/include/generated/zephyr/devicetree_generated.h
    CMake Error at /workspaces/test-workspace/zephyr/cmake/modules/kconfig.cmake:308 (message):
      File not found:
      /workspaces/test-workspace/nrf/applications/nrf_desktop/configuration/nrf52840dk_nrf52840/configuration/nrf52840dk_nrf52840/prj.conf
    Call Stack (most recent call first):
      /workspaces/test-workspace/nrf/cmake/modules/kconfig.cmake:83 (include)
      /workspaces/test-workspace/zephyr/cmake/modules/zephyr_default.cmake:131 (include)
      /workspaces/test-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      /workspaces/test-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:14 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:530 (message):
      CMake configure failed for Zephyr project: nrf_desktop
    
      Location: /workspaces/test-workspace/nrf/applications/nrf_desktop
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:21 (include)
      /workspaces/test-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      /workspaces/test-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      /workspaces/test-workspace/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      /workspaces/test-workspace/nrf/applications/nrf_desktop/sysbuild/CMakeLists.txt:26 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/workspaces/test-workspace/nrf/applications/nrf_desktop/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: /opt/ncs/toolchains/b2ecd2435d/usr/local/bin/cmake -DWEST_PYTHON=/opt/ncs/toolchains/b2ecd2435d/usr/local/bin/python3.12 -B/workspaces/test-workspace/nrf/applications/nrf_desktop/build -GNinja -DBOARD=nrf52840dk/nrf52840 -DCONF_FILE=configuration/nrf52840dk_nrf52840/prj.conf -S/workspaces/test-workspace/zephyr/share/sysbuild -DAPP_DIR:PATH=/workspaces/test-workspace/nrf/applications/nrf_desktop

Related