Environment
SIM type: SoftSIM
Device: Nordic Semiconductor nRF91 series
Github: nrf-softsim repository
Question
Is there any way to reduce the memory footprint of the SoftSIM's code?
Why does SoftSIM's TF-M partition take up a lot of flash and RAM?
Answer
You cannot reduce SoftSIM's memory footprint.
β
βWorkaround:
β
You can introduce a partitioning scheme within the nRF91 memory to optimize it.
See an example on GitHub and follow the instruction.
This does not change the memory footprint of the SoftSIM application itself or its file system.
Cause
The TF-M partition within the memory takes up a lot of flash and RAM, but it is necessary to securely store the SIM data.
β
The TF-M is introduced to support hardware-accelerated cryptographic operations. These operations are only available through a TF-M Secure Zone. TF-M, in its base configuration, can reserve a lot of memory on the chip, but it doesn't have to.
The reason that we require the CONFIG_TFM_PROFILE_TYPE_NOT_SET
option to be set is simply a result of Nordic not supporting the cryptographic operations in any of the other TF-M profiles.
The good news is that the memory usage and layout of TF-M can be optimized by introducing the above partitioning scheme.