Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIFFS is deprecated and should be replaced by LittleFS #3

Open
jostsalathe opened this issue Feb 19, 2022 · 9 comments
Open

SPIFFS is deprecated and should be replaced by LittleFS #3

jostsalathe opened this issue Feb 19, 2022 · 9 comments

Comments

@jostsalathe
Copy link

See https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#spiffs-deprecation-warning.

That page claims it should be relatively easy to switch over since they "share a compatible API"...

@jostsalathe
Copy link
Author

Users should should consider that switching from SPIFFS to LittleFS will cause loss of data on the file system since the two "have incompatible on-flash implementations".

@arkhipenko
Copy link
Owner

I like spiffs and have no plans to switch in the nearest future.

@arkhipenko
Copy link
Owner

The main reason why I like spiffs is I can create the filesystem on a PC and upload it to the MC. Is there a similar script that can create LittleFS file on a PC that could be later flashed into a MC.?

@jostsalathe
Copy link
Author

jostsalathe commented Feb 19, 2022

Apparently, there is if I read this correctly: https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#uploading-files-to-file-system

Edit: ESP8266LittleFS is the Name.

I must admit, I haven't tested that tool, though.

I also don't know how all this may affect the ESP32, to be honest. I only used EspBootstrap on ESP8266 for now.

@jostsalathe
Copy link
Author

Originally I noticed the compilation to fail and saw the last output of the Arduino build which was the deprecation warning about SPIFFS.

On closer inspection I just noticed that the actual cause of the failure are a lot of redefinition errors like this:

In file included from C:\Users\josts\OneDrive\Documents\Arduino\libraries\EspBootstrap\src/EspBootstrapDict.h:37,
from c:\Users\josts\Downloads\gitClones\HumiTempSensor\HumiTempSensor.ino:8:
C:\Users\josts\OneDrive\Documents\Arduino\libraries\Dictionary\src/Dictionary.h: At global scope:
C:\Users\josts\OneDrive\Documents\Arduino\libraries\Dictionary\src/Dictionary.h:3:8: error: redefinition of 'int8_t node::create(const char*, uint8_t, const char*, uint8_t, node*, node*)'
3 | int8_t node::create(const char* aKey, _DICT_KEY_TYPE aKeySize, const char* aVal, _DICT_VAL_TYPE aValSize, node* aLeft, node* aRight) {
|        ^~~~
In file included from C:\Users\josts\OneDrive\Documents\Arduino\libraries\EspBootstrap\src/ParametersSPIFFS.h:35,
from c:\Users\josts\Downloads\gitClones\HumiTempSensor\HumiTempSensor.ino:7:
C:\Users\josts\OneDrive\Documents\Arduino\libraries\Dictionary\src/Dictionary.h:3:8: note: 'int8_t node::create(const char*, uint8_t, const char*, uint8_t, node*, node*)' previously defined here
3 | int8_t node::create(const char* aKey, _DICT_KEY_TYPE aKeySize, const char* aVal, _DICT_VAL_TYPE aValSize, node* aLeft, node* aRight) {
      |        ^~~~
In file included from C:\Users\josts\OneDrive\Documents\Arduino\libraries\EspBootstrap\src/EspBootstrapDict.h:37,
from c:\Users\josts\Downloads\gitClones\HumiTempSensor\HumiTempSensor.ino:8:
C:\Users\josts\OneDrive\Documents\Arduino\libraries\Dictionary\src/Dictionary.h:58:8: error: redefinition of 'int8_t node::updateValue(const char*, uint8_t)'
58 | int8_t node::updateValue(const char* aVal, _DICT_VAL_TYPE aValSize) {
|        ^~~~
In file included from C:\Users\josts\OneDrive\Documents\Arduino\libraries\EspBootstrap\src/ParametersSPIFFS.h:35,
from c:\Users\josts\Downloads\gitClones\HumiTempSensor\HumiTempSensor.ino:7:
C:\Users\josts\OneDrive\Documents\Arduino\libraries\Dictionary\src/Dictionary.h:58:8: note: 'int8_t node::updateValue(const char*, uint8_t)' previously defined here
   58 | int8_t node::updateValue(const char* aVal, _DICT_VAL_TYPE aValSize) {
      |        ^~~~
[...]

I have the feeling that the Dictionary library has changed since I last successfully built my project (jostsalathe/HumiTempSensor). It appears to me that it has no header guard surrounding its contents which would make it unsuitable for including it in multiple other header files...

Now I don't really know what to do with that information, though...

Would you mind checking if you can reproduce this? Just to be sure that my setup isn't just broken, somehow...

@arkhipenko
Copy link
Owner

arkhipenko commented Feb 20, 2022

Hello there. Apologies about this. I have started migrating the libs to be more PlatformIO friendly, and it is a long process with some breaks in between. I will look into this.

https://github.com/arkhipenko/Dictionary#platformio-support

@arkhipenko
Copy link
Owner

Apparently, there is if I read this correctly: https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#uploading-files-to-file-system

Edit: ESP8266LittleFS is the Name.

I must admit, I haven't tested that tool, though.

I also don't know how all this may affect the ESP32, to be honest. I only used EspBootstrap on ESP8266 for now.

Yes, there are tools integrating with Arduino IDE.
I am talking about a standalone PC-based CLI utility! Is there one for LittleFS? I just have not searched. Maybe there is.

https://github.com/igrr/mkspiffs

@jostsalathe
Copy link
Author

jostsalathe commented Feb 25, 2022

Hello there. Apologies about this. I have started migrating the libs to be more PlatformIO friendly, and it is a long process with some breaks in between. I will look into this.

https://github.com/arkhipenko/Dictionary#platformio-support

I just opened a separate issue (#4) for this since it is unrelated to SPIFFS being deprecated.

@jostsalathe
Copy link
Author

There seems to be a project that is directly based off of mkspiffs here: https://github.com/earlephilhower/mklittlefs

I didn't really look into it but maybe this can do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants