Thingy:91 (nRF9160) with nRF SDK 2.6.1 region `FLASH' overflowed error building TFM onomondo softsim_static_profile sample

Hi,

When building the Onomondo softsim_static_profile sample using nRF SDK 2.6.1 I get a region `FLASH' overflowed build error for mcuboot_subimage.

c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: address 0x1a120 of bin\tfm_s.axf section `.TFM_UNPRIV_CODE' is not within region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: bin\tfm_s.axf section `.psa_interface_thread_fn_call' will not fit in region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: address 0x1fc40 of bin\tfm_s.axf section `.gnu.sgstubs' is not within region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: address 0x1a120 of bin\tfm_s.axf section `.TFM_UNPRIV_CODE' is not within region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: address 0x1fc40 of bin\tfm_s.axf section `.gnu.sgstubs' is not within region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH' overflowed by 32100 bytes
Memory region Used Size Region Size %age Used
FLASH: 80740 B 48640 B 166.00%
RAM: 47636 B 88 KB 52.86%
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[21/346] Completed 'mcuboot_subimage'

It's a very simple main.c sample - is there a configuration change possible to build this successfully as I assumed this should just work being a sample app?

Thanks,

James

Parents Reply
  • Hi James,

    Thank you for providing the log and prj.conf.

    MCUboot takes up a large chunk of the flash, effectively halving the available space. For this reason we recommend using external flash for large applications, such as what you are trying to do. Since the Thingy:91 does not have external flash, I recommend using the nRF9160 DK if possible.

    You can try to optimize the application by following our Memory footprint optimization guide. Still, it will be difficult to get the flash footprint small enough to fit only by optimizing without removing functionality.

    Best regards,
    Marte

Children
Related