Error When Compiling Sample Project

Hello,

I recently got an nRF7002 DK and am trying things out. I recently tried to run a sample Matter project and I got this error when compiling. I was following the tutorial given here.

[{
	"resource": "/c:/ncs/v2.5.0/nrf/subsys/partition_manager/partition_manager_enabled.conf",
	"owner": "kconfig0",
	"severity": 8,
	"message": "Kconfig failed: [Errno 2] No such file or directory: 'c:/ncs/v2.5.0/zephyr/${zephyr_connectedhomeip_module_dir}/config/nrfconnect/chip-module/kconfig.mcuboot.root'",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 1
}]

My development environment is Windows 64 bit and I installed nRF through the nRF Connect Desktop App. I'm using toolchain version 2.5.0. Any Help is appreciated. Thanks.

  • Hi Asanka,

    I did a quick try with my setup. light_buble sample can be built without issue.

    Here is my configuration and building log. Can you share your building log to show how it fails?

    Best regards,

    Charlie

  • Thanks for the quick reply. This is my build configuration:

    This is the build log:

    Build Log

    I also need to point out that for some reason the nRF Connect for VS Code doesn't automatically detect the SDK. I've tried reinstalling the whole toolchain from both the nRF Connect Desktop Application and VS Code itself but the issue still persisted. Even if I leave the `Topdir` setting empty or `${nrf-connect.sdk:2.5.0}`, it still says that I have to install the SDK. nRF Connect Application detects everything properly. I've tried installing SDK version 2.4.2, reinstalling the whole nRF applications (nRF Connect Desktop and CLI tool including a fresh install of the toolchain) and even reinstalling VS Code and the extensions (Deleted the settings file as well) but still the issue exists. It only works if I add `C:\ncs\v2.5.0` manually to the `Topdir`. This was not the case when I started off however it appeared after I installed Zap (Not sure if that's relevant).

    I wanted to mention this just in case it has something to do with the issue.

    Thank you.

  • Hi Asanka,

    Hard to say where the issue comes from based on the current evidence. ZAP tool is not very friendly to Windows PC, I remember I only made it work on Ubuntu before.

    Anyway, a reinstall will mostly hopeful to solve this issue. Could you try the following steps?

    1) Clean up all the current related installations about NCS.

    2) Open VS code and install toolchain and SDK from nRF Connect VS code extension.

    3) Build the official sample located in NCS\v2.5.0\nrf\samples\matter\light_switch

    Best regards,

    Charlie

  • Hello,

    I have an update. I reinstalled everything and I tried the light_switch example. I am still running into the same error. However, I made the following changes to the CMakeLists.txt file.

    Replaced:

    set(mcuboot_KCONFIG_ROOT "\\\${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.mcuboot.root")
    set(multiprotocol_rpmsg_KCONFIG_ROOT "\\\${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root")
    set(hci_rpmsg_KCONFIG_ROOT "\\\${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root")

    With:

    set(mcuboot_KCONFIG_ROOT ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
    set(multiprotocol_rpmsg_KCONFIG_ROOT ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
    set(hci_rpmsg_KCONFIG_ROOT ${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root)

    Added:

    set(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR "C:/ncs/v2.5.0/modules/lib/matter/config/zephyr/chip-module")

    As shown below:

    Now I run into an error but the Problems tab doesn't show any as below.

    Build Log

  • Hi Asanka,

    Can you try to add and build the official sample located in NCS\v2.5.0\nrf\samples\matter\light_switch to see what happens?

    Best regards,

    Charlie

Related