nRF Connect SDK Intermediate - Lesson 9 (DFU/MCUboot, formerly Lesson 8), exercise 2 solutions won't compile for nRF7002DK

I've had trouble getting the MCUboot to compile for our application which runs on the nRF7002DK board, and I have similar trouble with the Lesson 8 examples on the nRF7002DK board.  They worked fine on an nRF52833 board (except for the lack of a serial Flash).  I am using NCS v2.6.1.

Why can't I even get your solutions to compile for this board?

Here is the output when I build the exercise 2 solution from Nordic for an nrf7002dk_nrf5340_cpuapp target:

 *  Executing task: nRF Connect: Build [pristine]: inter_less8_exer2_solution/build (active) 

Building inter_less8_exer2_solution
west build --build-dir /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution --pristine --board nrf7002dk_nrf5340_cpuapp -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/Users/Glen/Projects/nordic/my_boards;/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf7002dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/app.overlay
-- Generated zephyr.dts: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/prj.conf'
Configuration saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/zephyr/.config'
Kconfig header saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
  CONFIG_USB_DEVICE_VID has default value 0x2FE3.

  This value is only for testing and MUST be configured for USB products.


CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
  CONFIG_USB_DEVICE_PID has default value 0x100.

  This value is only for testing and MUST be configured for USB products.


-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found version "3.9.6") found components: Interpreter 

=== child image mcuboot -  begin ===
loading initial cache file /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf7002dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/flash_sim.overlay
-- Found devicetree overlay: /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/usb.overlay
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot.overlay
-- Generated zephyr.dts: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/dts.cmake

warning: NORDIC_QSPI_NOR (defined at /opt/nordic/ncs/v2.6.1/nrf/Kconfig.nrf:99,
drivers/flash/Kconfig.nordic_qspi_nor:4) was assigned the value 'y' but got the value 'n'. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NORDIC_QSPI_NOR and/or look up
NORDIC_QSPI_NOR 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 /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot.conf'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/.config'
Kconfig header saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
  CONFIG_USB_DEVICE_VID has default value 0x2FE3.

  This value is only for testing and MUST be configured for USB products.


CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
  CONFIG_USB_DEVICE_PID has default value 0x100.

  This value is only for testing and MUST be configured for USB products.


-- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
  No SOURCES given to Zephyr library: drivers__console

  Excluding target from build.


MCUBoot bootloader key file: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/root-rsa-2048.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot
=== child image mcuboot -  end ===

CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/CMakeLists.txt:382 (message):
  

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



-- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
CMake Warning at /opt/nordic/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):
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:7 (find_package)


CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:601 (message):
  Could not find memory mapped address for XIP.  Generated update hex files
  will not have the correct base address.  Hence they can not be programmed
  directly to the external flash
Call Stack (most recent call first):
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:7 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build
-- west build: building application
[1/225] Preparing syscall dependency handling

[3/225] Generating include/generated/version.h
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1-1-gef358de7de84
[1/327] Preparing syscall dependency handling

[4/327] Generating include/generated/version.h
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1-1-gef358de7de84
[322/327] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/zephyr_pre0.map 
: && ccache /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -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=/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/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/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.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/arm/nordic_nrf/libsoc__arm__nordic_nrf.a  zephyr/drivers/usb/device/libdrivers__usb__device.a  zephyr/drivers/usb/common/nrf_usbd_common/libdrivers__usb__common__nrf_usbd_common.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/hwinfo/libdrivers__hwinfo.a  zephyr/drivers/mbox/libdrivers__mbox.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  modules/mbedtls/libmodules__mbedtls.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/zcbor/libmodules__zcbor.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main/nofp"  -L/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  -mcpu=cortex-m33  -mthumb  -mabi=aapcs  -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  /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_platform/lib/cortex-m33/soft-float/no-interrupts/libnrf_cc312_platform_0.9.19.a && cd /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake -E true
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 11036 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[206/225] Linking C static library zephyr/drivers/flash/libdrivers__flash.a
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/zephyr.hex /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot/zephyr/zephyr.elf 
cd /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build/mcuboot && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake --build . --
[208/225] Building C object zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/580e4ef81c/bin/cmake --build /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

And here is the output when I build for an nrf7002dk_nrf5340_cpuapp_ns target.

 *  Executing task: nRF Connect: Build [pristine]: inter_less8_exer2_solution/build_1 (active) 

Building inter_less8_exer2_solution
west build --build-dir /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1 /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution --pristine --board nrf7002dk_nrf5340_cpuapp_ns -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/Users/Glen/Projects/nordic/my_boards;/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf7002dk_nrf5340_cpuapp_ns
-- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_ns.dts
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/app.overlay
-- Generated zephyr.dts: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_ns_defconfig'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/prj.conf'
Configuration saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/zephyr/.config'
Kconfig header saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
  CONFIG_USB_DEVICE_VID has default value 0x2FE3.

  This value is only for testing and MUST be configured for USB products.


CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
  CONFIG_USB_DEVICE_PID has default value 0x100.

  This value is only for testing and MUST be configured for USB products.


-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found version "3.9.6") found components: Interpreter 
Changed board to secure nrf7002dk_nrf5340_cpuapp (NOT NS)

=== child image mcuboot -  begin ===
loading initial cache file /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf7002dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/flash_sim.overlay
-- Found devicetree overlay: /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/usb.overlay
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot.overlay
-- Generated zephyr.dts: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/dts.cmake

warning: NORDIC_QSPI_NOR (defined at /opt/nordic/ncs/v2.6.1/nrf/Kconfig.nrf:99,
drivers/flash/Kconfig.nordic_qspi_nor:4) was assigned the value 'y' but got the value 'n'. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NORDIC_QSPI_NOR and/or look up
NORDIC_QSPI_NOR 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 /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/tfm.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/fih_low_enable.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/child_image/mcuboot.conf'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/.config'
Kconfig header saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
  CONFIG_USB_DEVICE_VID has default value 0x2FE3.

  This value is only for testing and MUST be configured for USB products.


CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
  CONFIG_USB_DEVICE_PID has default value 0x100.

  This value is only for testing and MUST be configured for USB products.


-- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
  No SOURCES given to Zephyr library: drivers__console

  Excluding target from build.


MCUBoot bootloader key file: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/root-rsa-2048.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot
=== child image mcuboot -  end ===

CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/CMakeLists.txt:382 (message):
  

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



-- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
CMake Warning at /opt/nordic/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):
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:7 (find_package)


Dropping partition 'nonsecure_storage' since it is empty.
CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:601 (message):
  Could not find memory mapped address for XIP.  Generated update hex files
  will not have the correct base address.  Hence they can not be programmed
  directly to the external flash
Call Stack (most recent call first):
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:7 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1
-- west build: building application
[1/302] Preparing syscall dependency handling

[6/302] Generating include/generated/version.h
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1-1-gef358de7de84
[1/322] Preparing syscall dependency handling

[4/322] Generating include/generated/version.h
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1-1-gef358de7de84
[317/322] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/zephyr_pre0.map 
: && ccache /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -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=/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/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/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/libc/common/liblib__libc__common.a  zephyr/soc/soc/arm/nordic_nrf/libsoc__arm__nordic_nrf.a  zephyr/drivers/usb/device/libdrivers__usb__device.a  zephyr/drivers/usb/common/nrf_usbd_common/libdrivers__usb__common__nrf_usbd_common.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/hwinfo/libdrivers__hwinfo.a  zephyr/drivers/mbox/libdrivers__mbox.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  modules/mbedtls/libmodules__mbedtls.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/zcbor/libmodules__zcbor.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main/nofp"  -L/Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  -mcpu=cortex-m33  -mthumb  -mabi=aapcs  -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  /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_platform/lib/cortex-m33/soft-float/no-interrupts/libnrf_cc312_platform_0.9.19.a && cd /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake -E true
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `bss' will not fit in region `RAM'
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 10092 bytes
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 268464 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[14/302] 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: /opt/nordic/ncs/toolchains/580e4ef81c/bin/git (found version "2.37.3") 
-- 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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found version "3.9.6") found components: Interpreter 
CMake Deprecation Warning at /opt/nordic/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):
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/python.cmake:16 (find_package)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/user_cache.cmake:30 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/extensions.cmake:5 (include)
  /opt/nordic/ncs/v2.6.1/nrf/subsys/nrf_security/tfm/CMakeLists.txt:38 (include)


-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Configuring done
-- 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: /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/tfm
[19/302] No configure step for 'tfm'
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/zephyr.hex /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot/zephyr/zephyr.elf 
cd /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1/mcuboot && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake --build . --
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/580e4ef81c/bin/cmake --build /Users/Glen/Projects/Opus/workspace/inter_less8_exer2_solution/build_1

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

I am focused on Exercise 2 because we want to use USB for the DFU.  But even the solution for Exercise 1 for a UART DFU fails to compile:

 *  Executing task: nRF Connect: Generate config nrf7002dk_nrf5340_cpuapp for /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution 

Building inter_less8_exer1_solution
west build --build-dir /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution --pristine --board nrf7002dk_nrf5340_cpuapp -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/Users/Glen/Projects/nordic/my_boards

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf7002dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/prj.conf'
Configuration saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/zephyr/.config'
Kconfig header saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found version "3.9.6") found components: Interpreter 

=== child image mcuboot -  begin ===
loading initial cache file /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/Glen/Library/Caches/zephyr
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf7002dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/usb.overlay
-- Found devicetree overlay: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/child_image/mcuboot.overlay
-- Generated zephyr.dts: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.6.1/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
Merged configuration '/opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/child_image/mcuboot.conf'
Merged configuration '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/.config'
Kconfig header saved to '/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
  No SOURCES given to Zephyr library: drivers__console

  Excluding target from build.


CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
  No SOURCES given to Zephyr library: drivers__spi

  Excluding target from build.


MCUBoot bootloader key file: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/root-rsa-2048.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot
=== child image mcuboot -  end ===

CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/CMakeLists.txt:382 (message):
  

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



-- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
CMake Warning at /opt/nordic/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):
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:4 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build
-- west build: building application
[1/209] Preparing syscall dependency handling

[5/209] Generating include/generated/version.h
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1-1-gef358de7de84
[1/288] Preparing syscall dependency handling

[4/288] Generating include/generated/version.h
-- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1-1-gef358de7de84
[283/288] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/zephyr_pre0.map 
: && ccache /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -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=/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/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/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.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/arm/nordic_nrf/libsoc__arm__nordic_nrf.a  zephyr/drivers/clock_control/libdrivers__clock_control.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/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  modules/mbedtls/libmodules__mbedtls.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/zcbor/libmodules__zcbor.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main/nofp"  -L/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  modules/mbedtls/libmbedTLSBase.a  modules/mbedtls/libmbedTLSCrypto.a  modules/mbedtls/libmbedTLSX509.a  -mcpu=cortex-m33  -mthumb  -mabi=aapcs  -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  /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_platform/lib/cortex-m33/soft-float/no-interrupts/libnrf_cc312_platform_0.9.19.a && cd /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake -E true
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/flash/libdrivers__flash.a(spi_nor.c.obj): in function `k_sleep':
/Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:135: undefined reference to `z_impl_k_sleep'
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:135: undefined reference to `z_impl_k_sleep'
/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/flash/libdrivers__flash.a(spi_nor.c.obj):(.rodata.spi_nor_config_0+0x0): undefined reference to `__device_dts_ord_143'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[197/209] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/zephyr.hex /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot/zephyr/zephyr.elf 
cd /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build/mcuboot && /opt/nordic/ncs/toolchains/580e4ef81c/Cellar/cmake/3.21.0/bin/cmake --build . --
[199/209] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       45940 B     491008 B      9.36%
             RAM:       12720 B       448 KB      2.77%
        IDT_LIST:          0 GB        32 KB      0.00%
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/580e4ef81c/bin/cmake --build /Users/Glen/Projects/Opus/workspace/inter_less8_exer1_solution/build

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Why do these work for the nRF52833DK, but not the nRF7002DK?  The nRF7002DK is listed as a board that should work since it has USB.

  • I also tried this with NCS v2.6.2.  Same results.  I can build the solutions for Exercise 1 for the nRF52833DK, nRF52840DK and nRF5340DK boards, but not the nRF7002DK.  For Exercise 2 the nRF52833DK doesn't work because it doesn't have the serial flash, but nRF52840DK and nRF5340DK work and again nRF7002DK does not.

  • An update:  When I changed CONFIG_PM_PARTITION_SIZE_MCUBOOT to 0x20000 as suggested in the lesson I was able to get it to compile and work.  I am confused about a few things, however, that might be worth clarifying in the lesson text for v2.6.x:

    Exercise 2, step 8 gives a broken link to https://github.com/nrfconnect/sdk-nrf/tree/main/samples/net/aws_iot/child_image/mcuboot/boards which should give more information about how to configure to use SPI for the external Flash instead of QSPI since the QSPI is connected to the nRF7002 chip.  I found this under the sysbuild folder that looks mostly like what you have in the `child_image/mcuboot/boards` folder in the solution.

    In the `nrf7002dk_nrf5340_cpuapp.conf` file in the `child_image/mcuboot/boards` folder in the solution, the CONFIG_PM_PARTITION_SIZE_MCUBOOT value is set to 0x10000.  If I had to change this to 0x20000 in the `mcuboot.conf` to get the nRF7002dk build to work, why is it 0x10000 in the nRF7002dk specific config file?  I would have thought that board specific settings would take precedence over the more general settings in `mcuboot.conf`, but apparently not since the generated `autoconf.h` file has the 0x20000 value.

    So if `child_image/mcuboot.conf` file takes precedence over the `child_image/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf`, then the `CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000` setting is ignored, and the `CONFIG_BOOT_MAX_IMG_SECTORS=256` setting is redundant.

    It seems odd that the board specific config file can add new config settings, but not override the more general settings in `mcuboot.conf`.

    So now that I have a working example, I can go back to figuring out why MCUboot is a problem to add to our app.  But I am curious about the above questions about config setting precedence.  How would one go about overriding a setting just for a particular board?  (For our app I'll just make all the settings in the mcuboot.conf to keep it simple.)

  • Hi Glen,

    Thanks for the report! I have reported this to our DevAcademy team and they will get it fixed so the lesson works for the nRF7002DK as well.

    Saxman58 said:

    In the `nrf7002dk_nrf5340_cpuapp.conf` file in the `child_image/mcuboot/boards` folder in the solution, the CONFIG_PM_PARTITION_SIZE_MCUBOOT value is set to 0x10000.  If I had to change this to 0x20000 in the `mcuboot.conf` to get the nRF7002dk build to work, why is it 0x10000 in the nRF7002dk specific config file?  I would have thought that board specific settings would take precedence over the more general settings in `mcuboot.conf`, but apparently not since the generated `autoconf.h` file has the 0x20000 value.

    Yea this is a oversight from us. When I wrote this lesson I assumed that the board file should take precedence over mcuboot.conf, but if you see the oppsosite I assume it does not do that.

    Instead, if you want to use the board file, you have to have child_image/mcuboot/prj.conf which overwrites the mcuboot default config. So I suggest that you copy this prj.conf into child_image/mcuboot/prj.conf.

    However, since you likely just use one board, it is simpler to just have it all in mcuboot.conf. We just try to make it more flexible to make the solution work for more different boards.

    PS:
    In v2.7.0 and later we have updated to Sysbuild! If you intend to update your application soon, I suggests learning that method instead. While it is similar, it differs in some ways as well.
    And we just released Lesson 8 on just Sysbuild, which will hopefully help with these things as well.

    We are also working on updating Lesson 9 to Sysbuild now. E1-E3 are already updated.

  • Thanks, Sigurd.  I did decide to put everything in mcuboot.conf since we just have one board, but it is good to see the technique for supporting multiple boards in the MCUboot build.

    And thank you for the new prj.conf.  That has some good tips for how to shrink the MCUboot size further, which may become important as our application grows.

Related