Increase Non secure flash size

Hi, we are developing a project based on the LWM2M client, everything is working fine but now we need three non volatile variables. We did some testing with the nvs example and decided to continue with it, but when we add the nvs code to the main code it runs out of memory.

This is the terminal output for the spm subimage size

Memory region         Used Size  Region Size  %age Used
           FLASH:       65024 B        64 KB     99.22%
            SRAM:       11832 B        64 KB     18.05%
        IDT_LIST:          0 GB         2 KB      0.00%

This one is for the mcu_boot subimage
Memory region         Used Size  Region Size  %age Used
           FLASH:       31928 B        48 KB     64.96%
            SRAM:       16512 B     178968 B      9.23%
        IDT_LIST:          0 GB         2 KB      0.00%

This one is for the app

Memory region         Used Size  Region Size  %age Used
           FLASH:      349036 B     392704 B     88.88%
            SRAM:       90880 B     178968 B     50.78%
        IDT_LIST:          0 GB         2 KB      0.00%

All of the application is built in the non secure partition and since there is a lot of flash is still available, I think increasing the non secure region will solve the problem. I have read some post about using the secure partition manager to handle this and create a pm_static.yml , is this the right approach? I also see that this is not recommended and is better to let the python script to handle the partidion, so is there any configuration than can be changed to let the script handle it?

Thanks in advance

Parents Reply Children
No Data
Related