Ridgecrop have a small (30-50KB source code) FAT filesystem in Ansi C. It is designed to allow embedded systems to read and write FAT based media. FAT is a Microsoft developed filesystem used on virtually all floppy, hard disks and flash cards. It has a very simple structure and yet it can handle long filenames with up to 256 Unicode characters.

Another advantage of FAT is that it is accessible by virtually all desktop machines - PC's running Linux or BSD have a FAT filesystem driver, as do Windows machines and Macs. In fact the only disadvantage of FAT is that it doesn't support posix style hard links or files bigger than 4GB. Even these limitations can be be worked around in FAT32, if you don't care about volume accessibility by desktop machines.

Ridgecrop's FAT filesystem is designed to provide a layer between posix style file access functions (open, close, read, write, remove) and a hardware specific block device driver which can either be written by you or by us. It is not dependant on any OS and uses only a few C runtime functions.

It is structured as a core block of code supporting read only access to FAT16 volumes with the following build options -

The code is structured as follows

  1. Posix veneer - open, close, read, write, remove, etc.
  2. Buffer cache.
  3. Device driver - supports read and write.

The buffer cache is a designed to allow various cache modules to be used, from a single sector buffer up to a complete image of the volume.

The code should be easy to port to all machines with a char size of 1 byte, regardless of endianess and CPU architecture. It should be portable to all machines.

Interested in licensing FATLib? Contact us