|
|
RTFiles-32 - Embedded FAT, exFAT, and ISO 9660 File System
RTFiles-32 is a portable royalty-free
FAT-12/16/32,
exFAT, and
ISO 9660
file system for embedded systems. RTFiles-32 is a library containing the
core file handling functions as well as the required device drivers.
Several different APIs are provided for compatibility with other systems.
No source code modifications of existing programs are required to use
RTFiles-32.
Features
- Unlimited Number of Files
RTFiles-32 can
handle an unlimited number of open files as required by the
application. Only about 300 bytes of RAM are required for each open
file.
- Up to 32 Logical Drives
RTFiles-32 easily
handles many physical and logical drives.
- FAT-12, FAT-16, and FAT-32
RTFiles-32 supports
the same FAT (File Allocation Table) formats as DOS and Windows. Storage
media can be shared between RTFiles-32 and other operating systems to
exchange data.
- Supports exFAT
RTFiles-32 supports the improved
variation of the FAT file systems to support larger disks and files.
- Supports ISO 9660 File Systems
RTFiles-32
supports the standard format used for data CD-ROMs and DVDs. Extensions to
the ISO 9660 standard such as 9660-Relaxed or Joliet are supported. Most
UDF volumes also contain an ISO 9660 directory tree and can thus be read
by RTFiles-32.
- Long File Name Support
On all three FAT types, exFAT,
and ISO 9660, file names with up to 255 characters are allowed.
- Code Page and UTF-8 Support
Through UTF-8
encoded file names, RTFiles-32 supports all 16-bit Unicode characters in
file names, including Cyrillic, Japanese, Chinese, and other Asian
languages.
- Supports Diskettes, Hard Disks, Flash Disks, SRAM Cards, USB
Disks, CD-ROM, and DVD Drives
RTFiles-32 supports the
following device types: diskette drives and media with 360k, 1.2M, 720k,
1.44M, and 2.88M capacity, IDE and flash disks with CHS (Cylinder, Head,
Sector) or LBA (Logical Block Addressing) interface, Serial ATA disk and
CD/DVD drives, M-Systems DiskOnChip flash disks, linear flash, PCMCIA
SRAM/CompactFlash/ATA cards, IDE-ATAPI CD-ROM/DVD drives, AHCI controller
attached disks, RAM disks, USB sticks and USB disk/CD/DVD drives (RTUSB-32 required).
- Supports Removable Devices and Hot Swapping
Floppy disks, removable hard disks (e.g., disks in PCMCIA sockets), USB
devices, and CD-ROM/DVD media can be removed and reinserted while an
application is running. Devices are automatically remounted as needed.
Critical error handling support is available to handle disk removal of
devices currently in use.
- Multiword DMA and UDMA Transfer Mode
IDE, SATA,
and AHCI disks are operated in Multiword DMA or Ultra DMA mode, if
supported by the disk and host controller. The IDE disk driver
automatically selects the best transfer mode supported by the hardware.
The AHCI driver always uses UDMA mode.
- Hard Disks up to 2 Terabytes
The latest
standards such as LBA-48-bit for extended sector addressing are supported,
if also supported by the disk controller. There is no limit on partition
sizes.
- Extended File and Cluster Sizes
Unlike DOS and
Windows, RTFiles-32 supports extended cluster sizes up to 16 megabytes and
file sizes up to 1 terabyte.
- Partitioning and Formatting
RTFiles-32 provides
functions to partition and format storage devices. Embedded systems
assembled with virgin disks can automatically format their disks when
first powered on.
- Efficient Cache Support
RTFiles-32 will cache
frequently accessed data such as a volume's FAT or directories. The
application has full control over the size of the cache. Large data
blocks that are read or written contiguously are not cached to avoid
cache thrashing.
- Contiguous Files
RTFiles-32 can preallocate
files to reside in a single contiguous chain of sectors. In this way, it
can guarantee that no extra seek operations are required for contiguous
read or write operations.
- Committed and Lazy Write Files
RTFiles-32's
behavior can be fine-tuned for best data security (e.g. always commit all
file write operations to disk immediately) or best throughput (e.g. data
is kept in cache as long as possible to eliminate redundant write
operations).
- Extensive Diagnostics Support
RTFiles-32
provides functions to query the state of its cache in great detail. For
each file or even a complete volume, the degree of fragmentation can be
determined.
- File System Analysis and Repair
RTFiles-32's
function RTFCheckDisk can detect and automatically repair common file
system errors, such as file chain crosslinks, lost clusters, invalid
directory entries, etc.
- Customizable Critical Error Handler
Applications have full control over how RTFiles-32 handles disk I/O
errors. All errors can be passed back to the calling application using
standard error codes, or RTFiles-32 can call custom error handlers of the
application, which in turn can decide whether the operation should be
failed or retried (possibly after prompting the user).
- Native API
RTFiles-32 has its own API consisting
of about 50 functions. While many of these functions appear in all file
systems (e.g. open, read, write, etc.), some address advanced features
tailored to the needs of embedded systems. For example, function RTFExtend
can create contiguous (unfragmented) files and RTFBufferInfo returns
detailed statistics about RTFiles-32's internal sector buffer cache.
- Raw I/O Functions
RTFiles-32 allows the
application to call device driver functions directly. Applications can
completely bypass the high-level file system and perform sector-level
I/O.
- Win32 Compatible API
If used with RTTarget-32, RTFiles-32 emulates about 30 file
I/O related Win32 functions. Existing Win32 programs that access files are
supported without source code modifications.
- C/C++ and Pascal Run-Time System Support
Through RTFiles-32's Win32 API emulation, all of the run-time
systems' file I/O functions are fully supported. C functions such as
fopen, fread, etc., work unmodified with RTFiles-32. The same is true for
C++ classes such as iostream.
- Multitasking Support
When RTFiles-32 is used
with RTKernel-32 or another multi-tasking
kernel, all RTFiles-32 operations perform appropriate locking to support
simultaneous calls from several tasks. Simultaneous access to different
devices is fully supported. I/O wait times are made available to other
tasks by blocking the waiting tasks at a semaphore until the device
signals I/O completion with an interrupt.
- Low Interrupt Latencies
Although RTFiles-32's
device drivers are interrupt-driven, they never disable interrupts and do
not process data transfers in interrupt handlers.
- Installable Device Drivers
RTFiles-32's device
driver interface is very simple. Only three functions are required to
access a device: MountDevice, ReadSectors, and WriteSectors. All drivers
(except for the M-Systems DiskOnChip driver available free of charge from
M-Systems/SanDisk) included with RTFiles-32 come with complete source
code, which can be used as examples for implementing custom drivers.
- Portable
RTFiles-32 is written in ANSI C and
does not contain any system or hardware dependencies. All device-specific
code is encapsulated in device drivers which are always delivered with
full source code. The portable file system's source code is available as
an option. By supplying an alternate System Driver, RTFiles-32 can easily
be ported to other operating systems or CPUs. Compile-time options are
available to support little-endian and big-endian CPUs or for
packing/unpacking data in misaligned FAT data structures.

Structure of RTFiles-32
|