Most devices need to store data either configuration files, sensor data firmware updates, and while it’s in theory possible to write directly to the storage device, it’s normally not a good idea to do so due to issues such as wear, which could lead to a premature death of your storage…
LittleFS is an open source file system specifically designed for small devices such as IoT nodes for SPI NOR flash and SD card storage, and introduced in Mbed OS 5.7. The “high-integrity embedded file system” is resilient to power-cuts, supports wear-leveling, and comes in a small memory and storage footprint.
- Footprint – Code for LittleFS takes 13KB less storage than FAT, and 4KB less RAM
- Power loss resilience – The file system has strong copy-on-write guarantees, and storage on disk is always kept in a valid state. FAT has no such resilience
- Wear-leveling – LittleFS file system provides a form of dynamic wear leveling for systems that cannot fit a full flash translation layer. FAT has no wear-leveling capabilities.
One of the downsides of LittleFS is that if you use (micro) SD cards for your project(s), you’ll lose compatibility with your computer, although if you run Linux there’s a FUSE wrapper that will allow you to mount littleFS in your computer.
The documentation and source code can be found on Github, with everything released under an Apache 2.0 license. Reference documentation is also available on Mbed website.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
2 Replies to “LittleFS is an Open Source, Low Footprint, Resilient File System Designed for Tiny Devices”
What about timing? FatFS requires updates in several different places(FAT(s) and data at least) and it takes its time toll. How does littleFS operates in that regard?
Depends on what operation you’re doing.
I suggest you read their design doc, it has a pretty good overview of how it works and performance/reliability/memory usage trade-offs.