fail to build the sample project with MCUboot on ncsV2.6.1

NCS version :      v2.6.1

target board:       nrf5340dk_nrf5340_cpuapp_ns

sample project:   "ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot"

I use this command to build the project with MCUboot,but an error occurred during compilation:

E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot> west build -b nrf5340dk_nrf5340_cpuapp_ns --sysbuild

  • Here is the build log when i build ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot project.

     

    PS E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild> ls

    Directory: E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild


    Mode LastWriteTime Length Name
    ---- ------------- ------ ----
    d----- 2024/7/1 13:43 with_mcuboot


    PS E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild> cd .\with_mcuboot\
    PS E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot> ls


    Directory: E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot


    Mode LastWriteTime Length Name
    ---- ------------- ------ ----
    d----- 2024/7/1 13:43 src
    d----- 2024/7/1 13:43 sysbuild
    -a---- 2024/7/1 13:43 413 CMakeLists.txt
    -a---- 2024/7/1 13:43 14 prj.conf
    -a---- 2024/7/1 13:43 1731 README.rst
    -a---- 2024/7/1 13:43 612 sample.yaml
    -a---- 2024/7/1 13:43 113 sysbuild.conf


    PS E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot> west build -b nrf5340dk_nrf5340_cpuapp_ns --sysbuild
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): extensions sysbuild_extensions python west root zephyr_module boards shields sysbuild_kconfig native_simulator_sb_extensions
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: E:/ncs/v2.6.1/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk_nrf5340_cpuapp_ns
    Parsing E:/ncs/v2.6.1/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/empty.conf'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/sysbuild.conf'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/empty.conf'
    Configuration saved to 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/zephyr/.config'
    Kconfig header saved to 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/autoconf.h'
    --
    *****************************
    * Running CMake for mcuboot *
    *****************************

    Loading Zephyr default modules (Zephyr base).
    -- Application: E:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.6.20240304.889616714482 for building. (C:/ncs/toolchains/cf2149caf2/cmake)
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: E:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (E:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: E:/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: E:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot/zephyr/dts.cmake
    Parsing E:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'E:/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'E:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/sysbuild/mcuboot.conf'
    Merged configuration 'E:/ncs/v2.6.1/nrf/modules/mcuboot/tfm.conf'
    Merged configuration 'E:/ncs/v2.6.1/nrf/modules/mcuboot/fih_low_enable.conf'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot/zephyr/.config.sysbuild'
    Configuration saved to 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../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/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    MCUBoot bootloader key file: E:/ncs/v2.6.1/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/mcuboot
    --
    **********************************
    * Running CMake for with_mcuboot *
    **********************************

    Loading Zephyr default modules (Zephyr base).
    -- Application: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.6.20240304.889616714482 for building. (C:/ncs/toolchains/cf2149caf2/cmake)
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: E:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (E:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk_nrf5340_cpuapp_ns
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: E:/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_ns.dts
    -- Generated zephyr.dts: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/dts.cmake

    warning: UPDATEABLE_IMAGE_NUMBER (defined at
    E:/ncs/v2.6.1/nrf\samples\common\mcumgr_bt_ota_dfu/Kconfig:89, subsys/dfu/Kconfig:88) was assigned
    the value '1' but got the value ''. Check these unsatisfied dependencies:
    (((BOARD_THINGY53_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP_NS) && SOC_SERIES_NRF53X &&
    NCS_SAMPLE_MCUMGR_BT_OTA_DFU) || (!MCUBOOT && IMG_MANAGER)) (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    UPDATEABLE_IMAGE_NUMBER 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 E:/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration 'E:/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_ns_defconfig'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/prj.conf'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config.sysbuild'
    Configuration saved to 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config'
    Kconfig header saved to 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../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/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Including signing script: E:/ncs/v2.6.1/nrf/cmake/sysbuild/image_signing.cmake
    CMake Warning at E:/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:79 (message):


    ---------------------------------------------------------------------
    --- WARNING: Using a bootloader without pm_static.yml. ---
    --- There are cases where a deployed product can consist of ---
    --- multiple images, and only a subset of these images can be ---
    --- upgraded through a firmware update mechanism. In such cases, ---
    --- the upgradable images must have partitions that are static ---
    --- and are matching the partition map used by the bootloader ---
    --- programmed onto the device. ---
    ---------------------------------------------------------------------


    Call Stack (most recent call first):
    E:/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
    E:/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
    E:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    E:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:5 (find_package)


    -- Configuring done
    -- Generating done
    -- Build files have been written to: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot
    Dropping partition 'nonsecure_storage' since it is empty.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build
    -- west build: building application
    [9/19] Performing build step for 'mcuboot'
    [3/184] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (E:/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [184/184] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 34424 B 48 KB 70.04%
    RAM: 16552 B 32 KB 50.51%
    IDT_LIST: 0 GB 32 KB 0.00%
    [11/19] Performing build step for 'with_mcuboot'
    [0/1] Re-running CMake...
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.6.20240304.889616714482 for building. (C:/ncs/toolchains/cf2149caf2/cmake)
    -- Cache files will be written to: E:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (E:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk_nrf5340_cpuapp_ns
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found BOARD.dts: E:/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_ns.dts
    -- Generated zephyr.dts: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/dts.cmake
    Parsing E:/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config'
    Merged configuration 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config.sysbuild'
    No change to configuration in 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/.config'
    No change to Kconfig header in 'E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/autoconf.h'
    -- Including signing script: E:/ncs/v2.6.1/nrf/cmake/sysbuild/image_signing.cmake
    CMake Warning at E:/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:79 (message):


    ---------------------------------------------------------------------
    --- WARNING: Using a bootloader without pm_static.yml. ---
    --- There are cases where a deployed product can consist of ---
    --- multiple images, and only a subset of these images can be ---
    --- upgraded through a firmware update mechanism. In such cases, ---
    --- the upgradable images must have partitions that are static ---
    --- and are matching the partition map used by the bootloader ---
    --- programmed onto the device. ---
    ---------------------------------------------------------------------


    Call Stack (most recent call first):
    E:/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
    E:/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
    E:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    E:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
    CMakeLists.txt:5 (find_package)


    -- Configuring done
    -- Generating done
    -- Build files have been written to: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot
    [2/214] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (E:/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [7/214] Generating ../../tfm/CMakeCache.txt
    CMake Warning at cmake/version.cmake:22 (message):
    Actual TF-M version is not available from Git repository. Settled to
    v2.0.0
    Call Stack (most recent call first):
    CMakeLists.txt:22 (include)


    -- Found Git: C:/ncs/toolchains/cf2149caf2/mingw64/bin/git.exe (found version "2.37.3.windows.1")
    -- 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/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found version "3.9.13") found components: Interpreter
    CMake Deprecation Warning at E:/ncs/v2.6.1/zephyr/cmake/modules/FindDeprecated.cmake:121 (message):
    'PYTHON_PREFER' variable is deprecated. Please use Python3_EXECUTABLE
    instead.
    Call Stack (most recent call first):
    E:/ncs/v2.6.1/zephyr/cmake/modules/python.cmake:16 (find_package)
    E:/ncs/v2.6.1/zephyr/cmake/modules/user_cache.cmake:30 (include)
    E:/ncs/v2.6.1/zephyr/cmake/modules/extensions.cmake:5 (include)
    E:/ncs/v2.6.1/nrf/subsys/nrf_security/tfm/CMakeLists.txt:38 (include)


    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: E:/ncs/v2.6.1/zephyr/.cache
    -- Configuring done
    CMake Warning in E:/ncs/v2.6.1/nrf/subsys/nrf_security/src/CMakeLists.txt:
    The object file directory

    E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/CMakeFiles/crypto_service_mbedcrypto.dir/./

    has 197 characters. The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX). Object file

    E_/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.o

    cannot be safely placed under this directory. The build may not work
    correctly.


    -- Generating done
    CMake Warning:
    Manually-specified variables were not used by the project:

    CRYPTO_RNG_MODULE_ENABLED
    MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
    PYTHON_PREFER


    -- Build files have been written to: E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm
    [12/214] Performing build step for 'tfm'
    [29/168] Building C object secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/CMakeFiles/crypto_service_mbedcrypto.dir/E_/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.o
    FAILED: secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/CMakeFiles/crypto_service_mbedcrypto.dir/E_/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.o
    C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DBL1_HEADER_SIZE=0x000 -DBL1_TRAILER_SIZE=0x000 -DBL2_HEADER_SIZE=0x000 -DBL2_TRAILER_SIZE=0x000 -DCONFIG_TFM_FLOAT_ABI=0 -DCONFIG_TFM_USE_TRUSTZONE -DCRYPTO_HW_ACCELERATOR -DDAUTH_CHIP_DEFAULT -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-want-config.h\"
    -DMBEDTLS_PSA_CRYPTO_DRIVERS -DMBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DMCUBOOT_IMAGE_NUMBER=1 -DNRF5340_XXAA_APPLICATION -DNRF53_SERIES -DNRF_ALLOW_NON_SECURE_FAULT_HANDLING -DNRF_ALLOW_NON_SECURE_RESET -DNRF_HW_INIT_NRF_PERIPHERALS -DNRF_HW_INIT_RESET_ON_BOOT -DNRF_NS_SECONDARY -DNRF_NS_STORAGE -DNRF_SECURE_UART_INSTANCE=1 -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPLATFORM_DEFAULT_BL1 -DPLATFORM_NS_NV_COUNTERS=0 -DPROJECT_CONFIG_HEADER_FILE=\"E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/modules/nrf/modules/trusted-firmware-m/tfm_config.h\" -DPSA_CRYPTO_SECURE -DPS_CRYPTO_AEAD_ALG_GCM -DPS_ENCRYPTION -DSECURE_UART1 -DTFM_EXCEPTION_INFO_DUMP -DTFM_FIH_PROFILE_OFF -DTFM_INTERNAL_TRUSTED_STORAGE_SERVICE_SID=0x00000070 -DTFM_ISOLATION_LEVEL=1 -DTFM_PARTITION_CRYPTO -DTFM_PARTITION_LOG_LEVEL=TFM_PARTITION_LOG_LEVEL_SILENCE -DTFM_PARTITION_NS_AGENT_TZ -DTFM_PARTITION_PLATFORM -DTFM_SPM_LOG_LEVEL=TFM_SPM_LOG_LEVEL_INFO -DTFM_SPM_LOG_RAW_ENABLED -D__NRF_TFM__ -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/crypto -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/crypto/psa_driver_api -IE:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/include/generated -IE:/ncs/v2.6.1/nrf/subsys/nrf_security/tfm/../include -IE:/ncs/v2.6.1/nrf/ext/oberon/psa/core/include -IE:/ncs/v2.6.1/nrf/ext/oberon/psa/core/library -IE:/ncs/v2.6.1/modules/crypto/mbedtls/include -IE:/ncs/v2.6.1/modules/crypto/mbedtls/library -IE:/ncs/v2.6.1/nrf/subsys/nrf_security/tfm/../../../../nrfxlib/crypto/nrf_oberon/include -IE:/ncs/v2.6.1/nrf/subsys/nrf_security/tfm/../../../../nrfxlib/crypto/nrf_oberon/include/mbedtls -IE:/ncs/v2.6.1/nrf/ext/oberon/psa/drivers -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/interface/include -IE:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/generated/interface/include -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/config -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/include -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/firmware_update -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/initial_attestation -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/internal_trusted_storage -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/platform -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/partitions/protected_storage -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/secure_fw/spm/include -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/core/. -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/core/native_drivers -IE:/ncs/v2.6.1/modules/hal/nordic/nrfx -IE:/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -IE:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/core/common -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/.. -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/core/services/include -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/nrf5340/. -IE:/ncs/v2.6.1/nrf/modules/trusted-firmware-m/tfm_boards/include -IE:/ncs/v2.6.1/nrf/modules/trusted-firmware-m/tfm_boards/partition -IE:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/../zephyr/include/generated -IE:/ncs/v2.6.1/nrf/modules/trusted-firmware-m/tfm_boards/board -IE:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/../zephyr/misc/generated/syscalls_links/include -IE:/ncs/v2.6.1/zephyr/include -IE:/ncs/v2.6.1/nrf/modules/trusted-firmware-m/tfm_boards/services/include -IE:/ncs/v2.6.1/nrf/include -IE:/ncs/v2.6.1/nrf/include/tfm -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/accelerator/interface -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/cmsis -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/common -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/driver -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/include -IE:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/lib/fih/inc -isystem E:/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_platform/include -isystem E:/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -isystem E:/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include -mcpu=cortex-m33+nofp -Os -DNDEBUG -specs=nano.specs -Wall -Wno-format -Wno-return-type -Wno-unused-but-set-variable -c -fdata-sections -ffunction-sections -fno-builtin -fshort-enums -funsigned-char -mthumb -nostdlib -std=c99 -gdwarf-4 -g
    -imacros E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/include/generated/autoconf.h -Wno-unused-function -Wno-unused-variable -Wno-stringop-overflow -Wno-stringop-overread -Wno-strict-aliasing -Wno-uninitialized -Wno-maybe-uninitialized -Wno-unused-const-variable -Wno-unused-parameter -mfloat-abi=soft -mcmse -Wno-unused-value -include E:/ncs/v2.6.1/modules/tee/tf-m/trusted-firmware-m/platform/include/cmsis_override.h -MD -MT secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/CMakeFiles/crypto_service_mbedcrypto.dir/E_/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.o -MF secure_fw\partitions\crypto\mbedcrypto\nrf_security_src\CMakeFiles\crypto_service_mbedcrypto.dir\E_\ncs\v2.6.1\modules\crypto\mbedtls\library\memory_buffer_alloc.o.d -o secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/CMakeFiles/crypto_service_mbedcrypto.dir/E_/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.o -c E:/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.c
    E:/ncs/v2.6.1/modules/crypto/mbedtls/library/memory_buffer_alloc.c:602:1: fatal error: opening dependency file secure_fw\partitions\crypto\mbedcrypto\nrf_security_src\CMakeFiles\crypto_service_mbedcrypto.dir\E_\ncs\v2.6.1\modules\crypto\mbedtls\library\memory_buffer_alloc.o.d: No such file or directory
    602 | }
    | ^
    compilation terminated.
    ninja: build stopped: subcommand failed.
    FAILED: modules/trusted-firmware-m/tfm-prefix/src/tfm-stamp/tfm-build tfm/bin/tfm_s.elf tfm/bin/tfm_s.bin tfm/bin/tfm_s.hex tfm/bin/tfm_s_signed.bin tfm/bin/tfm_s_ns_signed.bin tfm/api_ns/interface/lib/s_veneers.o tfm/api_ns/interface/src/tfm_attest_api.c tfm/api_ns/interface/src/tfm_crypto_api.c tfm/api_ns/interface/src/tfm_fwu_api.c tfm/api_ns/interface/src/tfm_its_api.c tfm/api_ns/interface/src/tfm_platform_api.c tfm/api_ns/interface/src/tfm_ps_api.c tfm/api_ns/interface/src/tfm_tz_psa_ns_api.c tfm/api_ns/interface/src/tfm_ioctl_core_ns_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/modules/trusted-firmware-m/tfm-prefix/src/tfm-stamp/tfm-build E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/bin/tfm_s.elf E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/bin/tfm_s.bin E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/bin/tfm_s.hex E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/bin/tfm_s_signed.bin E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/bin/tfm_s_ns_signed.bin E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/lib/s_veneers.o E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_attest_api.c
    E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_crypto_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_fwu_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_its_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_platform_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_ps_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_tz_psa_ns_api.c E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/with_mcuboot/tfm/api_ns/interface/src/tfm_ioctl_core_ns_api.c
    cmd.exe /C "cd /D E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot\build\with_mcuboot\tfm && C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe --build . -j 1"
    ninja: build stopped: subcommand failed.
    [14/19] cmd.exe /C "cd /D E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot\build && C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe -E true"
    FAILED: images/with_mcuboot-prefix/src/with_mcuboot-stamp/with_mcuboot-build E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build/images/with_mcuboot-prefix/src/with_mcuboot-stamp/with_mcuboot-build
    cmd.exe /C "cd /D E:\ncs\v2.6.1\zephyr\samples\application_development\sysbuild\with_mcuboot\build\with_mcuboot && C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe --build ."
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build E:/ncs/v2.6.1/zephyr/samples/application_development/sysbuild/with_mcuboot/build

  • I can use west build --sysbuild command to build the  project ncs\v2.6.1\zephyr\samples\subsys\mgmt\mcumgr\smp_svr

    successfully after my reinstalling the ncs v2.6.1.

  • Hello,


    I suspect this issue might be due to the limited support for sysbuild in NCS version 2.6.1. The sample in question is no longer present in version 2.7.0. I tested the same sample in version 2.6.1 and encountered a similar error. However, when I tried the sample without using sysbuild, it built successfully. This result is unexpected, as the sample is specifically designed to demonstrate how to configure sysbuild.

    I also tested the smp_svr sample with sysbuild in both NCS v2.7.0 and v2.6.1, and it worked fine in both versions. Could you please try using sysbuild with NCS v2.7.0 and let me know if you encounter any issues?

    Kind Regards,

    Abhijith

  • Hello,

    After build the sample ncs\v2.6.1\zephyr\samples\subsys\mgmt\mcumgr\smp_svr, i found the __rom_region_start  is 0x14000 in the map file,but in the devicetree file ncs\v2.6.1\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340_cpuapp_common.dtsi , the start address of slot0 is 0x10000.

    Is this correct?

    &flash0 {
    
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		boot_partition: partition@0 {
    			label = "mcuboot";
    			reg = <0x00000000 0x00010000>;
    		};
    		slot0_partition: partition@10000 {
    			label = "image-0";
    		};
    		slot0_ns_partition: partition@50000 {
    			label = "image-0-nonsecure";
    		};
    		slot1_partition: partition@80000 {
    			label = "image-1";
    		};
    		slot1_ns_partition: partition@c0000 {
    			label = "image-1-nonsecure";
    		};
    		/* 0xf0000 to 0xf7fff reserved for TF-M partitions */
    		storage_partition: partition@f8000 {
    			label = "storage";
    			reg = <0x000f8000 0x00008000>;
    		};
    	};
    };

    0820.zephyr.map

    Kind regards,

    Alex

  • Hi, Abhijith is OoO today and most likely will be back tomorrow. Sorry for any inconvenience the delay have caused and thanks a lot for your patience so far.

Related