mirror of
https://github.com/eclipse-threadx/rtos-docs.git
synced 2025-12-12 23:45:17 +08:00
@@ -26,13 +26,6 @@ UINT fx_media_check(FX_MEDIA *media_ptr, UCHAR *scratch_memory_ptr,
|
||||
|
||||
UINT fx_media_close(FX_MEDIA *media_ptr);
|
||||
UINT fx_media_close_notify_set(FX_MEDIA *media_ptr, VOID (*media_close_notify)(FX_MEDIA *media));
|
||||
UINT fx_media_exFAT_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media),
|
||||
VOID *driver_info_ptr, UCHAR *memory_ptr,
|
||||
UINT memory_size, CHAR *volume_name,
|
||||
UINT number_of_fats, ULONG64 hidden_sectors,
|
||||
ULONG64 total_sectors, UINT bytes_per_sector,
|
||||
UINT sectors_per_cluster, UINT volume_serial_number,
|
||||
UINT boundary_unit);
|
||||
UINT fx_media_extended_space_available(FX_MEDIA *media_ptr, ULONG64 *available_bytes_ptr);
|
||||
UINT fx_media_flush(FX_MEDIA *media_ptr);
|
||||
UINT fx_media_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media),
|
||||
|
||||
@@ -9,7 +9,7 @@ FileX is a complete FAT format media and file management system for deeply embed
|
||||
|
||||
## FileX Unique Features
|
||||
|
||||
FileX supports an unlimited number of media devices at the same time, including RAM disks, FLASH managers, and actual physical devices. It supports 12-, 16-, and 32-bit File Allocation Table (FAT) formats, and also supports Extended File Allocation Table (exFAT), contiguous file allocation, and is highly optimized for both size and performance. FileX also includes fault tolerant support, media open/ close, and file write callback functions.
|
||||
FileX supports an unlimited number of media devices at the same time, including RAM disks, FLASH managers, and actual physical devices. It supports 12-, 16-, and 32-bit File Allocation Table (FAT) formats, and also supports contiguous file allocation, and is highly optimized for both size and performance. FileX also includes fault tolerant support, media open/ close, and file write callback functions.
|
||||
|
||||
Designed to meet the growing need for FLASH devices, FileX uses the same design and coding methods as ThreadX. Like all Eclipse Foundation products, FileX is distributed with full ANSI C source code, and it has no run-time royalties.
|
||||
|
||||
@@ -29,7 +29,6 @@ Designed to meet the growing need for FLASH devices, FileX uses the same design
|
||||
- Endian neutral
|
||||
- Easy-to-implement FileX I/O drivers
|
||||
- 12-, 16-, and 32-bit FAT support
|
||||
- exFAT support
|
||||
- Long filename support
|
||||
- Internal FAT entry cache
|
||||
- Unicode name support
|
||||
@@ -91,12 +90,6 @@ FileX provides the very best deeply embedded file system technology in a manner
|
||||
|
||||
For a complete list of the FileX Version 5 Services, see [Appendix A](appendix-a.md).
|
||||
|
||||
## exFAT Support
|
||||
|
||||
exFAT (extended File Allocation Table) is a file system designed by Eclipse Foundation to allow file size to exceed 2GB, a limit imposed by FAT32 file systems. It is the default file system for SD cards with capacity over 32GB. SD cards or flash drives formatted with FileX exFAT format are compatible with Windows. exFAT supports file size up to one Exabyte (EB), which is approximately one billion GB.
|
||||
|
||||
Users wishing to use exFAT must recompile the FileX library with the symbol **_FX_ENABLE_EXFAT_** defined. When opening media, FileX detects the media type. If the media is formatted with exFAT, FileX reads and writes the file system following exFAT standard. To format new media with exFAT, use the service **_fx_media_exFAT_format_**. By default exFAT is not enabled.
|
||||
|
||||
## Fault Tolerant Support
|
||||
|
||||
The FileX Fault Tolerant Module is designed to prevent file system corruption caused by interruptions during the file or directory update. For example, when appending data to a file, FileX needs to update the content of the file, the directory entry, and possibly the FAT entries. If this sequence of update is interrupted (such as power glitch, or the media is ejected in the middle of the update), the file system is in an inconsistent state, which may affect the integrity of the entire file system, leading towards corruption of other files.
|
||||
@@ -107,7 +100,7 @@ As FileX updates file or directory, log entries are created. After the update op
|
||||
|
||||
In case the file system update operation was interrupted, next time the media is mounted by FileX, the Fault Tolerant Module analyzes the log entries. The information in the log entries allows FileX to back out partial changes already applied to the file system (in case the failure happens during the early stage of the file update operation), or if the log entries contain re-do information, FileX is able to apply the changes required to finish the prior operation.
|
||||
|
||||
This fault tolerant feature is available to all FAT file systems supported by FileX, including FAT12, FAT16, FAT32, and exFAT. By default fault tolerant is not enabled in FileX. To enable the fault tolerant feature, FileX must be built with the symbol **FX_ENABLE_FAULT_TOLERANT** and **FX_FAULT_TOLERANT** defined. At run time, the application starts fault tolerant service by calling **_fx_fault_tolerant_enable_**.
|
||||
This fault tolerant feature is available to all FAT file systems supported by FileX, including FAT12, FAT16, and FAT32. By default fault tolerant is not enabled in FileX. To enable the fault tolerant feature, FileX must be built with the symbol **FX_ENABLE_FAULT_TOLERANT** and **FX_FAULT_TOLERANT** defined. At run time, the application starts fault tolerant service by calling **_fx_fault_tolerant_enable_**.
|
||||
After the service starts, all file and directory write operations go through the Fault Tolerant Module.
|
||||
|
||||
As fault tolerant service starts, it first detects whether or not the media is protected under the Fault Tolerant Module. If it is not, FileX assumes integrity of the file system, and starts protection by allocating free blocks from the file system to be used for logging and caching. If the Fault Tolerant Module logs are found on the file system, it analyzes the log entries. FileX reverts the prior operation or redoes the prior operation, depending on the content of the log entries. The file system becomes available after all the prior log entries are processed. This ensures that FIleX starts from a known good state.
|
||||
|
||||
@@ -117,12 +117,11 @@ The following list describes each configuration option in detail:
|
||||
|FX_NO_LOCAL_PATH|Removes local path logic from FileX, resulting in smaller code size.|
|
||||
|FX_NO_TIMER|Eliminates the ThreadX timer setup to update the FileX system time and date. Doing so causes default time and date to be placed on all file operations.|
|
||||
|FX_UPDATE_RATE_IN_SECONDS |Specifies rate at which system time in FileX is adjusted. By default, value is 10, specifying that the FileX system time is updated every 10 seconds.|
|
||||
|FX_ENABLE_EXFAT| When defined, the logic for handling exFAT file system is enabled in FileX. By default this symbol is not defined.|
|
||||
|FX_UPDATE_RATE_IN_TICKS| Specifies the same rate as ***FX_UPDATE_RATE_IN_SECONDS*** (see above), except in terms of the underlying ThreadX timer frequency. The default is 1000, which assumes a 10ms ThreadX timer rate and a 10 second interval.|
|
||||
|FX_SINGLE_THREAD|Eliminates ThreadX protection logic from the FileX source. It should be used if FileX is being used only from one thread or if FileX is being used without ThreadX.|
|
||||
|FX_DRIVER_USE_64BIT_LBA|When defined, enables 64-bit sector addresses used in I/O driver. By default this option is not defined.|
|
||||
|FX_ENABLE_FAULT_TOLERANT| When defined, enables FileX Fault Tolerant Module. Enabling Fault Tolerant automatically defines the symbol ***FX_FAULT_TOLERANT*** and ***FX_FAULT_TOLERANT_DATA***. By default this option is not defined.|
|
||||
|FX_FAULT_TOLERANT_BOOT_INDEX|Defines byte offset in the boot sector where the cluster for the fault tolerant log is. By default this value is 116. This field takes 4 bytes. Bytes 116 through 119 are chosen because they are marked as reserved by FAT 12/16/32/exFAT specification.|
|
||||
|FX_FAULT_TOLERANT_BOOT_INDEX|Defines byte offset in the boot sector where the cluster for the fault tolerant log is. By default this value is 116. This field takes 4 bytes. Bytes 116 through 119 are chosen because they are marked as reserved by FAT 12/16/32 specification.|
|
||||
|FX_FAULT_TOLERANT_MINIMAL_CLUSTER|This symbol is deprecated. It is no longer being used by FileX Fault Tolerant.|
|
||||
|FX_STANDALONE_ENABLE|Defined, enables FileX to be used in standalone mode (without Eclipse ThreadX). By default this symbol is not defined.|
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ The FileX Fault Tolerant Module works by journaling steps required to update a f
|
||||
|
||||
## Use of the Fault Tolerant Module
|
||||
|
||||
The FileX Fault Tolerant feature is available to all FAT file systems supported by FileX, including FAT12, FAT16, FAT32, and exFAT. To enable the fault tolerant feature, FileX must be built with the symbol **FX_ENABLE_FAULT_TOLERANT** defined. At run time, application starts fault tolerant service by calling ***fx_fault_tolerant_enable*** immediately after the call to ***fx_media_open***. After fault tolerant is enabled, all file write operations to the designated media are protected. By default the fault tolerant module is not enabled.
|
||||
The FileX Fault Tolerant feature is available to all FAT file systems supported by FileX, including FAT12, FAT16, and FAT32. To enable the fault tolerant feature, FileX must be built with the symbol **FX_ENABLE_FAULT_TOLERANT** defined. At run time, application starts fault tolerant service by calling ***fx_fault_tolerant_enable*** immediately after the call to ***fx_media_open***. After fault tolerant is enabled, all file write operations to the designated media are protected. By default the fault tolerant module is not enabled.
|
||||
|
||||
> **Important:** *Application needs to make sure the file system is not being accessed prior to ***fx_fault_tolerant_enable*** being called. If application writes data to the file system prior to fault tolerant enable, the write operation could corrupt the media if prior write operations were not completed, and the file system was not restored using fault tolerant log entries.*
|
||||
|
||||
## FileX Fault Tolerant Module Log
|
||||
|
||||
The FileX fault tolerant log takes up one logical cluster in flash. The index to the starting cluster number of that cluster is recorded in the boot sector of the media, with an offset specified by the symbol **FX_FAULT_TOLERANT_BOOT_INDEX**. By default this symbol is defined to be 116. This location is chosen because it is marked as reserved in FAT12/ 16/32 and exFAT specification.
|
||||
The FileX fault tolerant log takes up one logical cluster in flash. The index to the starting cluster number of that cluster is recorded in the boot sector of the media, with an offset specified by the symbol **FX_FAULT_TOLERANT_BOOT_INDEX**. By default this symbol is defined to be 116. This location is chosen because it is marked as reserved in FAT12/16/32 specification.
|
||||
|
||||
Figure 5, "Log Structure Layout," shows the general layout of the log structure. The log structure contains three sections: Log Header, FAT Chain, and Log Entries.
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ description: FileX is a high-performance, file allocation table (FAT)-compatible
|
||||
|
||||
# Overview of FileX
|
||||
|
||||
FileX embedded file system is Eclipse ThreadX's advanced, industrial grade solution for Eclipse Foundation FAT file formats, designed specifically for deeply embedded, real-time, and IoT applications. FileX supports all of Eclipse Foundation's file formats, including FAT12, FAT16, FAT32, and exFAT. FileX also offers optional fault tolerance and FLASH wear leveling via an add-on product called [LevelX](../levelx/index.md). All of this combined with a small footprint, fast execution, and superior ease-of-use, make FileX the ideal choice for the most demanding embedded IoT applications.
|
||||
FileX embedded file system is Eclipse ThreadX's advanced, industrial grade solution for Eclipse Foundation FAT file formats, designed specifically for deeply embedded, real-time, and IoT applications. FileX supports all of Eclipse Foundation's file formats, including FAT12, FAT16, and FAT32. FileX also offers optional fault tolerance and FLASH wear leveling via an add-on product called [LevelX](../levelx/index.md). All of this combined with a small footprint, fast execution, and superior ease-of-use, make FileX the ideal choice for the most demanding embedded IoT applications.
|
||||
|
||||
## API protocols
|
||||
|
||||
### Media Services
|
||||
|
||||
- FAT 12/16/32 and exFAT support
|
||||
- FAT 12/16/32 support
|
||||
- Minimal 6KB FLASH, 2.5KB RAM
|
||||
- Complete media access services
|
||||
- Unlimited number of media instance
|
||||
@@ -70,7 +70,7 @@ FileX embedded file system is Eclipse ThreadX's advanced, industrial grade solut
|
||||
|
||||
FileX is advanced technology, including the following.
|
||||
|
||||
- FAT 12/16/32 and exFAT support
|
||||
- FAT 12/16/32 support
|
||||
- Multiple partition support
|
||||
- Automatic scaling
|
||||
- Endian neutral
|
||||
|
||||
Reference in New Issue
Block a user