This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NCS/Zephyr/MCUBoot - Image too large for flash region

Hi,

I've recently updated to the latest NCS repo. I'm not entirely sure what version of NCS i was on before (perhaps if you could tell me how to check - as i made a copy of that entire directory before updating), but I was on Zephyr 2.3.0 and I'm now on 2.3.99.

When building my image before, the image was too big for the flash region, but I was able to change MCUBoot's prj.conf to include: CONFIG_BOOT_SWAP_USING_MOVE=y. This then allowed my image to fit in because there was no swap partition. This was the rom_report for my image on the previous version:

[2/2] Running utility command for rom_report
Partition Manager report
FLASH (0x80000):
+-----------------------------------------+
| 0x0: mcuboot (0x98f0) |
| 0x98f0: EMPTY_0 (0x710) |
+---0xa000: mcuboot_primary (0x29000)-----+
| 0xa000: mcuboot_pad (0x200) |
+---0xa200: mcuboot_primary_app (0x28e00)-+
| 0xa200: app (0x28e00) |
| 0x33000: mcuboot_scratch (0x1e000) |
| 0x51000: mcuboot_secondary (0x29000) |
| 0x7a000: littlefs_storage (0x6000) |
+-----------------------------------------+


After upgrading and building the same project, I now get the following error:

Memory region         Used Size  Region Size  %age Used

           FLASH:      270804 B     212480 B    127.45%

            SRAM:       50696 B        64 KB     77.36%

        IDT_LIST:         216 B         2 KB     10.55/home/chris/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/9.2.0/../../../../arm-zephyr-eabi/bin/ld: zephyr/zephyr_prebuilt.elf section `text' will not fit in region `FLASH'

/home/chris/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/9.2.0/../../../../arm-zephyr-eabi/bin/ld: region `FLASH' overflowed by 58324 bytes

Could you please tell me what I can do to make this work like on the old version?

Parents
  • Sorry, the rom_report I included in my question is before the config option is added to the prj.conf. This is what it is afterwards (jn the old version):

    Partition Manager report
    FLASH (0x80000):
    +-----------------------------------------+
    | 0x0: mcuboot (0xc000)                   |
    +---0xc000: mcuboot_primary (0x37000)-----+
    | 0xc000: mcuboot_pad (0x200)             |
    +---0xc200: mcuboot_primary_app (0x36e00)-+
    | 0xc200: app (0x36e00)                   |
    | 0x43000: mcuboot_secondary (0x37000)    |
    | 0x7a000: littlefs_storage (0x6000)      |
    +-----------------------------------------+
Reply
  • Sorry, the rom_report I included in my question is before the config option is added to the prj.conf. This is what it is afterwards (jn the old version):

    Partition Manager report
    FLASH (0x80000):
    +-----------------------------------------+
    | 0x0: mcuboot (0xc000)                   |
    +---0xc000: mcuboot_primary (0x37000)-----+
    | 0xc000: mcuboot_pad (0x200)             |
    +---0xc200: mcuboot_primary_app (0x36e00)-+
    | 0xc200: app (0x36e00)                   |
    | 0x43000: mcuboot_secondary (0x37000)    |
    | 0x7a000: littlefs_storage (0x6000)      |
    +-----------------------------------------+
Children
No Data
Related