Hi,
I'm trying the mesh chat example, but I can't build it. This is the error. Thank you for your help.
Hi,
I'm trying the mesh chat example, but I can't build it. This is the error. Thank you for your help.
Building chat C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build c:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat --pristine --board nrf54l15dk/nrf54l15/cpuapp --sysbuild -- -DCONF_FILE=prj.conf -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=c:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat" -- west build: generating a build system Loading Zephyr module(s) (Zephyr base): sysbuild_default -- Found Python3: C:/ncs/toolchains/0b393f9e1b/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.0.0/zephyr/.cache -- Found west (found suitable version "1.2.0", minimum required is "0.14.0") -- Board: nrf54l15dk, qualifiers: nrf54l15/cpuapp Parsing c:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/Kconfig.sysbuild Loaded configuration 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/_sysbuild/empty.conf' Merged configuration 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/_sysbuild/empty.conf' Configuration saved to 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/zephyr/.config' Kconfig header saved to 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/_sysbuild/autoconf.h' -- ************************** * Running CMake for chat * ************************** Loading Zephyr default modules (Zephyr base). -- Application: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat -- CMake version: 3.21.0 -- Found Python3: C:/ncs/toolchains/0b393f9e1b/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.0.0/zephyr/.cache -- Zephyr version: 4.0.99 (C:/ncs/v3.0.0/zephyr) -- Found west (found suitable version "1.2.0", minimum required is "0.14.0") -- Board: nrf54l15dk, qualifiers: nrf54l15/cpuapp -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk) -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk) -- Found Dtc: C:/ncs/toolchains/0b393f9e1b/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") -- Found BOARD.dts: C:/ncs/v3.0.0/zephyr/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l15_cpuapp.dts -- Generated zephyr.dts: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/zephyr.dts -- Generated pickled edt: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/edt.pickle -- Generated zephyr.dts: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/zephyr.dts -- Generated devicetree_generated.h: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/include/generated/zephyr/devicetree_generated.h -- Including generated dts.cmake file: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/dts.cmake warning: SOC_FLASH_NRF_PARTIAL_ERASE (defined at drivers/flash/Kconfig.nrf:48) was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: HAS_HW_NRF_NVMC_PE (=n), SOC_FLASH_NRF (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE and/or look up SOC_FLASH_NRF_PARTIAL_ERASE in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too. Parsing C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/Kconfig Loaded configuration 'C:/ncs/v3.0.0/zephyr/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l15_cpuapp_defconfig' Merged configuration 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/prj.conf' Merged configuration 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/misc/generated/extra_kconfig_options.conf' Merged configuration 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/.config.sysbuild' Configuration saved to 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/.config' Kconfig header saved to 'C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/include/generated/zephyr/autoconf.h' -- Found GnuLd: c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe =========== 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 Backup: CONFIG_MBEDTLS_THREADING: False Backup: CONFIG_MBEDTLS_THREADING_ALT: True =========== Checkpoint: backup =============== Restore: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False Restore: CONFIG_MBEDTLS_PSA_CRYPTO_C: True Restore: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False Restore: CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT: False Restore: CONFIG_MBEDTLS_THREADING: False Restore: CONFIG_MBEDTLS_THREADING_ALT: True =========== End psa_crypto_config =============== =========== Generating psa_crypto_library_config =============== Backup: CONFIG_MBEDTLS_PSA_CRYPTO_C: True Backup: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False Backup: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False Backup: CONFIG_MBEDTLS_USE_PSA_CRYPTO: True Backup: CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT: False Backup: CONFIG_MBEDTLS_THREADING: False Backup: CONFIG_MBEDTLS_THREADING_ALT: True =========== Checkpoint: backup =============== Restore: CONFIG_MBEDTLS_PSA_CRYPTO_C: True Restore: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False Restore: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False Restore: CONFIG_MBEDTLS_USE_PSA_CRYPTO: True Restore: CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT: False Restore: CONFIG_MBEDTLS_THREADING: False Restore: CONFIG_MBEDTLS_THREADING_ALT: True =========== End psa_crypto_library_config =============== CMake Warning at C:/ncs/v3.0.0/zephyr/CMakeLists.txt:2180 (message): __ASSERT() statements are globally ENABLED -- Configuring done -- Generating done -- Build files have been written to: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat -- Configuring done -- Generating done -- Build files have been written to: C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build -- west build: building application [6/426] Generating include/generated/zephyr/version.h -- Zephyr version: 4.0.99 (C:/ncs/v3.0.0/zephyr), build: v4.0.99-ncs1 [375/426] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj * Terminal will be reused by tasks, press any key to close it. * Executing task: nRF Connect: Build: chat/chat (active) Building chat C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build --domain chat" -- west build: building domain(s): chat [40/45] Linking C executable zephyr\zephyr_pre0.elf FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat/zephyr/zephyr_pre0.map cmd.exe /C "cd . && C:\ncs\toolchains\0b393f9e1b\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf -L"c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main/nofp" -lc -lgcc && cmd.exe /C "cd /D C:\ncs\v3.0.0\nrf\samples\bluetooth\mesh\chat\build\chat\zephyr && C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.exe -E true"" c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/libzephyr.a(trusted_backend_aead.c.obj): in function `trusted_get_info': C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:62: undefined reference to `storage_get_object' c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/libzephyr.a(trusted_backend_aead.c.obj): in function `trusted_get': C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:102: undefined reference to `storage_get_object' c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/libzephyr.a(trusted_backend_aead.c.obj): in function `trusted_set': C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:162: undefined reference to `storage_get_object' c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:213: undefined reference to `storage_remove_object' c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:202: undefined reference to `storage_set_object' c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/libzephyr.a(trusted_backend_aead.c.obj): in function `trusted_remove': C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:232: undefined reference to `storage_get_object' c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: C:/ncs/v3.0.0/nrf/subsys/trusted_storage/src/aead/trusted_backend_aead.c:241: undefined reference to `storage_remove_object' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' --build C:/ncs/v3.0.0/nrf/samples/bluetooth/mesh/chat/build/chat
Hello Ethan,
I cannot reproduce your issue. I was successful with building the Mesh Chat sample in tree, with and without enabling debug optimization.
Could you please give more details on your steps?
Hieu
Hello Hieu,
Thank you for your reply. I built the example using this configuration and made no further changes.
Hello Ethan,
I see now. The issue is due to setting prj.conf explicitly. When a configuration file is set explicitly, the build system doesn't search for other config files, and therefore the important boards/nrf54l15dk_nrf54l15_cpuapp.conf file wasn't included in the build, causing the issue you are seeing.
Refer to: Setting Kconfig configuration values.
There are two ways to fix this:
1. Add the boards/nrf54l15dk_nrf54l15_cpuapp.conf file as an Extra Kconfig fragment or a second Base configuration file.
2. Don't specify prj.conf and use build system default.
Hello Ethan,
I see now. The issue is due to setting prj.conf explicitly. When a configuration file is set explicitly, the build system doesn't search for other config files, and therefore the important boards/nrf54l15dk_nrf54l15_cpuapp.conf file wasn't included in the build, causing the issue you are seeing.
Refer to: Setting Kconfig configuration values.
There are two ways to fix this:
1. Add the boards/nrf54l15dk_nrf54l15_cpuapp.conf file as an Extra Kconfig fragment or a second Base configuration file.
2. Don't specify prj.conf and use build system default.