Application becomes invalid from mcuboot point of view when the size of the application increases #63070
-
Hello community ! Well that a bit strange and to be honnest I don't know really how to continue investigating on this, so I query your help or ideas on this topic: I have an application running on nucleo_h745zi_q board with mcuboot located on the first sector of the flash0. The application is building and running properly until I'm adding some functions from mbedtls, for example
If removing the mbedtls functions then the application properly starts. I don't make any changes to the configuration, particularly to the mbedtls part. Any advice to help on this ? I have notice the relevant functions added are removed from the "Discarded input sections" list in the map file, seems correct. That's all. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Just got deeper into the issue and understood what was wrong. It was not with mbedtls, this is notice at this time just because the software becomes bigger with mbedtls. Details are below: My configuration was the following:
When using CONFIG_BOOT_SWAP_USING_MOVE, this limit the size of the application to N-1 sectors for each slot, so this limit the size of the application to 256KB on the STM32H745 with this memory layout. There is 128KB waste for the management of the swap using move when an upgrade is done. The issue I deal with was because adding more code, and particularly mbedtls library, the size of my application reached 256KB (about 300KB at the end). Thus mcuboot complains it will not be possible to swap. Message is not explicit, the error was indicating the image is not valid, but nothing was wrong with the signature process. Changing the configuration, I have now the following:
The configuration of mcuboot is done with CONFIG_BOOT_SWAP_USING_SCRATCH=y instead and so now the scratch partition is used to perform the upgrades. Firmware properly starting with this configuration of the bootloader :-) |
Beta Was this translation helpful? Give feedback.
Just got deeper into the issue and understood what was wrong. It was not with mbedtls, this is notice at this time just because the software becomes bigger with mbedtls.
Details are below:
My configuration was the following:
When using CONFIG_BOOT_SWAP_USING_MOVE, this limit the size of the application to N-1 sectors for each slot, so this limit the size of the application to 256KB on the STM32H745 with this memory layout. There is 128KB waste for the management of the swap using move when an upgrade is done.
The issue I deal with was because adding more code, and particularly mbedtls library,…