blob: de9cfbe100193acc585be9563ada176341b12479 [file] [log] [blame]
# Copyright (c) 2016 Intel Corporation
# Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config FAT_FILESYSTEM_ELM
bool "ELM FAT file system support"
depends on FILE_SYSTEM
select DISK_ACCESS
help
Use the ELM FAT File system implementation.
if FAT_FILESYSTEM_ELM
menu "ELM FAT file system settings"
visible if FAT_FILESYSTEM_ELM
config FS_FATFS_READ_ONLY
bool "Read-only support for all volumes"
help
The option excludes write code from ELM FAT file system driver;
when selected, it no longer will be possible to write data on
the FAT FS.
If write support is not needed, enabling this flag will slightly
reduce application size.
This option translates to _FS_READONLY within ELM FAT file system
driver; it enables exclusion, from compilation, of write supporting
code.
config FS_FATFS_MKFS
bool
help
This option translates to _USE_MKFS within ELM FAT file system
driver; it enables additional code that is required for formatting
volumes to ELM FAT.
config FS_FATFS_MOUNT_MKFS
bool "Allow formatting volume when mounting fails"
default y
select FS_FATFS_MKFS
help
This option adds code that allows fs_mount to attempt to format
a volume if no file system is found.
If formatting is not needed, disabling this flag will slightly
reduce application size.
if FS_FATFS_MOUNT_MKFS
config FS_FATFS_MAX_ROOT_ENTRIES
int "Max number of entries in FAT FS root directory"
default 512
range 1 32768
help
Sets how many root directory entries will be allocated when
formatting new FAT system to a device.
Note that this should be multiply of FS_FATFS_MAX_SS / 32.
endif # FS_FATFS_MOUNT_MKFS
config FS_FATFS_EXFAT
bool "ExFAT support"
select FS_FATFS_LFN
help
Enable the exFAT format support for FatFs.
config FS_FATFS_NUM_FILES
int "Maximum number of opened files"
default 4
config FS_FATFS_NUM_DIRS
int "Maximum number of opened directories"
default 4
config FS_FATFS_LFN
bool "Long filenames (LFN)"
help
Without long filenames enabled, file names are limited to 8.3 format.
This option increases working buffer size.
if FS_FATFS_LFN
choice FS_FATFS_LFN_MODE
prompt "LFN memory mode"
default FS_FATFS_LFN_MODE_BSS
config FS_FATFS_LFN_MODE_BSS
bool "Static buffer"
help
Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
config FS_FATFS_LFN_MODE_STACK
bool "Stack buffer"
help
Enable LFN with dynamic working buffer on the STACK.
config FS_FATFS_LFN_MODE_HEAP
bool "Heap buffer"
help
Enable LFN with dynamic working buffer on the HEAP.
endchoice
config FS_FATFS_MAX_LFN
int "Max filename length"
range 12 255
default 255
help
The working buffer occupies (FS_FATFS_MAX_LFN + 1) * 2 bytes and
additional 608 bytes at exFAT enabled.
It should be set 255 to support full featured LFN operations.
endif # FS_FATFS_LFN
config FS_FATFS_CODEPAGE
int "FatFS code page (character set)"
default 437
help
Valid code page values:
437 - U.S.
720 - Arabic
737 - Greek
771 - KBL
775 - Baltic
850 - Latin 1
852 - Latin 2
855 - Cyrillic
857 - Turkish
860 - Portuguese
861 - Icelandic
862 - Hebrew
863 - Canadian French
864 - Arabic
865 - Nordic
866 - Russian
869 - Greek 2
932 - Japanese (DBCS)
936 - Simplified Chinese (DBCS)
949 - Korean (DBCS)
950 - Traditional Chinese (DBCS)
config FS_FATFS_MAX_SS
int "Maximum supported sector size"
range 512 4096
default 512
config FS_FATFS_MIN_SS
int "Minimum expected sector size"
range 512 FS_FATFS_MAX_SS
default 512
help
Specifies minimum sector size the FAT FS driver is expected to
support. Set this to FS_FATFS_MAX_FS when you have single
device with FAT FS or all connected devices use the same
sector size, to have slight reduction in code in FAT FS driver.
The reduction comes from the fact that FAT FS does not have to
query every connected device for sector size.
This option affects FF_MAX_SS defined in ffconf.h, inside
ELM FAT module
config FS_FATFS_WINDOW_ALIGNMENT
int "Memory alignment for the member \"win\" in FATFS"
default 1
help
Specifies alignment, in bytes of FAT FS window buffer that is
used for device's read/write operations. MMC controllers may
require read/write buffer to start at memory address with
specific alignment, for example 16 or 512 bytes, the value
provided here is used as such alignment. Note that the window
buffer is internal element of FATFS structure, which means
that, in worst scenario, value provided here may cause FATFS
structure to have size of twice the value
endmenu
endif # FAT_FILESYSTEM_ELM