Changes between Version 1 and Version 2 of TBR/UserManual/Using_the_RTEMS_DOS_File_System


Ignore:
Timestamp:
Sep 12, 2008, 11:55:30 AM (11 years ago)
Author:
ChrisJohns
Comment:

Add general settings.

Legend:

Unmodified
Added
Removed
Modified
  • TBR/UserManual/Using_the_RTEMS_DOS_File_System

    v1 v2  
    33
    44RTEMS provides an MS-DOS compatible file system. Currently the implementation provides support FAT12, FAT16 and FAT32 disks and short file-names. Long file-name support is being added. Contact for [wiki:ChrisJohns ChrisJohns] for details.
     5
     6Configuration is based around the {{{confdefs.h</code> configuration file.
     7= General Configuration =
     8
     9
     10Your application needs a clock driver. The swap out task manages the block hold timers. You also need to use the IMFS as the base file system, configure the number of libio descriptors and indicate the application needs libblock:
     11
     12 /**
     13  * Configure drivers.
     14  */
     15 #define CONFIGURE_MAXIMUM_DRIVERS                  10
     16 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
     17
     18 /**
     19  * Configure file system and libblock.
     20  */
     21 #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
     22 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS   20
     23 #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
     24
     25The block cache requires configuration. You can configure:
     26
     27 *  CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
     28 : Number of blocks to read ahead of the block read. Default is 32.
     29 *  CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
     30 : Number of blocks to pass to the driver when writing to a device. Default is 16.
     31 *  CONFIGURE_SWAPOUT_TASK_PRIORITY
     32 : Priority of the swap out task. Default is 15.
     33 *  CONFIGURE_SWAPOUT_SWAP_PERIOD
     34 : The period of time in milli-seconds the swap out sleeps for. This is the period of time the block hold timers are updated. Default is 250 msecs.
     35 *  CONFIGURE_SWAPOUT_BLOCK_HOLD
     36 : The period of time in milli-seconds a block is held after being modified for the first time before being written to disk. Further updates to the block do not reset the timer. Default time is 1000 msecs.
     37
     38An example that can be used with a 4.5G IDE disk on a PC with 1G of memory to get great performance coping 250M of files:
     39
     40 #define CONFIGURE_SWAPOUT_TASK_PRIORITY            10
     41 #define CONFIGURE_BDBUF_BUFFER_COUNT               1024
     42 #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS      64
     43 #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS           32