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

  • Hi Maria,

    I get an error when saving a reply with the contents of these files via insert -> code - presumably as they're too large.

    However, I've managed to add them as a zip file below instead.

    Thanks,

    James

    0358.build.zip

  • 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

  • Thanks for the update - sounds like the only viable workaround to use the Thingy:91 is to revert to a physical SIM card for now instead of SoftSIM.

  • Hi,

    If you want to use the Thingy:91 and Asset Tracker v2, then that is likely the best option, unfortunately.

    Best regards,
    Marte

  • Hi,

    I have now reverted to a physical SIM and run the following commands (to revert the Onomondo SoftSIM build config) but am now getting build failures for the previously working build due to undefined types in the config files.

    west config manifest.path zephyr
    west update

    Is there anything else I need to do to reverse the SoftSIM build config? Build log below.

    Thanks,

    James

    --

    -- Including generated dts.cmake file: C:/ncs/v2.6.1/nrf/applications/asset_tracker_v2/build/zephyr/dts.cmake

    warning: MQTT_KEEPALIVE (defined at subsys/net/lib/mqtt/Kconfig:20) was assigned the value '600' but
    got the value ''. Check these unsatisfied dependencies: MQTT_LIB (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    MQTT_KEEPALIVE in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    warning: NRF_CLOUD_AGNSS (defined at C:/ncs/v2.6.1/nrf/applications/asset_tracker_v2\src/modules/Kconfig.cloud_module:18) defined without a type

    warning: NRF_CLOUD_DEVICE_STATUS_ENCODE_VOLTAGE (defined at C:/ncs/v2.6.1/nrf/applications/asset_tracker_v2\src/modules/Kconfig.cloud_module:30) defined without a type

    <etc>

Related