PaulStoffregen / LittleFS

73 stars 20 forks source link

Ram2 and PSRAM are WarmStart Static - Mount existing when possible #12

Closed Defragster closed 3 years ago

Defragster commented 3 years ago

on .begin() all LittleFS_RAM did a :: memset(ptr, 0xFF, size); // always start with blank slate

On RAM2 and PSRAM media that wiped what any Warm Restart would have persistent FS to mount.

Removed that and tried a mount before format - RAM1 always zeroed will always fail that.

Then updating the static_sync() called by core lfs code added cache flush for the extent of RAM2 or PSRAM give the .context

Tested with Host initiated reset, Button, or code upload and LFSIntegrity then found no file errors.