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

Switch over to LittleFS #13

Open
cgreening opened this issue Oct 4, 2021 · 3 comments
Open

Switch over to LittleFS #13

cgreening opened this issue Oct 4, 2021 · 3 comments
Labels
enhancement New feature or request on hold Needs to wait

Comments

@cgreening
Copy link
Collaborator

SPIFFS seems to be a bit broken (doesn't always seem to be able to save data).

Let's try switching to LittleFS: https://github.com/joltwallet/esp_littlefs

@cgreening
Copy link
Collaborator Author

This seems to be a lot more complicated than I initially thought. There isn't official support for LittleFS in the ESP32 and platformio doesn't have out of the box support for building LittleFS filesystems when using the ESP32.

@Pablo2048
Copy link

Hi Chris. There is official support for LittleFS, unfortunately in Core 2.0.0 which is not availble right now directly in pio. You can do some workarounds. For example:

  • You can use Lorol's LITTLEFS library (Library name has changed in the Core for ESP8266 compatibility)
  • You can use small patch to filesystem build tools. The patch consists of two steps: one is simple python script:
Import("env")
env.Replace( MKSPIFFSTOOL=env.get("PROJECT_DIR") + '/tools/mklittlefs/mklittlefs' )

the script is named littlefsbuilder.py, and I'm using it like this (in the platformio.ini):

extra_scripts =
  ./tools/littlefsbuilder/littlefsbuilder.py

You have to install mklittlefs tool into tools/mklittlefs/ subdirectory.

You can give it a try.

@cgreening
Copy link
Collaborator Author

Tempted to wait on this one until platformio has official support - I'm a bit worried about how to make it work cross platform.

@martinberlin martinberlin added the on hold Needs to wait label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold Needs to wait
Projects
None yet
Development

No branches or pull requests

3 participants