FAQ
Yes, as of EcFAT 3.0.0, bad block management is supported.
Define ECF_OPT_SUPPORT_WEARLEVEL and ECF_OPT_SUPPORT_BAD_BLOCK_MANAGEMENT and specify how many bad blocks you want to support in RAM with the ECF_OPT_WEARLEVEL_MAX_BAD_BLOCK_COUNT flag and how many bad blocks the disc supports when calling ECF_WearLevelFormat.
Yes, as of EcFAT 3.0.0, journaling is supported.
Define ECF_OPT_SUPPORT_JOURNAL and mount your file system with the ECF_MOUNT_JOURNAL flag.
Yes, but it is optional.
Define ECF_OPT_SUPPORT_LONG_FILENAMES to add support for long file names.
Yes.
To use it you need to define ECF_OPT_USE_MUTEX and supply a locking mechanism. See ECF API Reference.pdf and the section about ECF_OPT_USE_MUTEX
Yes, it is supported as of EcFAT 2.1.
Yes, as of EcFAT 3.0, wear leveing is supported.
Define ECF_OPT_SUPPORT_WEARLEVEL to enable support and call ECF_WearLevelFormat to prepare your disc for wear-leveling.
Old minor versions will receive bug fixes 1 year from when the next version is released.
Old major version will receive bug fixes 2 years from when the next version is released.
Example 1: EcFAT 2.1 was released 2012-04-10. Since it was a minor update from EcFAT 2.0, EcFAT 2.0 will be supported until 2013-04-10
Example 2: EcUSB 2.0 was released 2012-09-05. Since it was a major update from EcUSB 1.2, EcUSB 1.2 will be supported until 2014-09-05.
The only exception is if we know that no customers are using a particular version, then we will stop making updates for it and mark it as obsolete.
There are several limitations that is part of the FAT file system that cannot be altered without breaking compatability with FAT. There is also the issue that long file name entries take up more space than short filename entries. On a file system with short file names only, each file or directory takes up 1 entry. With long file name support, it depends on the length of the filename but it takes around 2 + (strlen(filename)/5).
For the root directory of a FAT12 or FAT16 file system, the limit depends on what was decided when the device was formatted. It is often safe to assume that you may store up to 128 entries.
For the root directory of a FAT32 file system or any other directory on FAT12, FAT16 or FAT32 you can store up to around 65533 entries.
For a file system without long name support, this means that you in theory can have up to around 65533 files and directories within a directory.
For a file system with long name support, it is harder to calculate but if you use filenames of a length between 15-20 characters you can store around 10000 files and directories.
However, we strongly advise against storing that many files in a single directory. The FAT file system stores files as a single list that has to be traversed to find the file which become very slow unless you have a big cache. Instead store your data in subdirectories and aim to keep around 10-200 entries in each directory.
If you are storing one log file per day you might store them in subdirectories based on dates:
/ /logs/ /logs/2012/10/ /logs/2012/11/ /logs/2012/12/ /logs/2013/01/ /logs/2013/02/
If you are storing data you may want to use some prefix of the file to create a directory structure:
/ /sensordata/ /sensordata/13/ /sensordata/13/13344.dat /sensordata/13/13812.dat /sensordata/43/ /sensordata/43/43928.dat /sensordata/59/ /sensordata/59/59728.dat
EcFAT was originally called ECF but we changed the name to make it clear what the product actually does. ECF still exists in many places but will eventuelly be replaced by EcFAT.
We will however not change the API, we will still use the "ECF_" prefix for functions and structs. There are two reasons for this: 1. We don't want to force our customers to change their source. We want upgrades to be easy. 2. We will eventually make a product called EcFile (a generic file system) that will have the same API as EcFAT and it makes sense to use "ECF_" as their common API prefix.