PlatformIO Community

Is there a way to erase flash via WiFi?

As title.
I have an ESP8266 configured for OTA Upload.

I want to switch from SPIFFS to LittleFS.

Can I do this via OTA?
Can I simply write the same file with LittleFS over the old SPIFFS one or should I erase the flash first?

If I need to erase the flash first, can I do it via wifi?

Thanks

reading the docs answered my question:

There are two filesystems for utilizing the onboard flash on the ESP8266: SPIFFS and LittleFS.

SPIFFS is the original filesystem and is ideal for space and RAM constrained applications that utilize many small files and care about static and dynamic wear levelling and don’t need true directory support. Filesystem overhead on the flash is minimal as well.

LittleFS is recently added and focuses on higher performance and directory support, but has higher filesystem and per-file overhead (4K minimum vs. SPIFFS’ 256 byte minimum file allocation unit).

They share a compatible API but have incompatible on-flash implementations, so it is important to choose one or the per project as attempting to mount a SPIFFS volume under LittleFS may result in a format operation and definitely will not preserve any files, and vice-versa.

this means that I can simply mount a LittleFS file system to format the SPIFFS one. nice.

1 Like