How to resize MCUBoot partition in zephyr?

My product is devloping in nrf52810 with Zephyr . The flash is too small. At present, using all peripherals, the size of app_update.bin is 55KB. The size of MCUBoot partition is 48KB by default. The size of scratch is 4KB while is minimal size. And the size of NVS storage is 8KB while is minimal size. So, the slot0 and slot1 are using 68KB.  It's not enough. 

So, I want to reduce the MCUBoot partition size. The size of MCUBoot zephyr.bin is 34KB. And I think i can set the MCUBoot partition to 36KB.

&boot_partition {
    reg = <0x00000000 0xA000>;
};

&slot0_partition {
    reg = <0x0000A000 0x11000>;
};

&slot1_partition {
    reg = <0x0001B000 0x11000>;
};

&scratch_partition {
    reg = <0x0002C000 0x1000>;
};

&storage_partition {
    reg = <0x0002D000 0x3000>;
};

However, the partition manager recover the MCUBoot partition configuration while size is 0XC000. 

Is there a way to reduce the MCUBoot partition size?

Parents
  • Hi River, 

    How did you modify the partition ? Have you used the pm_static.yml to force the MCUBoot to use the partition layout that you define ? 
    I attached here a pm_static.yml I made for nRF52832 you can have a look. I changed the end address of the mcuboot partition from 0xc000 down to 0x9000 to make more space for the application. 

    What you need to do is to put the pm_static.yml into your project folder (before the build folder) and it will be used to define the partition. Please double check if partitions.yml generated in build folder matched with your pm_static.yml. 

    https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pm_5F00_static.yml

Reply
  • Hi River, 

    How did you modify the partition ? Have you used the pm_static.yml to force the MCUBoot to use the partition layout that you define ? 
    I attached here a pm_static.yml I made for nRF52832 you can have a look. I changed the end address of the mcuboot partition from 0xc000 down to 0x9000 to make more space for the application. 

    What you need to do is to put the pm_static.yml into your project folder (before the build folder) and it will be used to define the partition. Please double check if partitions.yml generated in build folder matched with your pm_static.yml. 

    https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pm_5F00_static.yml

Children
Related