Hi,
I upgraded my nRF5340 Audio application from NCS v2.5.0 to NCS v2.7.0 to be able updating the network core.
I noticed that in NCS v2.7.0, the nRF5340 Audio application was based on Sysbuild configuration and only the FOTA DFU was presented.
In my application I use the Serial Recovery over CDC ACM without external flash so I tried to base the upgrade to 2.7.0 on Case ID: 328874.
But after I made the Sysbuild changes, I get the same error as in Case ID: 328874:
FAILED: zephyr/CMakeFiles/zephyr.dir/C_/ncs/v2.7.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c.obj
C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNCS_APPLICATION_BOOT_BANNER_GIT_REPO -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.7.0/zephyr/kernel/include -IC:/ncs/v2.7.0/zephyr/arch/arm/include -IC:/ncs/v2.7.0/zephyr/include -IC:/nuance/leaudio_pod/ble/platform/nordic5340/build/mcuboot/zephyr/include/generated -IC:/ncs/v2.7.0/zephyr/soc/nordic -IC:/ncs/v2.7.0/zephyr/soc/nordic/nrf53/. -IC:/ncs/v2.7.0/zephyr/soc/nordic/common/. -IC:/ncs/v2.7.0/nrf/include -IC:/ncs/v2.7.0/nrf/tests/include -IC:/ncs/v2.7.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.7.0/zephyr/modules/cmsis/. -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.7.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.7.0/modules/lib/zcbor/include -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/boot_serial/include -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/bootutil/src -IC:/ncs/v2.7.0/modules/crypto/mbedtls/include -IC:/ncs/v2.7.0/modules/crypto/mbedtls/include/library -IC:/ncs/v2.7.0/modules/crypto/mbedtls/library -IC:/ncs/v2.7.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.7.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.7.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.7.0/zephyr/lib/libc/minimal/include -isystem C:/ncs/v2.7.0/zephyr/lib/libc/common/include -isystem c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.7.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/nuance/leaudio_pod/ble/platform/nordic5340/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.7.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.7.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.7.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/zephyr.dir/C_/ncs/v2.7.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c.obj -MF zephyr\CMakeFiles\zephyr.dir\C_\ncs\v2.7.0\bootloader\mcuboot\boot\boot_serial\src\boot_serial.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/C_/ncs/v2.7.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c.obj -c C:/ncs/v2.7.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c
In file included from C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
from C:/ncs/v2.7.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:27:
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
48 | #define FLASH_AREA_IMAGE_1_SLOTS PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
| ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
55 | FLASH_AREA_IMAGE_1_SLOTS
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
67 | ALL_AVAILABLE_SLOTS
| ^~~~~~~~~~~~~~~~~~~
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: note: each undeclared identifier is reported only once for each function it appears in
48 | #define FLASH_AREA_IMAGE_1_SLOTS PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
| ^~~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
55 | FLASH_AREA_IMAGE_1_SLOTS
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.7.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
67 | ALL_AVAILABLE_SLOTS
prj.conf:
# nRF5340 Audio
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Nuance CDC ACM"
CONFIG_USB_DEVICE_PID=0x530A
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_NRF5340_AUDIO=y
CONFIG_SAMPLE_RATE_CONVERTER=y
CONFIG_SAMPLE_RATE_CONVERTER_FILTER_SIMPLE=y
# General
CONFIG_DEBUG=n
CONFIG_DEBUG_INFO=n
CONFIG_ASSERT=n
CONFIG_STACK_USAGE=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_STACK_SENTINEL=y
CONFIG_INIT_STACKS=y
# Uart driver
CONFIG_SERIAL=y
# Logging
CONFIG_LOG=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_LOG_TAG_MAX_LEN=2
CONFIG_LOG_TAG_DEFAULT="--"
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_USE_SEGGER_RTT=y
CONFIG_SD_LOG_LEVEL_OFF=y
# Suppress LOG_INF messages from hci_core
CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y
CONFIG_AUDIO_DEV=2
CONFIG_TRANSPORT_CIS=y
CONFIG_AUDIO_SOURCE_I2S=y
Kconfig.sysbuild:
CONFIG_NRF_DEFAULT_IPC_RADIO=y
CONFIG_IPC_RADIO_BT=y
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
sysbuild.conf:
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_SECURE_BOOT_NETCORE=y
SB_CONFIG_NETCORE_APP_UPDATE=y
sysbuild\mcuboot.conf:
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_PM=n
CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
CONFIG_BOOT_ENCRYPT_IMAGE=n
CONFIG_BOOT_BOOTSTRAP=n
CONFIG_BOOT_MAX_IMG_SECTORS=2048
CONFIG_MULTITHREADING=y
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
# Flash
CONFIG_FLASH=y
CONFIG_FPROTECT=y
# MCUBoot serial
CONFIG_MCUBOOT_SERIAL=y
CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y
# Decrease memory footprint
CONFIG_CBPRINTF_NANO=y
CONFIG_TIMESLICING=n
CONFIG_BOOT_BANNER=n
CONFIG_CONSOLE=n
CONFIG_CONSOLE_HANDLER=n
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG=n
CONFIG_RESET_ON_FATAL_ERROR=n
# The following configurations are required to support serial recovery of the
# network image
CONFIG_PCD_APP=y
# The network core cannot access external flash directly. The flash simulator must be used to
# provide a memory region that is used to forward the new firmware to the network core.
CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
CONFIG_NRF53_RECOVERY_NETWORK_CORE=y
CONFIG_MCUBOOT_INDICATION_LED=y
# My additions
#CONFIG_BOOT_SERIAL_CDC_ACM=y
# CONFIG_PM_PARTITION_SIZE_MCUBOOT=0xE800
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0xFC00
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x5300
Omri.