|
RTFiles-32 - FAT, exFAT, and ISO 9660 File System for On Time RTOS-32
RTFiles-32 is a
FAT-12/16/32,
exFAT, and
ISO 9660
file system for On Time RTOS-32. 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.
- Support for Super Floppy, MBR, and GPT Partition
Tables
RTFiles-32 supports all commonly used partition
schemes.
- 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, Flash, SRAM Cards, Hard Disks, USB Disks,
SSDs, SD (Secure Digital) Memory Cards, CD-ROMs, DVDs
RTFiles-32 supports diskette drives and media with 360k, 1.2M, 720k,
1.44M, and 2.88M capacity. IDE disks with CHS (Cylinder, Head, Sector) or
LBA (Logical Block Addressing) interfaces as well as IDE and DiskOnChip
flash disks are supported. USB disks and memory sticks are supported in
conjunction with the On Time USB host protocol stack RTUSB-32. SD (Secure
Digital) Memory cards including SDSC, SDHC, and SDXC (Standard, High,
eXtended Capacity) are supported on PCI SD Card host controllers. CD-ROMs
and DVDs can be used on IDE-ATAPI interfaces. Adding custom drivers is
easily accomplished through RTFiles-32's documented device driver
interface
- 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,
AHCI, and NVMe 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.
- Hard Disks with Unlimited Size
The latest
standards (such as 48 bit LBA) for extended sector addressing are
supported.
- 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 on FAT volumes.
- 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
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, 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
included with RTFiles-32 come with complete source code, which can be used
as examples for implementing custom drivers.
Structure of RTFiles-32
|