earlephilhower / arduino-esp8266littlefs-plugin

Plugin to upload LittleFS filesystems to ESP8266
GNU General Public License v2.0
120 stars 20 forks source link

Flash sketch or LittleFS first? #13

Closed 877dev closed 3 years ago

877dev commented 3 years ago

As per the title I am assuming that the sketch should be flashed first, then the littleFS data uploaded second?

Does the flashing of the sketch create a partition on the ESP, or does the littleFS upload create its own partition?

When flashing littleFS for the second time, does it completely overwrite the partition, e.g. no old files remain?

I know it might seem obvious but I am not sure.

earlephilhower commented 3 years ago

Sketch then FS seems safe enough. If you do the other way, there is a change the old sketch might format the FS when it powers up after the FS is uploaded (i.e. if it was expecting SPIFFS).