Embedded systems often have some kind of non volatile memory. Whilst it is possible to read and store raw data, a file system can become necessary as complexity grows. It’s also useful if the user has to transfer files from/to the system. This is often needed to perform firmware upgrade in the field, for example using a USB memory stick.

There are a number of off-the-shelf embedded file systems libraries available. Most of them are configurable, which means features such as:

● directory support

● file search support

● encryption

can be enabled or disabled to meet functional requirements, as well as hardware constraints.

 

We recommend asking the following questions when choosing an embedded file system:

 ● do you need a file system?

● is the source code available ? what is the quality of the code? Are there any automated tests (unit tests?)

● how easy is it to integrate the file system library with the rest of the code? Is a C++ wrapper available? What does the API look like?

●  what can of media needs to be supported (NAND/NOR Flash, SD card, Compact Flash, …)?

● is FAT compatibility required?

● is there any special requirement (reliability, memory foot print, ..)?

● what is the license type (open source, commercial, ..)?

 

Whilst using off-the-shelf libraries sounds like an attractive option, we have found that found that code quality is often lacking, and bugs can be hard to track.

On one occasion, we even device to write our own implementation of a FAT file system, rather than using a third party library.