This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F4xx File Name size

Using RTX RL-FlashFS on a SD-CARD formatted to FAT32, when I create file with large file name with 13 to 18 characters the file system get corrupted to a point it becomes unreadable when about 100 files are created with long file name. Then card requires re-formatting.

If I make all file names within the 8.3 length I can generate over 1000 files with no problems to the files system.

Does anyone know if there is file name size limit for FAT32 for RL-FlashFS ?. Or a configuration to set the size of file names ?.

Parents
  • Note that long file names consumes much more space - the FAT file system have a fixed-size directory entry. To use extended file names, the file system creates extra dummy entries that chains together the total amount of characters of the long file name.

    When formatting a FAT file system, one of the things that gets configured is the number of file names in the root directory.

    But another thing - maybe the file system implementation also have a limit on how large a single directlry may be. It is seldom good to have lots of files in a single directory unless the machine accessing that directory have memory enough to cache all directory entries (including the dummy entries that chains together to form long file names). In an embedded environment, you can get situations where the low-level code have to scan through the directory data many, many times just trying to scope up the specific file entries that fits in the reserved buffers.

Reply
  • Note that long file names consumes much more space - the FAT file system have a fixed-size directory entry. To use extended file names, the file system creates extra dummy entries that chains together the total amount of characters of the long file name.

    When formatting a FAT file system, one of the things that gets configured is the number of file names in the root directory.

    But another thing - maybe the file system implementation also have a limit on how large a single directlry may be. It is seldom good to have lots of files in a single directory unless the machine accessing that directory have memory enough to cache all directory entries (including the dummy entries that chains together to form long file names). In an embedded environment, you can get situations where the low-level code have to scan through the directory data many, many times just trying to scope up the specific file entries that fits in the reserved buffers.

Children
No data