Project

LittleFS GitHub: Source, Releases, Tests and Contributing

LittleFS on GitHub, explored: the source files, design documents, release cadence, test runner and the wider tool ecosystem.

Illustration of a repository tree with branches and release tags

LittleFS lives on GitHub at littlefs-project/littlefs, and the repository is unusually rewarding to explore. Alongside a small C library you will find one of the most thorough design documents in embedded software, a formal on-disk specification, a sophisticated test runner and a list of related projects in several languages. This article tours the repository, explains how releases and versions work, shows how to run the tests and points out how to contribute.

LittleFS repository details here were checked on 23 November 2026, when the latest release was v2.11.3, published on 25 March 2026. Release notes and the README always take precedence over this summary.

The source files

LittleFS itself is just four files at the root of the repository:

  • lfs.h declares the public API, configuration structure, error codes and compile-time limits. Its comments are the primary API documentation.
  • lfs.c implements the filesystem.
  • lfs_util.h and lfs_util.c provide utilities such as CRC calculation, endian conversion and the hooks for logging, assertions and memory allocation.

LittleFS integration is therefore simple: copy these files into your project, or add the repository as a Git submodule, and compile with a C99 compiler. The README notes that the code should compile with any compiler conforming to the C99 standard.

Configuration macros

LittleFS behaviour can be trimmed with preprocessor definitions referenced in the headers. Examples include LFS_NO_MALLOC to avoid heap allocation, LFS_READONLY to build a smaller read-only variant, LFS_THREADSAFE to enable lock callbacks, and LFS_MULTIVERSION to write older on-disk minor versions. Logging and assertions can be redirected or disabled through lfs_util.h, and the LFS_CONFIG mechanism lets you replace that header entirely with your own.

The design documents

LittleFS is documented in two long-form files that are well worth reading.

LittleFS's DESIGN.md is a detailed explanation of how the filesystem works and why. It walks from the problem of power loss on flash, through existing designs and their trade-offs, to metadata pairs, CTZ skip-lists, the block allocator, wear leveling, files, directories and the subtle “move problem”. The README itself recommends reading it because the trade-offs are interesting, and anyone tuning a configuration benefits from understanding them.

LittleFS's SPEC.md is the on-disk specification, covering the precise layout of blocks, tags and metadata. It is the document to use when building tools that read or write littlefs images, and it is the reason independent implementations, such as the OCaml project chamelon, can interoperate with the reference code.

Versions and releases

LittleFS uses two version numbers, both defined in lfs.h:

  • LFS_VERSION is the library version. For the v2.11 series it is 2.11.
  • LFS_DISK_VERSION is the on-disk format version, currently 2.1.

LittleFS keeps the major disk version stable across library releases, which is why upgrading within v2 does not require reformatting. Minor disk versions add features; the LFS_MULTIVERSION option exists so firmware can keep writing an older minor version when compatibility with older readers matters.

Recent release history

LittleFS releases during the last two years have been mostly fixes and refinements. The release notes report the default build at around 17.1 to 17.2 KB of code with 1,448 bytes of stack across the v2.11 series.

Version Release date Highlights
v2.11.3 25 March 2026 Fix for data corruption with multiple open write handles; null callback guards; warning fixes
v2.11.2 29 September 2025 Directory count check fixes; compaction trigger adjustment
v2.11.1 30 June 2025 Garbage collection performance fix
v2.11.0 15 May 2025 Limited filesystem shrinking with LFS_SHRINKNONRELOCATING; Clang and macOS build fixes

LittleFS release notes also state that v2 is in feature freeze while littlefs3, the next major version, is developed and is not yet stable. For production firmware, the v2 releases remain the right choice.

Downloading: archive, tag or submodule

LittleFS can be pulled into a project in several ways, each suited to a different workflow:

  • Master branch ZIP: the quickest way to look at the latest code, and what the download buttons on this site provide.
  • Tagged release: pin a known version such as v2.11.3 for reproducible builds.
  • Git submodule: git submodule add https://github.com/littlefs-project/littlefs.git keeps the dependency versioned in your repository.
  • Package managers and frameworks: Zephyr, ESP-IDF components, Arduino cores and others bundle their own copies, sometimes slightly behind upstream.

LittleFS users shipping products should record exactly which version is compiled into each firmware release, because fixes such as the multi-handle corruption fix in v2.11.3 may matter for your use case.

Running the test suite

LittleFS ships with a test suite designed to run on a PC using an emulated block device found in the bd directory. The README says the tests assume a Linux environment and start with a single command:

make test

LittleFS tests are written in C inside .toml files in the tests directory, and the Python script scripts/test.py can list and run individual suites or cases:

./scripts/test.py -l runners/test_runner          # list suites
./scripts/test.py runners/test_runner test_dirs   # run one suite
./scripts/test.py runners/test_runner -b -j       # run in parallel

LittleFS test failures print a test identifier encoding the exact permutation of geometry that failed, and that identifier can be passed back to the script, optionally with --gdb to drop into a debugger. Release v2.11.0 also made the Makefile tests work on macOS and added Clang support. There is a benches directory for benchmarks as well.

LittleFS's README lists a wide set of related projects, a good sign of the format's popularity:

  • littlefs-fuse mounts littlefs images on Linux.
  • littlefs-python creates and inspects images from Python.
  • littlefs-toy provides a tar-like command line tool, added to the list in v2.11.2.
  • littlefs2-rust wraps the library for Rust.
  • mklittlefs builds images for the ESP8266 and RP2040 ecosystems.
  • littlefs-disk-img-viewer views images in a web browser.
  • pico-littlefs-usb emulates FAT12 over USB so a host can read a littlefs volume without drivers.

LittleFS's README also mentions Mbed OS, SPIFFS, Dhara and ChaN's FatFs as alternatives or companions, with candid notes on where each may perform better.

Contributing

LittleFS accepts contributions under the same BSD-3-Clause licence as the project, as the README states. Before opening a pull request, run the relevant tests locally, and for bugs include your configuration and a minimal reproduction, ideally a failing test case. Each source file carries an SPDX licence identifier rather than the full licence text, which keeps headers short while remaining machine-readable.

Reading the code itself

LittleFS's implementation is a single C file of several thousand lines, yet it is approachable with the design document beside it. Start with the public functions near the end of lfs.c, such as lfs_file_write and lfs_mount, and follow them inward. The metadata commit logic and the block allocator are the parts most worth understanding, because they explain both the power-loss guarantees and the performance characteristics discussed in our troubleshooting section.

LittleFS also exposes debugging hooks. Defining or redirecting the trace, debug, warning and error macros in lfs_util.h lets you watch the filesystem's decisions on real hardware, which is invaluable when diagnosing a block device driver. The scripts directory contains further helpers used by the project for measuring code size, stack usage and coverage.

Reporting issues effectively

LittleFS maintainers can only help with problems they can reproduce. A good issue states the library version, the full lfs_config values, the type of storage and how the block device is implemented, and the exact sequence of calls that fails. Where possible, attach a failing test case written in the project's TOML format, or a disk image captured with the test runner's disk option. Problems that turn out to be block device bugs are common, so testing your driver against the emulated block device first often answers the question before you post.

Reviewing a change before adoption

A repository contains more than a downloadable snapshot. Release notes, source history, tests and configuration comments help a team understand what changed and whether that change is relevant to its product. Begin with the version already used by your project, then identify the target release and compare the changes that affect your storage driver, build environment and on-disk data.

Keep a record of the exact revision included in a production build. A named release or pinned commit makes it possible to reproduce a binary later and investigate an issue against the same source. Store local patches separately and document why each one exists; otherwise an upgrade can accidentally discard a necessary platform fix or carry an obsolete workaround forward.

When reviewing a proposed update, distinguish filesystem behaviour from the behaviour of the board's flash driver. Check the configured block size, read and program alignment, erase operation and error handling on the actual hardware. An update that passes a desktop build still needs device testing, especially where power interruptions, timing or flash wear affect the result.

Prepare a small regression checklist for each release. Mount a previously created filesystem, read representative files, write and close new data, exercise low-space handling and restart after an interrupted operation. Preserve a copy of the test image and the firmware version used to create it. If a test fails, record the configuration, steps and observed result so the problem can be reproduced without relying on a vague description.

Source files and design notes are most useful when read together with the public API and the tests. Look for the assumptions behind each option before tuning it, and avoid copying a configuration intended for a different flash device without checking its geometry.

Frequently Asked Questions

Where is the official LittleFS repository?

LittleFS is hosted at github.com/littlefs-project/littlefs, which contains the source, documentation, tests and releases.

What is the latest LittleFS release?

LittleFS v2.11.3, released on 25 March 2026, was the latest when we checked. The releases page always shows the current version.

Should I use the master branch or a release tag?

LittleFS master is fine for exploration, but product firmware should pin a tagged release so builds are reproducible.

What licence does LittleFS use?

LittleFS is licensed under BSD-3-Clause, with copyright held by the littlefs authors and Arm Limited.

What is littlefs3?

LittleFS's next major version is being developed separately; the release notes describe it as in progress and unstable, while v2 is in feature freeze.

Can I run the LittleFS tests on Windows?

LittleFS tests are designed for Linux, and since v2.11.0 they also work on macOS. On Windows, a Linux environment such as WSL is the practical option.

Conclusion

LittleFS on GitHub is more than a download location. The four source files are easy to integrate, the design and specification documents explain every trade-off, and the test runner lets you validate changes with real rigour. Pin a release for production, read DESIGN.md before tuning, and lean on the ecosystem of tools for working with images on your computer. To start, use the download section on our home page, or follow a platform article such as LittleFS ESP32.

Keep reading

More LittleFS articles