Reducing Flash Occupancy

Hi,

We came close to occupying all available flash memory in the nRF52833 board:

Memory region Used Size Region Size %age Used
FLASH: 185620 B 187904 B 98.78%
SRAM: 37832 B 128 KB 28.86%
IDT_LIST: 0 GB 2 KB 0.00%

After a lot of optimizations we were able to reduce it to 83%:

Memory region Used Size Region Size %age Used
FLASH: 159652 B 192000 B 83.15%
SRAM: 37512 B 128 KB 28.62%
IDT_LIST: 0 GB 2 KB 0.00%

However, we are very concerned that it might not be enough for our future needs.

Partition Manager Report shows us the following picture of flash occupancy:

We see that MCUboot occupies most of the flash - 188 x 2 KB

and that bo (nRF Secure Immutable Bootloader) another 32 KB

This leaves our app only 187KB out of 512KB flash size!

I understand that we must use MCUboot for FOTA / DFU, as we're working with nRF Connect SDK.

1. Can we drop bo?

2. Is there a way to drop the secondary slot of MCUboot?

3. Are there any additional optimizations we can make?

Many Thanks!

Vitaliy

Parents
  • Hi Vitaliy,

    1. Can we drop bo?

    Yes, you can drop B0 (nRF Secure Immutable Bootloader). In that case the MCUBoot will have to be the immutable bootloder, so you will not have a upgradable MCUBoot (see Secure bootloader chain).

    2. Is there a way to drop the secondary slot of MCUboot?

    Yes, when you drop the nRF Secure Immutable Bootloader and use only MCUBoot as immutable bootloader there is no need for a secondary slot for MCUBoot (so you save another 48 kB).

    3. Are there any additional optimizations we can make?

    The above are the main flash usage optimizations you can do with regards to DFU architecture. For other memory optimizations you can refer to Memory Optimization with the nRF Connect SDK.

    Einar

Reply
  • Hi Vitaliy,

    1. Can we drop bo?

    Yes, you can drop B0 (nRF Secure Immutable Bootloader). In that case the MCUBoot will have to be the immutable bootloder, so you will not have a upgradable MCUBoot (see Secure bootloader chain).

    2. Is there a way to drop the secondary slot of MCUboot?

    Yes, when you drop the nRF Secure Immutable Bootloader and use only MCUBoot as immutable bootloader there is no need for a secondary slot for MCUBoot (so you save another 48 kB).

    3. Are there any additional optimizations we can make?

    The above are the main flash usage optimizations you can do with regards to DFU architecture. For other memory optimizations you can refer to Memory Optimization with the nRF Connect SDK.

    Einar

Children
Related