Porting from SDK 0.7.0 to 0.11.0 my mcuboot now overflows the flash size. I understand I could make the partition bigger but that doesn’t work since it would break remote updating for devices in the field. Are there any config options that would get my mcuboot size lower?
I reproduced the overvlow in the latest GitHub - golioth/reference-design-template: Template for making new Golioth Reference Design repositories (post v2.0.0)
I add these lines into Cmake.lists
list(APPEND mcuboot_OVERLAY_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf)
list(APPEND mcuboot_CONF_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Create a mcuboot.conf in the same directory as prj.conf with the lines below
CONFIG_MULTITHREADING=y
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="../my-key.pem"
CONFIG_PRIVILEGED_STACK_SIZE=1024
CONFIG_PARTITION_MANAGER_ENABLED=y
CONFIG_FLASH_MAP_CUSTOM=y
CONFIG_UART_CONSOLE=n
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=2000
#CONFIG_MCUBOOT_LOG_LEVEL_OFF=y
and generate my-key.pem RSA key one level up so it’s not in the GIT project.
The result is a 1.3kB overflow of the MCUboot flash region.
...zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
...region `FLASH' overflowed by 1288 bytes
collect2: error: ld returned 1 exit status
For now, I un-comment the MCUBOOT_LOG_LEVEL_OFF line above and it just fits but I’d like to leave logging enabled.
Memory region Used Size Region Size %age Used
FLASH: 48192 B 48 KB 98.05%
RAM: 28712 B 32 KB 87.62%
Are there any config options that would get my mcuboot size lower?