How do I find out the LittleFS version?

Hello,
When I include LitteFS in the code #include <LittleFS.h>, Platformio/ESP32/VSCode reports as a dependency: LittleFS @ 2.0.0

However, I have a question. Is version 2.0.0 the same as the library in the littlefs-project/littlefs project? (link) GitHub - littlefs-project/littlefs: A little fail-safe filesystem designed for microcontrollers
Currently, LitteFS in the littlefs-project/littlefs project is already at version 2.9.3

Or is it the version in the espressif/arduino-esp32 project? (link) arduino-esp32/libraries/LittleFS at master · espressif/arduino-esp32 · GitHub

I would like to know which version and project/github of LittleFS platform: espressif32@6.8.1 is using to track bugs when using SQLite.

[env:esp32doit-devkit-v1]
platform = espressif32@6.8.1
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
monitor_filters = time, log2file
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv
Processing esp32doit-devkit-v1 (platform: espressif32@6.8.1; board: esp32doit-devkit-v1; framework: arduino)
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html PLA TFORM: 
Espressif 32 (6.8.1) > DOIT ESP32 DEVKIT V1 HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES: - framework-arduinoespressif32 @ 3.20017.0 (2.0.17) - tool-esptoolpy @ 1.40501.0 (4.5.1) - toolchain-xtensa- esp32 @ 8.4.0+2021r2-patch5 LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 36 compatible libraries Scanning dependencies... Dependency Graph
|-- FS @ 2.0.0 
|-- LittleFS @ 2.0.0 
|-- SPI @ 2.0.0 
|-- Sqlite3Esp32 @ 2.5 
Building in release mode

This comes from the library.properties description. It is just the version of the LittleFS.h Arduino library / abstraction layer.

That library however in turn uses the esp_littlefs.h library and calls into its abstraction layer:

This in turn comes from https://github.com/joltwallet/esp_littlefs, which has its own version numbering scheme. For Arduino-ESP32 2.0.17, which is the latest 2.x core supported by the regular platform = espressif platform, this gives

This library then includes the actual LittleFS library as a git submodule:

And the commit message doesn’t lie, indeed LittleFS’s commit hash f53a0cc coresponds to release v2.9.0.

grafik

Note that I have done this deducation for Arduino-ESP32 2.0.17. If you use a different platform version, or even third party platforms that use the 3.x core, you should be able to do the same deduction though.

1 Like

Uauuuuuuuuuuu!!! :clap: :clap: :clap: :clap:
What a fantastic analysis!
I could never figure it out.
Thank you very much.

Your explanation was a lesson in how abstractions occur in libraries and how complex it is to track some dependencies.

Thank you very much!

Just for completion: The probably easiest and most core-agnostic way to track the LittleFS version is to interrogate the version string for the esp_littlefs.h library version via its macro.

grafik

Then use that version number to cross-reference the actual littefs version number via the tags in https://github.com/joltwallet/esp_littlefs.

1 Like