Changing board type from d1_mini_lite to d1_mini causes LittleFS data loss

Hi all,
I have a firmware that is built using
board = d1_mini_lite
in platformio.ini.

if I switch the board type to
board = d1_mini
it seems that my LittleFS get corrupted or erased…

Is there a way to change the board type without “erasing” LittleFS?

This is expected since they are declared to have a different size flash and thus use different linker scripts. DIfferent linker script means that the LittleFS (or SPIFFS etc.) partition will start at a different address.

So if you programmed a board and it created a LittleFS partition (or uploaded a data/ folder to it), it will have it programmed in flash at position X, then if you change the board it now expects the data partition to be at location Y, where it isn’t, so it’ll give you an error.

Just re-upload the filesystem to the board again after changing board = ....

These things are also referenced in the docs with

Please make sure to read ESP8266 Flash layout information first.

1 Like

thank you @maxgerhardt very appreciated.