|
4 年之前 | |
---|---|---|
examples | 5 年之前 | |
src | 4 年之前 | |
LICENSE | 5 年之前 | |
README.md | 4 年之前 | |
library.json | 4 年之前 | |
library.properties | 4 年之前 |
! Warning: This wrapper depends on ESP-IDF version the esp32 core is built on
Tested with esp32 cores built on IDFv3.2, IDFv3.3 and IDFv4 - IDFv4.3
See LITTLEFS_time example with file timestamps that works with esp32 core on IDF v3.3
//#define CONFIG_LITTLEFS_FOR_IDF_3_2
in esp_littlefs.c if needed. For all higher version, it should be commented.A quick startup based on your existing code you can re-define SPIFFS like this
#define USE_LittleFS
#include <FS.h>
#ifdef USE_LittleFS
#define SPIFFS LITTLEFS
#include <LITTLEFS.h>
#else
#include <SPIFFS.h>
#endif
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
(notes from BlueAndi )
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.