Matter thermostat sample building issue nrf52840

Hello,

i'm facing errors when trying to build matter sample thermostat.

I doesn't matter if i use VS Code or terminal

(v3.1.1) C:\ncs\v3.1.1\nrf\samples\matter\thermostat> west build -b nrf52840dk/nrf52840 -d build_nrf52840dk_nrf52840 -- -DCONF_FILE=prj.conf
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base (cached)): sysbuild_default
-- Cache files will be written to: C:/ncs/v3.1.1/zephyr/.cache
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
-- Board: nrf52840dk, qualifiers: nrf52840
Parsing C:/ncs/v3.1.1/nrf/samples/matter/thermostat/Kconfig.sysbuild
Loaded configuration 'C:/ncs/v3.1.1/nrf/samples/matter/thermostat/build_nrf52840dk_nrf52840/_sysbuild/empty.conf'
Merged configuration 'C:/ncs/v3.1.1/nrf/samples/matter/thermostat/sysbuild.conf'
Configuration saved to 'C:/ncs/v3.1.1/nrf/samples/matter/thermostat/build_nrf52840dk_nrf52840/zephyr/.config'
Kconfig header saved to 'C:/ncs/v3.1.1/nrf/samples/matter/thermostat/build_nrf52840dk_nrf52840/_sysbuild/autoconf.h'
--
*****************************
* Running CMake for mcuboot *
*****************************

Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/v3.1.1/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/c1a76fddb2/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/ncs/v3.1.1/zephyr/.cache
-- Zephyr version: 4.1.99 (C:/ncs/v3.1.1/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 (C:/ncs/toolchains/c1a76fddb2/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/c1a76fddb2/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/c1a76fddb2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/v3.1.1/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: C:/ncs/v3.1.1/nrf/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay
devicetree error: /chosen: undefined node label 'mx25r64'
CMake Error at C:/ncs/v3.1.1/zephyr/cmake/modules/dts.cmake:306 (execute_process):
execute_process failed command indexes:

1: "Child return code: 1"

Call Stack (most recent call first):
C:/ncs/v3.1.1/zephyr/cmake/modules/zephyr_default.cmake:131 (include)
C:/ncs/v3.1.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v3.1.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:18 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at cmake/modules/sysbuild_extensions.cmake:530 (message):
CMake configure failed for Zephyr project: mcuboot

Location: C:/ncs/v3.1.1/bootloader/mcuboot/boot/zephyr/
Call Stack (most recent call first):
cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
cmake/modules/sysbuild_default.cmake:21 (include)
C:/ncs/v3.1.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
C:/ncs/v3.1.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boiler
plate)
C:/ncs/v3.1.1/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!

  • Hi there,

    Looks like an Overlay issue, check the order you have and verify the nodes and names.

    "

    -- Found devicetree overlay: C:/ncs/v3.1.1/nrf/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay
    devicetree error: /chosen: undefined node label 'mx25r64'

    start there.

    It will build.

    HTH

    GL :-) PJ

    it should read like this 

    -- 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 (C:/ncs/toolchains/c1a76fddb2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/c1a76fddb2/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v3.1.1/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: D:/Nordic/myapps/workspace/thermostat_1/boards/nrf52840dk_nrf52840.overlay
    -- Generated zephyr.dts: D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/zephyr.dts
    -- Generated pickled edt: D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/edt.pickle
    -- Generated devicetree_generated.h: D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing D:/Nordic/myapps/workspace/thermostat_1/Kconfig
    Loaded configuration 'D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/.config'
    Merged configuration 'D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/.config.sysbuild'
    No change to configuration in 'D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/.config'
    No change to Kconfig header in 'D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/include/generated/zephyr/autoconf.h'
    CMake Warning at C:/ncs/v3.1.1/nrf/cmake/version_app.cmake:19 (message):
    APP_VERSION: git rev-parse failed: fatal: not a git repository (or any of
    the parent directories): .git
    Call Stack (most recent call first):
    C:/ncs/v3.1.1/nrf/CMakeLists.txt:26 (include)


    =========== Generating psa_crypto_config ===============
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_C: True
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False
    Backup: CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT: False
    ......
    "

    Success looks like this: "
    [493/493] Linking CXX executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 782284 B 982528 B 79.62%
    RAM: 157492 B 256 KB 60.08%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/zephyr.elf for board: nrf52840dk
    image.py: sign the payload
    image.py: sign the payload
    [11/23] Generating new Factory Data...
    [INFO] Generating SPAKE2+ Verifier...
    [WARNING] KEY password has not been provided. It means that DAC key is not encrypted.
    [INFO] Validating JSON with schema...
    [INFO] Validate OK
    [12/23] Performing build step for 'mcuboot'
    [6/182] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.1.99 (C:/ncs/v3.1.1/zephyr), build: ncs-v3.1.1
    [9/182] Generating include/generated/zephyr/syscall_dispatch.c, include/generated/zephyr/syscall_exports_llext.c, syscall_weakdefs_llext.c, include/generated/zephyr/sys[153/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/helpers/nrfx_flag3[154/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/mdk/system_nrf5284[157/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/drivers/src/nrfx_c[160/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/drivers/src/nrfx_w[167/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/helpers/nrfx_flag3[170/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/helpers/nrfx_ram_c[172/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/drivers/src/nrfx_c[173/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/drivers/src/nrfx_n[174/182] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.1.1/modules/hal/nordic/nrfx/drivers/src/nrfx_w[182/182] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 24168 B 28 KB 84.29%
    RAM: 18304 B 256 KB 6.98%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from D:/Nordic/myapps/workspace/thermostat_1/build/mcuboot/zephyr/zephyr.elf for board: nrf52840dk
    [23/23] Generating ../merged.hex "

    It builds fine , 3.1.1 and toolchains 3.1.1 Nrf52840 DK board. (check your boards dir)

    Flashes AOK to DK board.

    [169/177] Building CXX object modules/connectedhomeip/CMakeFiles/matter-data-model.dir/C_/ncs/v3.1.1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generate[177/177] Linking CXX executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 782284 B 982528 B 79.62%
    RAM: 157492 B 256 KB 60.08%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from D:/Nordic/myapps/workspace/thermostat_1/build/thermostat_1/zephyr/zephyr.elf for board: nrf52840dk
    image.py: sign the payload
    image.py: sign the payload
    [1/12] Performing build step for 'mcuboot'
    [29/29] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 24168 B 28 KB 84.29%
    RAM: 18304 B 256 KB 6.98%
    IDT_LIST: 0 GB 32 KB 0.00%
    Generating files from D:/Nordic/myapps/workspace/thermostat_1/build/mcuboot/zephyr/zephyr.elf for board: nrf52840dk
    [12/12] Generating ../merged.hex
    -- west flash: using runner nrfutil
    -- runners.nrfutil: reset after flashing requested
    -- runners.nrfutil: Flashing file: D:\Nordic\myapps\workspace\thermostat_1\build\merged.hex
    -- runners.nrfutil: Erasing address ranges touched by firmware
    -- runners.nrfutil: Programming image
    -- runners.nrfutil: Verifying image
    -- runners.nrfutil: Reset
    -- runners.nrfutil: Board(s) with serial number(s) 1050289493 flashed successfully.

    HTH Slight smile

    I got the QR code from the Serial port, works fine Thumbsup

Related