I'm looking for some general guidance regarding the internal storage partition where LittleFs is mounted.
I am writing a new firmware for the NRF9160 where having a larger LittleFs partition is needed. The "default" configuration for the storage partition is location 0xfa000 and size 0x6000. I am interested in increasing this size, maybe to 0xc000. From all of my research, the only way I have found to do this is to do the following:
- Enable MCUBoot (If needed, in my case it is)
- Because I am using the NRF9160 I have a multi image build so I need to use the Partition Manager instead of the partition section of the board dts file.
- Rather than building a pm_static.yml file by hand, I will just build the project normally and copy the partitions.yml from the build directory into a pm_static.yml in the app root directory.
- At this point, I'm considering modifying the app, mcuboot_primary, mcuboot_primary_app, mcuboot_secondary, and littlefs_storage (Note: I may need to edit the empty sections).
- The purpose of the modifications above are to make each of the sections a little smaller, then make the littlefs_storage proportionally larger.
Now, for my questions:
- Is the above approach correct for increasing the littlefs partition size?
- I have an older firmware running on the same PCB. What will happen if I attempt a FOTA opreation. Will the partitions be resized (assuming I don't mess with the mcuboot and mcuboot padding sections?
Note: I have attached the partitions.yml file for reference
EDIT: I created a CSV of all the partition sections within the flash_primary region. After looking at them in a flattened way, it appears that I might be able to do the following:
- Delete the EMPTY_1 and EMPTY_2 sections
- Change the nonsecure_storage section's start address from 0xf8000 to 0xf0000 (EMPTY_2 original start address)
- Change the nonsecure_storage section's end address from 0xfe000 to 0x100000 (EMPTY_1 original end address)
- Adjust the littlefs_storage section in accordance with the above changes to nonsecure_storage.
Note: This is all assuming my original approach is valid. I will await a response.