LITTLEFS
LittleFS library for arduino-esp32
- A LittleFS wrapper for Arduino ESP32 of Mbed LittleFS
- Based on ESP-IDF port of joltwallet/esp_littlefs , thank you Brian!
- Independent library, no need ESP-IDF SDK and arduino + littlefs component recompiling / re-integration, but it could be implemented this way, too.
- Functionality is the same and SPIFFS partition scheme and data folder meaning are kept
- You can use either LITTLEFS or SPIFFS but not both simultaneously on given Arduino project
Installation
- Make sure you use one of the supported versions of Arduino IDE and have ESP32 core installed. (tested on 1.0.4)
- Copy LITTLEFS folder to Arduino IDE embedded libraries place
For Win, the default place of arduino-esp32 core libraries is somewhere like:
- Alternatively, you can put it to your usual libraries place
### Usage
- In your existing code, replace SPIFFS like this
#define USE_LittleFS
#include
#ifdef USE_LittleFS
#define SPIFFS LITTLEFS
#include
#else
#include
#endif
```
Differences with SPIFFS (and in this implementation)
- LittleFS has folders, you my need to tweak your code to iterate files in folders
- Root: /someting = something, so attention to /
- Lower level littlefs library cannot mount on NULL as partition_label name, while SPIFFS can
- Lower level littlefs library does not need maxOpenFiles parameter
- Speed (LITTLEFS_Test.ino) 1048576 bytes written in 16238 ms / 1048576 bytes read in 918 ms
- Speed (SPIFFS_Test.ino) 1048576 bytes written in 65971 ms / 1048576 bytes read in 680 ms
Arduino ESP32 LittleFS filesystem upload tool
- Download the tool archive from here
- In your Arduino sketchbook directory, create tools directory if it doesn't exist yet.
- Unpack the tool into tools directory (the path will look like
<home_dir>/Arduino/tools/ESP32LittleFS/tool/esp32littlefs.jar
).
- You need the mklittlefs tool Download the release and copy it to
packages\esp32\tools\mkspiffs<mklittlefs rev. x.x.x>\ or on checkout (dev) environment to: packages\esp32\hardware\esp32<release>\tools\mklittlefs\
- Restart Arduino IDE.
Credits and license