build sid_end_device error

=== child image mcuboot - begin ===
loading initial cache file C:/Users/Administrator/sid_end_device_3/build/mcuboot/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/ncs/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/ce3b5ff664/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/ncs/ncs/zephyr/.cache
-- Zephyr version: 3.6.99 (C:/ncs/ncs/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52840dk, qualifiers: nrf52840
-- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/ce3b5ff664/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/ncs/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: C:/ncs/ncs/bootloader/mcuboot/boot/zephyr/app.overlay
-- Found devicetree overlay: C:/ncs/ncs/nrf/modules/mcuboot/usb.overlay
-- Generated zephyr.dts: C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/dts.cmake
Parsing C:/ncs/ncs/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration 'C:/ncs/ncs/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
Merged configuration 'C:/ncs/ncs/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration 'C:/ncs/ncs/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
Merged configuration 'C:/ncs/ncs/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
Merged configuration 'C:/ncs/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration 'C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to 'C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/.config'
Kconfig header saved to 'C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/include/generated/autoconf.h'
-- Found GnuLd: c:/ncs/toolchains/ce3b5ff664/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/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Warning at C:/ncs/ncs/nrf/lib/flash_patch/CMakeLists.txt:8 (message):

----------------------------------------------------------
--- WARNING: To maintain the integrity of secure boot, ---
--- enable CONFIG_DISABLE_FLASH_PATCH in production. ---
----------------------------------------------------------


CMake Deprecation Warning at C:/ncs/ncs/nrf/cmake/partition_manager.cmake:32 (message):

---------------------------------------------------------------------
--- WARNING: Child and parent image functionality is deprecated ---
--- and should be replaced with sysbuild. Child and parent image ---
--- support remains only to allow existing customer applications ---
--- to build and allow porting to sysbuild, it is no longer ---
--- receiving updates or new features and it will not be possible ---
--- to build using child/parent image at all in nRF Connect SDK ---
--- version 2.9 onwards. ---
---------------------------------------------------------------------
Call Stack (most recent call first):
C:/ncs/ncs/zephyr/cmake/modules/kernel.cmake:253 (include)
C:/ncs/ncs/zephyr/cmake/modules/zephyr_default.cmake:141 (include)
C:/ncs/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:12 (find_package)


MCUBoot bootloader key file: C:/ncs/ncs/bootloader/mcuboot/root-ec-p256.pem
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Administrator/sid_end_device_3/build/mcuboot
=== child image mcuboot - end ===

CMake Warning at C:/ncs/ncs/nrf/modules/mcuboot/CMakeLists.txt:382 (message):

---------------------------------------------------------
--- WARNING: Using default MCUBoot key, it should not ---
--- be used for production. ---
---------------------------------------------------------

CMake Warning at C:/ncs/ncs/zephyr/CMakeLists.txt:2027 (message):
__ASSERT() statements are globally ENABLED


CMake Deprecation Warning at C:/ncs/ncs/nrf/cmake/partition_manager.cmake:32 (message):

---------------------------------------------------------------------
--- WARNING: Child and parent image functionality is deprecated ---
--- and should be replaced with sysbuild. Child and parent image ---
--- support remains only to allow existing customer applications ---
--- to build and allow porting to sysbuild, it is no longer ---
--- receiving updates or new features and it will not be possible ---
--- to build using child/parent image at all in nRF Connect SDK ---
--- version 2.9 onwards. ---
---------------------------------------------------------------------
Call Stack (most recent call first):
C:/ncs/ncs/zephyr/cmake/modules/kernel.cmake:253 (include)
C:/ncs/ncs/zephyr/cmake/modules/zephyr_default.cmake:141 (include)
C:/ncs/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:10 (find_package)


-- Found partition manager static configuration: C:/Users/Administrator/sid_end_device_3/pm_static_nrf52840dk_nrf52840.yml
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Administrator/sid_end_device_3/build
-- west build: building application
[6/407] Generating include/generated/version.h
-- Zephyr version: 3.6.99 (C:/ncs/ncs/zephyr), build: v3.6.99-ncs2
[6/186] Generating include/generated/version.h
-- Zephyr version: 3.6.99 (C:/ncs/ncs/zephyr), build: v3.6.99-ncs2
[181/186] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/zephyr_pre0.map
cmd.exe /C "cd . && C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr\zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -fuse-ld=bfd -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/soc/soc/nrf52840/libsoc__nordic.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/segger/libmodules__segger.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L"c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m+fp/hard" -LC:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr -lgcc zephyr/arch/common/libisr_tables.a -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie C:/ncs/ncs/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.19.a C:/ncs/ncs/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a && cmd.exe /C "cd /D C:\Users\Administrator\sid_end_device_3\build\mcuboot\zephyr && C:\ncs\toolchains\ce3b5ff664\opt\bin\cmake.exe -E true""
c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `text' will not fit in region `FLASH'
c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 4042 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[235/407] Linking C static library zephyr\subsys\bluetooth\crypto\libsubsys__bluetooth__crypto.a
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf C:/Users/Administrator/sid_end_device_3/build/modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/zephyr.hex C:/Users/Administrator/sid_end_device_3/build/mcuboot/zephyr/zephyr.elf
cmd.exe /C "cd /D C:\Users\Administrator\sid_end_device_3\build\mcuboot && C:\ncs\toolchains\ce3b5ff664\opt\bin\cmake.exe --build . --"
[253/407] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/hci_core.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\ce3b5ff664\opt\bin\cmake.EXE' --build 'c:\Users\Administrator\sid_end_device_3\build'

Background: Using default demo sie_end_device without any changes, v2.7.0 SDK,compiling other demos is normal

Related