Embedded Systems December 2000 Vol13_13

Issue link:

Contents of this Issue


Page 74 of 197

ED SUTTER Tiny File System Sometimes when flash memory is present, you want to ,'efer to a chunk of code or data by name. as though it is a file. This capability need not come with all the complexity of most coml11ercial flash file systems. fyou 've ever worked on an embedded system proj ect that uses flash, then you've probably contemplated using a fl a h file system (FFS). Like the RTOS discussions a few years back, the FFS for current embedded ystems i usual ly considered to be an unnecessary luxury or something you can write yourself. Also like the RTOS, an FFS cer- tain ly makes the embedded system easier to manage, but to do it r ight, writing one from scratch is li kely to be more complicated than originally expected. This anicle presents tiny file system. (TFS) , a package that allows the memory space allocated to flash to be treated as name space instead of address space. TFS attempts to solve some of th e bas ic problems of interfacing to fl ash. It p.-o- vides an API that is independe nt of the underlying fl ash device, yet does not inhibit the programmer from directly accessing the raw memory if necessary. It bridges tlle gap be twee n the implementation that tries to go without using an FFS because it's not really necessary, and those appl ications tllat absolutely need a sophisticated FFS with wear-leveli ng, directory hie rarchy, and DOS-file-format com patibil ity. TFS is part ofa gener ic embedded system boot platform, so other components exist (outside ofTFS, but within the platform ) to exploit some or the described functionality in a way that may not be useful for your specific application. TFS is a command, an API, and an integral part of an embedded system bOOl platform. As a command, it provides a user interface with functions like list, delete, create, display, copy, decompress/ load/ execute, and cleanup of fi les. As an API, it pro- vides application code with fun ctions like read O, writeO, open O, closeO, statO, and seekO. Finally, as part of an embedded system boot platform , it provides the Embedded Systems Programming DECEMBER 2000 73

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems December 2000 Vol13_13