Per Mårtensson cae0964305 Change to match change in open | %!s(int64=3) %!d(string=hai) anos | |
---|---|---|
examples | %!s(int64=3) %!d(string=hai) anos | |
src | %!s(int64=3) %!d(string=hai) anos | |
LICENSE | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=3) %!d(string=hai) anos | |
library.json | %!s(int64=3) %!d(string=hai) anos | |
library.properties | %!s(int64=3) %!d(string=hai) anos |
Note, there it is renamed from LITTLEFS to LittleFS, Please post your issues there. This here is kept for Arduino esp32 core 1.x purposes
#define CONFIG_LITTLEFS_FOR_IDF_3_2
in esp_littlefs.c.#define CONFIG_LITTLEFS_SPIFFS_COMPAT
in esp_littlefs.c.#define CONFIG_LITTLEFS_xxxxx
are set to optimal default values.A quick startup based on your existing code you can re-define SPIFFS
#define USE_LittleFS
#include <FS.h>
#ifdef USE_LittleFS
#define SPIFFS LITTLEFS
#include <LITTLEFS.h>
#else
#include <SPIFFS.h>
#endif
#define CONFIG_LITTLEFS_SPIFFS_COMPAT 1
Filesystem | Read time [ms] | Write time [ms] |
---|---|---|
FAT | 276 | 14493 |
LITTLEFS | 446* | 16387 |
SPIFFS | 767 | 65622 |
*The read speed improved by changing #define CONFIG_LITTLEFS_CACHE_SIZE
from 128 to 512
Add to platformio.ini:
extra_scripts = replace_fs.py
Add _replacefs.py to project root directory (where platformio.ini is located):
Import("env")
print("Replace MKSPIFFSTOOL with mklittlefs.exe")
env.Replace (MKSPIFFSTOOL = "mklittlefs.exe")
Add mklittlefs.exe to project root directory as well.