Home » HCC-Embedded » THIN



 

THIN

THIN is a highly optimized, reduced footprint version of our highly successful FAT system. This DOS compatible file system is designed for configurations with limited resources. It works well with the 8051, MSP430 and H8S series MCUs and is suitable for use with most 8-bit and 16-bit CPUs.

THIN is scalable. By selecting only the functionality required for the application, the system becomes highly optimized for both speed and size.

Features
  • FAT12, FAT16 and FAT32
  • Long filenames
  • Highly scalable
  • Small footprint
  • Low memory resource usage
  • Media error handling
  • Fully PC-compatible
  • ANSI-compliant C source
Scalability

THIN is a DOS-compatible flash file system that is designed to be extremely scalable. It allows the developer with limited resources to build precisely the system that is needed, and no more. The system is full-featured; it allows the developer to enable new options as requirements change.   It is not possible to give definitive figures for footprints because processors and development tools have major differences. The following estimates are made for the 8-bit 8051 MCU built with the Keil development suite. 

Code Footprint
 

Depending on the options selected at build time, the code footprint of the file system can be less than 4k for a minimum DOS-compatible system for accessing files on a disk, up to around 20K for a complete file system with all options enabled including disk formatting. 

Data Footprint
 

THIN works completely independently of any host system. Memory is statically allocated; i.e., there is no need to provide a heap. The typical total data footprint is <1K plus 0.5K for each open file. 

Stack Requirement
 

Typically the stack requirement for any call to the file system is less than 0.5K. The developer’s guide provides guideline information about the specific stack requirements in different configurations.   

Options
 

The system contains a large number of build options. These are detailed in the developer’s guide. Some of the options are:
  • F_FAT12
  • F_FAT16
  • F_FAT32
  • F_FORMAT
  • F_LONGFILES
  • F_WRITE
  • F_NAMECHECKING
  • F_WILDCARDS
  • F_DIRECTORIES
  • ... and many more
Each and every API call can be included in the build or excluded from the build. This automatically removes unnecessary sub-routines.

Porting

 THIN is designed to be very portable. It is tested on several commercial RTOSes and also in a stand-alone system with no RTOS. We are not aware of any RTOS with which it cannot be used.   All the code is supplied in ANSI-compliant C. It has been built on four different development environments and run through a syntax checker to ensure the highest level of compatibility. 

Sample application code is supplied for easy exercise of the system, as well as sample drivers for different media types with clear reference to their hardware dependencies.  The developer´s guide gives detailed information on all aspects of porting and indicates clearly the areas that may need to be modified for a particular host system. In particular, the host system may provide:
  • a real time clock for time/date information. This is necessary if time/date information is to be stored with files written.
  • a random number generator to provide serial numbers during format. This is recommended only if formatting of media is required.
  • mutexes for mutual exclusion. They are required only in a pre-emptive system.
The developer´s guide gives detailed information for scaling the system:
  • which functions to exclude
  • the effect of excluding/including a particular option
  • selecting FAT12/16/32 support
  • selecting long or 8.3 name support
  • a variety of code validation functions