MCUBoot on nrf5340: only upgrade firmware on application core

Hi Support team,

I encountered some flash overflow errors when I enabled the MCUboot on nrf5340. Could I ask several questions?

My situations and requirements:
1. My project is based on nrf5340 and NCS V2.5.2, the network core was only used for BLE controller (runs hci_rpmsg child image).
2. Before enabling MCUboot, the flash consumption is below:

           

3. I only need to upgrade the firmware on the application core because I use BLE for system configuration, and there is no need to upgrade the network core. The upgrade mode should be "swap" to support firmware rollback when the DFU fails.

Considering my current bin on the application core is 313.9KB, I believe the primary flash (1MB) can meet my requirement. 

When I set partitions in pm_static.yml like below

mcuboot:
address: 0x0
size: 0xC000 # 48 KB Bootloader

slot0:
address: 0xC000
size: 0x64000 # 400 KB Primary Slot

slot1:
address: 0x70000
size: 0x64000 # 400 KB Secondary Slot

scratch:
address: 0xD4000
size: 0x8000 # 32 KB Scratch

pcd_sram:
address: 0x10000000
size: 0x0 # forbid Netcore PCD

There are some errors occurred:
1. mcuboot flash ordata overflow, if I change mcuboot size to 64K, the error disappears. But I prefer to allocate 48K for
mcuboot and need to minimize MCUboot configuration.

2. I only want to upgrade the application core, but there was some information about the network core in the building log:

Could you help me with the below questions:
1. For my current application bin size 313.9 KB, is the primary flash enough for the solution of MCUboot swap upgrade only for the application core?

2. Could you help me revise a MCUboot configuration that can meet my requirements and consume less than 48KB partition?
My current MCUboot configuration is below:

CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE=""
CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP=n
CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH=y
CONFIG_MCUBOOT_ENCRYPTION_KEY_FILE=""
CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y
CONFIG_BOOT_BANNER=n
CONFIG_PCD_APP=y
CONFIG_PCD_NET=n


Any guidance is appreciated, thank you very much.


Best regards,
Yanpeng Wu

Parents Reply Children
No Data
Related