AWS IOT example - utilizing ~92.5% flash without configuration changes on 7002DK

Hi Nordic Support Team,I'm experiencing severe memory constraints with the AWS IoT Core example on the nRF7002DK (nRF5340) that make it impractical for real-world applications requiring WiFi provisioning and custom functionality.

Current Memory Usage:

Memory region         Used Size  Region Size  %age Used
           FLASH:      742308 B       784 KB     92.46%
             RAM:      327392 B       400 KB     79.93%
        IDT_LIST:          0 GB        32 KB      0.00%

I appreciate that the example includes comprehensive crypto and certificate handling, but the current memory footprint makes it challenging to build practical applications on top of it.

The AWS IoT Core example leaves only ~40KB of flash memory available, which is insufficient for adding WiFi provisioning logic and custom application code that would be required in a production scenario

Build Configuration:

  • SDK: nRF Connect SDK v3.1.1
  • Toolchain: nRF Connect SDK Toolchain v3.1.1
  • Board target: nrf7002dk/nrf5340/cpuapp/ns
  • Extra Kconfig fragments: boards/nrf7002dk_nrf5340_cpuapp_ns.conf
  • Optimization level: Use project default
  • Build directory: build
  • System build (sysbuild):
  • Build system default
  • Use sysbuild: Yes
  • No sysbuild: No

Key Configuration Details:

  • Using external flash (mx25r64) for partition manager
  • FOTA enabled (required for our use case)
  • TF-m optimizations are applied.

Attempts Made:

  1. Tried building without /ns suffix: Build failed
  1. WiFi Firmware Patches: I understand these could potentially be moved to save space, but I've seen Nordic support advise against relocating them - seems complicated with FOTA, but does give 83KB. I was not able to get this to apply to the project successfuly.

Requirements:

  • FOTA capability (non-negotiable)
  • WiFi provisioning functionality
  • IOT Core shadow states and telemetry.
  • Production-ready security (not necessarily using TF-M). but SSL/https required.

Questions:

  1. What would be the easiest Flash saving for a project based on this example, given that FOTA is needed.
  1. What is the official guidance on building without TF-M (/ns) for production applications? What security implications should we consider?
  1. Is there a way to optimize the TF-M memory allocation to reclaim some of the apparent 16KB waste in trustzone storage? Or shrink the 128KB it is taking?

    If its not possible to make quite big savings, I'll consider not using IOT core, but it requires doing all the telemetry and much more work on the FOTA manually.

Any guidance on the largest bang for buck memory optimization strategies or alternative starting point would be greatly appreciated.

Kind Regards

Dan

Parents Reply Children
No Data
Related