dzungpv / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266/ESP32 module
GNU General Public License v3.0
68 stars 13 forks source link

Switch to LittleFS #35

Open pzbitskiy opened 1 month ago

pzbitskiy commented 1 month ago

Replacing SPIFFS by LittleFS. No more compilation warnings.

Tested on Wemos D1 Mini:

  1. PlatformIO IDE both image and FS upload
  2. OTA both image and FS upload
dzungpv commented 2 weeks ago

Because this project also support ESP32 and Arduino IDE, so I need to test this PR before merge, and what about OTA from SPIFFS to LittleFS or must be fresh install?

pzbitskiy commented 2 weeks ago

I did firmware OTA update first and then partition OTA update. I thought about some kind of data migration but have not found a way to read the entire partition from firmware - idk, not very familiar with micro controllers programming. In theory it is possible to have both SPIFFS and LittleFS support gated by #define SPIFFS_LITTLEFS_MIGRATION macro so that it tries SPIFFS first and reads files to memory (assuming ~48K is enough for all config files), then formats it to LittleFS and writes files down. Does not look too complex, maybe I'll have time to implement this next months.