Няма описание

lorol 8a82731c6b Changed default CONFIG_LITTLEFS_CACHE_SIZE from 128 to 512 for better read speed преди 5 години
examples d5c678a076 Updated included examples: преди 5 години
src 8a82731c6b Changed default CONFIG_LITTLEFS_CACHE_SIZE from 128 to 512 for better read speed преди 5 години
LICENSE fb074d28dd Initial commit преди 5 години
README.md 8a82731c6b Changed default CONFIG_LITTLEFS_CACHE_SIZE from 128 to 512 for better read speed преди 5 години
library.json 9734859e8a Testing Arduino FS' LITTLEFS.mkdir(path) and LITTLEFS.rmdir(path) преди 5 години
library.properties 3ee159c21e Add files via upload преди 5 години

README.md

LITTLEFS

LittleFS library for arduino-esp32

Installation

  • Copy LITTLEFS to Arduino IDE /libraries folder (File > Preferences > Sketchbook location).

Usage

  • Use LITTLEFS same way as SPIFFS
  • 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 
    

Differences with SPIFFS

  • LittleFS has folders, you need need to iterate files in folders
  • At root a "/folder" = "folder"
  • Requires a label for mount point, NULL will not work
  • maxOpenFiles parameter is unused, kept for compatibility
  • LITTLEFS.mkdir(path) and LITTLEFS.rmdir(path) work as expected for folders
  • Speed comparison based on LittleFS_test.ino sketch (for a file 1048576 bytes):
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

Arduino ESP32 LittleFS filesystem upload tool

PlatformIO

(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.

Credits and license