Chapter 48. What is Yaffs?

Yaffs is a filesystem for NAND flash chips.

Yaffs is accessed through the FILEIO package which presents a standard POSIX compatible IO interface through which applications use standard open(), read(), write() and close() calls.

Yaffs is a journalling filesystem with wear-levelling. It is particularly suited to NAND flash parts, having been designed with their unique properties in mind. The use of traditional filesystems (FAT, ext2, etc) which do not have these features is not recommended on such chips because their design requires the use of fixed address on the underlying hardware. Such behaviour causes flash sectors to wear out, the consequence of which would typically be to cause the whole device to become unbootable.

Yaffs also provides a high degree of robustness, which is usually a requirement of embedded devices. A power failure or other crash can leave a traditional filesystem in an inconsistent state which is often difficult to repair, especially in the field.

Yaffs can also be built into RedBoot, which allows you to store application images on NAND flash and boot them with RedBoot's usual flexible scripting system.

For more information about NAND flash chips, how they differ from NOR flash parts and other ways to access them, refer to the documentation for the eCos NAND Flash Library.

For more information about Yaffs itself, refer to

Documentation license for this page: eCosPro License