Zigbee FOTA implementation

Question:

What configuration should be added for MCUboot to become aware of the size of external flash the hardware provides? 

Is there documentation of the mcu kconfig options?

I am in the process of integrating the Zigbee fota example to run on our custom hardware.

During initial development we worked with the nrf5340-development kit in order to perform initial application testing including the Zigbee FOTA example while the hardware development took place.

Our custom hardware implementation employs the NORA-B126 and replaced the external flash with the MX25R1635FZUIL0.

However the bootloader appaars unable to find a valid application image to jump to as shown by the message shown via the debug log

*** Booting Zephyr OS build v3.1.99-ncs1  ***
I: Starting bootloader
I: Swap type: none
I: Swap type: none
E: Unable to find bootable image

From our investigation we learned that mcuboot (in addition to the application) need their own configuration and overlay files. Therefore we have included the following config changes for project_app/child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf

#
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Increase main stack size
CONFIG_HEAP_MEM_POOL_SIZE=32768

# Configure logger
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
CONFIG_LOG_DEFAULT_LEVEL=0
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
CONFIG_CBPRINTF_NANO=y

# Configure MCUboot features
CONFIG_NRF53_MULTI_IMAGE_UPDATE=y
CONFIG_BOOT_UPGRADE_ONLY=y
CONFIG_BOOT_MAX_IMG_SECTORS=1024
CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=y

# Allow for storing two images in MCUboot partitions
CONFIG_UPDATEABLE_IMAGE_NUMBER=2

# Store new images inside external flash
CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y

# Enable flash simulator
CONFIG_PCD_APP=y
CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n

# Configure QSPI for external flash
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_FLASH=y
CONFIG_SPI=n
CONFIG_SPI_NOR=n
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

Related