Segger develops and distributes software development tools and ANSI C software components for embedded systems. Main products are : emWin, an universal graphics software (GUI) for embedded applications; embOS, a small real-time kernel; emFile, an embedded file system; USB stacks; and J-Link, the JTAG emulator for ARM cores. Segger cuts software development time for embedded applications by offering compact, flexible and easy-to-use middleware.
emFile is a file system for embedded applications which can be used on any media, for which you can provide basic hardware access functions. emFile is a high performance library that has been optimized for minimum memory consumption in RAM and ROM, high speed and versatility. It is written in ANSI C and can be used on any CPU.
- MS DOS/MS Windows-compatible FAT12, FAT16 and FAT32 support, proprietary EFS file system.
- Support for long file names.
- Multiple device driver support.
- Multiple media support. A device driver allows you to access different media at the same time.
- Cache support. Improves the performance of the file system by keeping the last recently used sectors in RAM.
- Works with any operating system to accomplish a thread-safe environment.
- ANSI C stdio.h-like API for user applications.
- Very simple device driver structure. emFile device drivers need only basic functions for reading and writing a block.
- Optional NOR flash (EEPROM) driver. Any CFI-compliant NOR flash is supported. Wear levelling included.
- Optional device driver for NAND flash devices. Very high read/write speeds. ECC and wear levelling included.
- An optional device driver for MultiMedia & SD cards using SPI mode or card mode that can be easily integrated.
- An optional IDE driver, which is also suitable for CompactFlash using either True IDE or Memory Mapped mode.
- An optional proprietary file system (EFS) with native long file name support.
- An optional journaling add-on. It protects the integrity of file system against unexpected resets.
- NAND flash evaluation board available.
emFile is designed to cooperate with any kind of embedded system and storage device. To use a specific medium with emFile, a device driver for that medium is required. The device driver consists of basic I/O functions for accessing the hardware and a global table, which holds pointers to these functions. If you need to use a proprietary storage device, you can write your own device driver. Currently the following device drivers are available: MultiMediaCard (MMC), Secure Digital (SD), RAM disk, Compact Flash, IDE, NOR flash, and NAND flash.
The Universal NAND flash driver works with all modern SLC and MLC NAND flashes. It can use the ECC engine built into NAND flashes to correct multi bit errors. The driver also works with SLC flashes which require 1-bit error correction and supports ATMEL’s DataFlashes. To enable the use of large NAND flash memories, the NAND flash driver allows block grouping to save memory required for administration of the memory blocks. The NOR flash driver can be used with any CFI compliant 16-bit chip. The Common Flash Memory Interface (CFI) is an open specification which may be implemented freely by flash memory vendors in their devices.Wear Levelling
Wear levelling is supported by the NOR/NAND driver. Wear levelling makes sure that the number of erase cycles remains approximately equal for each sector, thus prolonging the life span of the whole flash memory. Maximum erase count difference is set to 5. This value specifies a maximum difference of erase counts for different physical sectors before the wear levelling uses the sector with the lowest erase count. In contrast to other products on the market, SEGGER’s emFile offers both static and dynamic wear levelling. In order to keep erase cycles on the same level for all sectors, static data is regularly moved around to different sectors.
MMC and SD Cards
MMC and SD cards can be accessed through two different modes: either SPI MODE or MMC/SD card mode. For both modes drivers are available. To use one of these drivers, you need to configure the MMC driver and provide basic I/O functions for accessing your card reader hardware.
The emFile Encryption add-on provides a simple way to encrypt individual files or the storage media as a whole. Encryption can be used with both available file systems – EFS and FAT. All storage types such as NAND, NOR, SD/MMC/CompactFlash cards are supported. To use encryption, only minor changes to the application program are required in order to select the encryption method and a password for volume or individual files.
Journaling is an additional component for emFile which sits above the file system and makes the file system layer failsafe. File systems without journaling support (for example, FAT) are not fail-safe. Journaling means that a file system logs all changes to a journal before committing them to the main file system. To prevent corruptions from unexpected interruptions, caused for example by a power failure, the Journaling Layer caches every write access to achieve an always consistent state of the file system.Memory requirements*
Memory requirements depend on the used CPU, compiler, memory model, as well as on various other factors such as configuration switches and selected drivers.
ROM: app. 9-40 kb
RAM: app. 2 kb
* Precise values depend on the functionality used. Values are measured on a specific target system and will be different on other systems.