TF-M/crypto nrf-SDK samples should use the minimum required resources

Dear Nordic Support-Team,

 the provided samples in nrf-SDK are great to show how to use several aspects of the nrf Sdk and the devices.

Nevertheless it would be great if the experts who set up those samples would show/use the minimum required resources which are absolutely needed. If you try to apply what you learned from the samples it is up to yourself to figure out which resources are really required.

As an example:

The crypto/psa_tls sample assigns 384 kB to the tfm partition (CONFIG_PM_PARTITION_SIZE_TFM=0x60000): samples/crypto/psa_tls/boards/nrf9160dk_nrf9160_ns.conf

And you find the comment "# NB: This list of PSA dependencies may be too long" in samples/crypto/psa_tls/prj.conf

If you want to apply anything from that sample to a real project where you might already struggle to fit your application with the bootloader chain into flash, assigning 384 kB to the secure partition is not possible.

So it would be really helpful if the people who are deep in the topic would provide samples which show the absolute bare minimum of resources that are needed to make the sample run.

Thanks

Stefan

Parents
  • Hi, 

    The secure partition size is affected by the features that you have enabled. Especially crypto features have high requirements on both flash and RAM usage. The psa_tls sample enables a big list of crypto algorithms, so you will have to disable the features that you don't need based on your requirements. When you build the sample the percentage of flash usage is presented to them from the build system like this:

    When you see that the flash usage is reduced as you want, you can then configure the flash partition for TF-M by setting the Kconfig configuration CONFIG_PM_PARTITION_SIZE_TFM.

    -Amanda H.

Reply
  • Hi, 

    The secure partition size is affected by the features that you have enabled. Especially crypto features have high requirements on both flash and RAM usage. The psa_tls sample enables a big list of crypto algorithms, so you will have to disable the features that you don't need based on your requirements. When you build the sample the percentage of flash usage is presented to them from the build system like this:

    When you see that the flash usage is reduced as you want, you can then configure the flash partition for TF-M by setting the Kconfig configuration CONFIG_PM_PARTITION_SIZE_TFM.

    -Amanda H.

Children
No Data
Related