OSS TanbouSign in with GitHub

Embed a power-loss-resilient, dynamically wear-levelled filesystem in microcontroller flash

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,961
Primary language
C
License
BSD-3-Clause
Repository last updated
Mar 25, 2026
On this page

Overview

littlefs is a C filesystem designed for flash storage in microcontrollers. Copy-on-write behavior lets it recover to the last known good state after power loss, while dynamic wear leveling and bad-block handling address flash constraints. Its RAM use is strictly bounded so consumption does not grow with the filesystem.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Protect against power loss while distributing flash erases

File operations provide strong copy-on-write guarantees so an interrupted operation can fall back to the last known good state. Small metadata logs and copy-on-write file structures share a block allocator that provides dynamic wear leveling across storage.

Sources: [1]

Best fit

Fits embedded devices that store settings or logs in external flash

It fits devices that may lose power unexpectedly and need files and directories within limited RAM and ROM. Because users provide block-device operations and geometry through lfs_config, it can be integrated with custom boards and RTOS storage layers.

Sources: [1]

Before adoption

Verify real-device synchronization and the maintenance scope of version 2

Integrity depends on user-supplied read, program, erase, and sync functions plus correct flash geometry. If the device caches writes, sync must flush data to storage and guarantee that subsequent reads fetch the stored data.

The v2.11.3 release describes littlefs2 as feature-frozen and littlefs3 as in progress and unstable. It also fixes corruption involving multiple open write handles, so avoid freezing an old revision and test power interruption and concurrent-handle behavior on the real device.

Sources: [1][2]

Official sources

  1. [1]littlefs v2.11.3 README(2026-10-04)
  2. [2]littlefs v2.11.3 release(2026-10-04)
  3. [3]littlefs v2.11.3 BSD-3-Clause license(2026-10-04)
Supplemental curator note

littlefs is a candidate when small flash devices need both power-loss resilience and wear management. Adoption should verify the real device's read, program, erase, and sync guarantees, memory geometry, and fault-injection results rather than relying on headline features alone.

Try it in 3 steps

  1. 1

    Clone the pinned source release

    Shallow-clone the reviewed v2.11.3 release.

    git clone --branch v2.11.3 --depth 1 https://github.com/littlefs-project/littlefs.git
  2. 2

    Run the host-side test suite

    Run the official suite against the emulated block device on Linux. A C compiler, make, and Python are required. This step enters the littlefs directory; continue from the same working directory in the same terminal for step 3.

    cd littlefs && make test
  3. 3

    Run the directory test suite

    From the same littlefs directory used in step 2, run one focused official suite to inspect the test runner and configurations. Replace the emulation with your block-device functions when evaluating real hardware.

    ./scripts/test.py runners/test_runner test_dirs
Check the official README

Growth

Growth trends · Last 30 days

6,961 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
60

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • filesystem
  • embedded
  • microcontroller
Stars
6,961
Forks
1,031
Watchers
152
Open issues
580
Contributors
66
Owner type
Organization
Primary language
C
Repository last updated
Mar 25, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?