UTFS is a lightweight, zero-allocation file system for embedded devices

CLI Systems has introduced UTFS (μTFS), a simple, lightweight embedded storage system designed for small MCUs. Unlike traditional file systems like FAT32 or EXT4, or even lighter options like LittleFS and SPIFFS used on boards like the ESP32, UTFS is much simpler. It does not use dynamic memory and avoids complex features like wear leveling, making it easier to use on low-resource devices.

Designed for flat, byte-addressable memory like raw EEPROM, CPU flash pages, or external SPI/I²C flash, UTFS allows bare-metal firmware to store named data blobs (“files”) back-to-back. Each file is appended with a fixed 24-byte header containing metadata like identifiers, sizes, and application-defined signatures.

μTFS lightweight, zero allocation file system

UTFS specifications and features

  • Footprint – Fixed 24-byte header per file; zero heap usage (no malloc)
  • Format – TAR-inspired sequential layout; forward-compatible so files can be added later without breaking existing memory layouts
  • Storage Agnostic – Requires porting only two functions to interface with the hardware medium: sys_read and sys_write
  • Reliability – Uses application-defined signatures (e.g., 0xABCD) to detect corrupt or uninitialized storage upon the initial utfs_load() call
  • License – Open-source under the MIT License, completely unencumbered by proprietary vendor formats

Many microcontroller projects just store all data as one large structure at a fixed EEPROM address. This is simple, but it becomes a problem if the data format changes later, since older data may no longer work. On the other hand, full file systems like FatFs or LittleFS offer advanced features but require more memory and are heavier to run on small devices.

UTFS automatically adjusts data positions when file sizes change across firmware revisions [Left], and uses a custom base address to safely coexist with legacy data [Right]
UTFS automatically adjusts data positions when file sizes change across firmware revisions (Left), and uses a custom base address to safely coexist with legacy data (Right)
UTFS sits between these two approaches. It doesn’t include advanced features like wear leveling or safe atomic writes, so if power is lost during a save, data can be partially written, just like with normal EEPROM writes. Instead, it keeps things simple by storing data as separate named blocks, making it easier to manage and update data on small systems that don’t have enough resources for a full file system.

More information, including working examples for boards like the Arduino Uno (ATmega328), which uses built-in EEPROM, and the Microchip SAMD20, which uses internal flash memory, can be found on the CLI Systems page. To use UTFS on other hardware, you only need to connect its API to the device’s read and write functions. The C99 source code, examples, and full documentation are available on the CLI Systems GitHub repository for integration into projects.

UTFS Hello World Program
UTFS “Hello World” Program

Via Hackaday

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress. We also use affiliate links in articles to earn commissions if you make a purchase after clicking on those links.

Radxa Dragon Q8B Edge AI SBC with Snapdragon 8cx Gen3 SoC
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
4 Comments
oldest
newest
Boardcon MINI1126B-P AI vision system-on-module wit Rockchip RV1126B-P SoC