emFile
A fail-safe file system for embedded systems. Optimized for minimal memory consumption in RAM and ROM. Fast and versatile.
Overview

emFile is a file-system library that enables embedded applications and systems to store data securely and reliably on all types of storage devices. Hardware agnostic, it can run on any 16-, 32-, or 64-bit target for which a compiler is available. Furthermore, most 8-bit targets are supported.
Ready-to-run device drivers are available for NAND and NOR flash; SD, SDHC, SDXC, and MMC cards; e.MMC storage devices; and USB flash drives. emFile includes support for exFAT; FAT12, 16, and 32 file systems, as well as BigFat; and SEGGER's proprietary Embedded File System (EFS), which is specifically designed to meet the requirements of state-of-the-art embedded applications.
Key features
The emFile file-system library is the result of nearly three decades of continuous and ongoing development. It has been deployed across several hundred million devices worldwide, and it has proven itself in the field by delivering a range of powerful features that developers can rely on. Features include:

Fail-safe protection
emFile is a robust, fail-safe file system for embedded devices, meaning file-system corruption is nearly impossible, and data has maximum protection in the event of unexpected power loss or device corruption.

Data security
emFile supports encryption for embedded file systems. Encryption is essential for securing data for individual files or even an entire storage device. It can be used with both EFS and FAT file systems as well as with supported storage devices, such as NAND, NOR, and SD/MMC cards.

Storage flexibility
emFile's storage layer is a competent abstraction layer of physical memory structures. Complex operations are turned into reliable, simple memory-access operations. Supported memory structures include NAND and NOR flash, and CompactFlash, SD, SDHC, SDXC, and MMC cards. The storage layer can access these structures as RAID 1 and RAID 5.
Use cases
emFile is suitable for a wide range of use cases in a variety of embedded systems, applications, and devices.
A fail-safe file system
emFile is organized in 5 layers (API, file-system, storage, device, and hardware layers) and is designed with security in mind. Therefore, all access operations are atomic, which helps ensure data consistency.
Even in the event of an interrupt due to failure, no storage or data will be left in an undefined state. Furthermore, RAID modes 1 and 5 can be supported to increase security at the storage layer, as well as journaling at the file-system layer.
Journaling
emFile's journaling is an additional component that sits above the file system and ensures that the file-system layer is fail-safe. Journaling means that a file system logs all changes to a journal before they are committed to the main file system, which ensures consistency in data recently written to file system.
RAID 1
emFile offers maximum data integrity and reliability with RAID 1. It provides protection from storage device defects and failures, and it works on the storage layer with FAT and EFS file systems.
RAID 5
With RAID 5, emFile offers maximum data integrity and reliability with increased usable capacity. RAID 5 requires at least three storage partitions to distribute data over several partitions. Additionally, it uses less data storage to achieve the same data security as RAID 1.
Flash-memory drivers

NOR flash drivers
The NOR driver allows the file-system layer to efficiently write and read blocks of data (logical sectors) to and from a NOR flash device.
emFile comes with two different NOR drivers:
- A block-map NOR driver
- A sector-map NOR driver

NAND flash drivers
The emFile NAND drivers allow the file-system layer to efficiently write and read blocks of data (logical sectors) to and from a NAND flash device.
emFile comes with two different NAND drivers:
- An SLC driver
- A universal driver
Flash-media drivers
SD, SDHC, and MMC device drivers
emFile offers SD, SDHC, and MMC flash-media drivers. SD and MMC drivers provide access to compatible storage devices (such as SD, SDHC, SDXC, MMC, and MMC Plus cards, and e.MMC devices), which means applications benefit from high storage capacities at a low cost.

Additional features

exFAT®
SEGGER’s exFAT® implementation is a specialized version of Microsoft's exFAT® file system that is designed for embedded systems.

BigFAT
BigFAT allows storage of files sized 4GB or more on FAT-formatted drives with full FAT compatibility.
Image creator for production
When a device is ready to ship, data and firmware is added the final product. With today's user interfaces and other data-intensive requirements, storage mediums often use a file system to better manage different types of data. A common standard is the FAT file system.
To create a structure, memory devices are formatted, and data is added to file systems in the form of files. This may involve several time-consuming, repetitive steps that increase the likelihood of errors in production. To reduce production steps to a single write operation, a file system is created on a developer's system and converted to a binary that can be used with production programmers, such as SEGGER's Flasher series.
Performance and memory footprint

Test results and performance
emFile includes benchmark code with which users can measure performance on certain targets. The benchmark is a good approximation of the length of time required for common file-system operations.

Resource usage
emFile has been specifically designed for resource-constrained devices, and features can be retained or excluded from a build to tailor a system around design requirements and efficiency.
Licensing

emFile is available under various embedded-software license models and delivered in object and source-code packages. With a wide range of licensing options, emFile can fulfill both commercial and technical requirements.
All licenses are obtained through one-time payments. emFile is royalty free and is not subscription based, meaning that software is a part of equipment expenses, keeping costs static. emFile licenses include six months of updates and support from SEGGER's Embedded Experts.
* Applies only to a second license and any additional license(s) purchased for the same product under the Single Product License and Single Developer License.
Friendly License
The object-code packages are available under SEGGER's Friendly License (SFL). This means that the use of embOS for evaluation and non-commercial purposes is unrestricted.
These packages are easily downloadable for each embOS port at https://www.segger.com/downloads/embos/.
FAQ
What is the maximum storage capacity of a NOR flash device supported by NOR drivers?
The maximum capacity of a NOR flash device supported by NOR drivers depends on the number of physical sectors (also known as erase blocks) that are present on the storage device. The NOR drivers are designed to handle a maximum of 65535 physical sectors. The typical size of a physical block is 64 KB. This results in a maximum storage capacity of about 4 GB.
What is the maximum supported storage capacity of a NAND flash device supported by NAND drivers?
The maximum capacity of a NAND flash device supported by NAND drivers depends on the number of physical blocks that are present on the storage device. NAND drivers are designed to handle a maximum of 65535 physical blocks. The typical size of a physical block is 128 KB. This results in a maximum storage capacity of about 8 GB.
What is the maximum supported storage capacity for SD cards and eMMC devices with eMMC/SD drivers?
The MMC/SD drivers are designed to support SD cards and eMMC devices with a maximum capacity of about 2 TB.
Latest news
Get in touch with us
Have questions or need assistance? Our Embedded Experts are here to help!
Reach out to us for:
- Licensing quotes
- Technical inquiries
- Project support







