Possibility of nonvolatile littlefs?

bobpellegrino

Well-known member
A few years ago Paul mentioned something about possibly modifying the boot loader to not overwrite the littlefs area when uploading a new sketch.

Has any more thought been given to this?
 
AFAIK this is already how it works; teensyloader only erases the flash area required for the sketch. LittleFS uses the highest portion of unused flash (below the area reserved for EEPROM emulation) so as long as the new sketch doesn't intrude on it, it should be preserved.
 
Yup, this was done ages ago.

Just create a LittleFS_Program instance and when you call begin(), give it a size that uses 1.5M or less if your program is bigger than 512K.

The first 512K is always erased, even if your program is smaller, so keep that in mind if you want to maximize space.
 
Back
Top