Why is SPM image so large (64 KB)?

While looking at ways to shrink the dfu image of our nrf9160 application, I was struck by how large the default SPM image is. Here's the file size breakdown:

Final app_update.bin = 221KB with

  • Main NS application including MCU boot 157KB (MCU Boot is 31KB)
  • SPM application = 64KB

We are only building the NS application, which I understand builds a default secure application. 

Why is the SPM so large when it should have next to nothing inside?

  • Hi,

     

    You could technically get spm down to 32k, but that has a cost of removing the secure services library (and all the depending libraries, like cc310), and thus the RNG function, which is a non-secure callable function. This sources the entropy library, and thus the rand32 library (function "sys_rand32_get"), which is used in most nRF9160 application

     

    Kind regards,

    Håkon

Related