2.1   Introduction

This chapter tells you how to configure TrueFFS for Tornado and include it in VxWorks. For information on creating new socket component drivers and MTDs, see 3. Writing Socket Component Drivers and MTDs.

To include TrueFFS for Tornado in a VxWorks image, you must edit config.h and define INCLUDE_TFFS. This configures the VxWorks initialization code to call tffsDrv( ), the utility that sets up all the structures and global variables needed to manage TrueFFS. This call also registers socket component drivers for all the flash devices attached to your target. At link time, resolving the symbols associated with tffsDrv( ) should pull all necessary TrueFFS software modules into the VxWorks image.

To support TrueFFS, each BSP must include a sysTffs.c file. It is this file that pulls together all the layers of TrueFFS (translation, socket, and MTD) and binds them with VxWorks. Because of this central role, sysTffs.c is the file you must edit to configure which MTDs and translation layer modules are included in TrueFFS. In addition, if your target includes a memory management unit (an MMU), you will need to edit the sysPhysMemDesc[ ] array defined in sysLib.c.

After rebuilding the VxWorks image and rebooting the target, you should have access to all the functionality necessary to format flash, create a TrueFFS block device, and bind that block device to dosFs.