TrueFFS Driver Customization

The Platform Builder contains a core library, Tffscore.lib, and a single source file, Flcustom.c, which together compose the TrueFFS driver. Flcustom.c contains translation layers, socket interfaces, and MTDs. All three of these components can be modified to conform to individual design features of a Windows CE–based platform.

However, to integrate any of these three components into the TrueFFS driver, the component’s registration routine must be called during initialization of the driver. This task is performed by the flRegisterComponents function, which is defined in Flcustom.c. Prototypes for all the components’ registration routines are provided in the Stdcomp.h header file.

OEMs can modify flRegisterComponents to include the desired subset of components for the application. The flRegisterComponents function takes no parameters and has no return value. It simply consists of calls to each component’s registration routine.

The following sections provide additional information about the components—MTDs, translation layers, and socket interfaces—and their registration routines.

Memory Technology Drivers
The TrueFFS driver accesses various types of linear flash memory hardware through MTDs. Each type of linear flash memory requires its own MTD because individual MTDs are tailored to interact with specific linear flash memory chips. For this reason, OEMs can omit any MTDs that are superflous. For example, if a platform supports only built-in DiskOnChip hardware, an OEM can omit the MTDs for Intel linear flash memory chips. By extension, however, OEMs who need to support new types of linear flash memory hardware must create MTDs for that hardware.

The following table shows existing MTDs and their corresponding registration routines.

Manufacturer
Product
Registration routine to be
called in Flcustom.c
M-Systems, Inc. DiskOnChip flRegisterDOC2000
  Series 2000 flRegisterCDSN
  FlashLite (8-bit mode) flRegisterI28F008
  FlashLite (16-bit mode) flRegisterI28F016
Intel Series II (8-bit mode) flRegisterI28F008
  Series II (16-bit mode) flRegisterI28F016
  Series II+ flRegisterI28F016
  Series 100 MiniCard (8-bit mode) flRegisterI28F008
  Series 100 MiniCard (16-bit mode) flRegisterI28F016
  Series 200 MiniCard flRegisterCFISCS
  Value Series 100 (8-bit mode) flRegisterI28F008
  Value Series 100 (16-bit mode) flRegisterI28F016
  Value Series 200 (8-bit mode) flRegisterCFISCS
  Value Series 200 (16-bit mode) flRegisterCFISCS

Translation Layers
Translation layers provide the necessary mapping between FAT file system data structures and the underlying data format on the linear flash memory hardware. The most widely known and used translation layer is the flash translation layer (FTL), a PC Card industry standard for NOR-based linear flash memory hardware. A separate implementation of the FTL for NAND-based linear flash memory is called the NFTL translation layer. DiskOnChip and other Series-2000 products are NAND-based products.

OEMs can omit unnecessary translation layers. For example, an OEM who wants to use only built-in DiskOnChip hardware can omit the FTL and keep the NTFL. However, TrueFFS supports storage of both FAT16 and FAT32 data structures.

The following table shows the registration routines of existing translation layers.

Registration routine
Hardware
flRegisterFTL NOR-based linear flash memory hardware
flRegisterNFTL NAND-based linear flash memory hardware

Socket Interfaces
Socket interface components control the access of the TrueFFS driver to sockets in which linear flash memory hardware resides. For PC Cards, the interface components consist of the PC Card socket API. For built-in DiskOnChip devices, the socket interface is a custom software component. An OEM who provides DiskOnChip hardware but not PC Card sockets needs only the DiskOnChip socket layer.

The following table shows the registration routines for existing socket layers.

Registration routine
Hardware
flRegisterFixedFlash Built-in DiskOnChip hardware
flRegisterCS PC Card–based linear flash memory hardware