2022-03-25 23:07:18 +08:00
|
|
|
menuconfig RT_USING_DFS
|
|
|
|
bool "DFS: device virtual file system"
|
2018-06-27 10:10:50 +08:00
|
|
|
select RT_USING_MUTEX
|
2017-01-31 11:54:12 +08:00
|
|
|
default y
|
|
|
|
help
|
|
|
|
The device file system is a light weight virtual file system.
|
|
|
|
|
|
|
|
if RT_USING_DFS
|
2021-11-16 00:22:49 +08:00
|
|
|
config DFS_USING_POSIX
|
|
|
|
bool "Using posix-like functions, open/read/write/close"
|
|
|
|
default y
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config DFS_USING_WORKDIR
|
|
|
|
bool "Using working directory"
|
|
|
|
default y
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config DFS_FILESYSTEMS_MAX
|
2018-07-18 11:05:39 +08:00
|
|
|
int "The maximal number of mounted file system"
|
2021-05-21 18:02:43 +08:00
|
|
|
default 4
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-11-28 21:17:27 +08:00
|
|
|
config DFS_FILESYSTEM_TYPES_MAX
|
|
|
|
int "The maximal number of file system type"
|
2021-05-21 18:02:43 +08:00
|
|
|
default 4
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config DFS_FD_MAX
|
|
|
|
int "The maximal number of opened files"
|
2018-07-14 10:03:59 +08:00
|
|
|
default 16
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2018-07-28 20:22:14 +08:00
|
|
|
config RT_USING_DFS_MNTTABLE
|
|
|
|
bool "Using mount table for file system"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
User can use mount table for automatically mount, for example:
|
|
|
|
const struct dfs_mount_tbl mount_table[] =
|
|
|
|
{
|
|
|
|
{"flash0", "/", "elm", 0, 0},
|
|
|
|
{0}
|
|
|
|
};
|
|
|
|
The mount_table must be terminated with NULL.
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_DFS_ELMFAT
|
|
|
|
bool "Enable elm-chan fatfs"
|
2018-07-17 20:29:33 +08:00
|
|
|
default n
|
2017-01-31 11:54:12 +08:00
|
|
|
help
|
|
|
|
FatFs is a generic FAT/exFAT file system module for small embedded systems.
|
2017-10-25 14:21:49 +08:00
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
if RT_USING_DFS_ELMFAT
|
2017-10-25 14:21:49 +08:00
|
|
|
menu "elm-chan's FatFs, Generic FAT Filesystem Module"
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_DFS_ELM_CODE_PAGE
|
|
|
|
int "OEM code page"
|
|
|
|
default 437
|
2017-10-09 15:12:42 +08:00
|
|
|
|
|
|
|
config RT_DFS_ELM_WORD_ACCESS
|
|
|
|
bool "Using RT_DFS_ELM_WORD_ACCESS"
|
2018-07-18 11:05:39 +08:00
|
|
|
default y
|
2017-10-09 15:12:42 +08:00
|
|
|
|
2018-07-18 11:05:39 +08:00
|
|
|
choice
|
2017-10-05 16:20:21 +08:00
|
|
|
prompt "Support long file name"
|
2018-07-25 00:50:23 +08:00
|
|
|
default RT_DFS_ELM_USE_LFN_3
|
2017-10-05 16:20:21 +08:00
|
|
|
|
|
|
|
config RT_DFS_ELM_USE_LFN_0
|
|
|
|
bool "0: LFN disable"
|
|
|
|
|
|
|
|
config RT_DFS_ELM_USE_LFN_1
|
|
|
|
bool "1: LFN with static LFN working buffer"
|
|
|
|
|
|
|
|
config RT_DFS_ELM_USE_LFN_2
|
|
|
|
bool "2: LFN with dynamic LFN working buffer on the stack"
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-10-05 16:20:21 +08:00
|
|
|
config RT_DFS_ELM_USE_LFN_3
|
|
|
|
bool "3: LFN with dynamic LFN working buffer on the heap"
|
|
|
|
endchoice
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-10-05 14:52:16 +08:00
|
|
|
config RT_DFS_ELM_USE_LFN
|
2017-10-05 16:20:21 +08:00
|
|
|
int
|
|
|
|
default 0 if RT_DFS_ELM_USE_LFN_0
|
|
|
|
default 1 if RT_DFS_ELM_USE_LFN_1
|
|
|
|
default 2 if RT_DFS_ELM_USE_LFN_2
|
|
|
|
default 3 if RT_DFS_ELM_USE_LFN_3
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2020-06-12 10:34:35 +08:00
|
|
|
choice
|
|
|
|
prompt "Support unicode for long file name"
|
|
|
|
default RT_DFS_ELM_LFN_UNICODE_0
|
|
|
|
|
|
|
|
config RT_DFS_ELM_LFN_UNICODE_0
|
|
|
|
bool "0: ANSI/OEM in current CP (TCHAR = char)"
|
|
|
|
|
|
|
|
config RT_DFS_ELM_LFN_UNICODE_1
|
|
|
|
bool "1: Unicode in UTF-16 (TCHAR = WCHAR)"
|
|
|
|
|
|
|
|
config RT_DFS_ELM_LFN_UNICODE_2
|
|
|
|
bool "2: Unicode in UTF-8 (TCHAR = char)"
|
|
|
|
|
|
|
|
config RT_DFS_ELM_LFN_UNICODE_3
|
|
|
|
bool "3: Unicode in UTF-32 (TCHAR = DWORD)"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config RT_DFS_ELM_LFN_UNICODE
|
|
|
|
int
|
|
|
|
default 0 if RT_DFS_ELM_LFN_UNICODE_0
|
|
|
|
default 1 if RT_DFS_ELM_LFN_UNICODE_1
|
|
|
|
default 2 if RT_DFS_ELM_LFN_UNICODE_2
|
|
|
|
default 3 if RT_DFS_ELM_LFN_UNICODE_3
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_DFS_ELM_MAX_LFN
|
|
|
|
int "Maximal size of file name length"
|
2017-10-15 22:44:53 +08:00
|
|
|
range 12 255
|
|
|
|
default 255
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_DFS_ELM_DRIVES
|
|
|
|
int "Number of volumes (logical drives) to be used."
|
|
|
|
default 2
|
2017-10-15 22:44:53 +08:00
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_DFS_ELM_MAX_SECTOR_SIZE
|
|
|
|
int "Maximum sector size to be handled."
|
|
|
|
default 512
|
|
|
|
help
|
2021-03-15 13:44:25 +08:00
|
|
|
If you use some spi nor flash for fatfs, please set this the erase sector size, for example 4096.
|
2017-01-31 11:54:12 +08:00
|
|
|
|
|
|
|
config RT_DFS_ELM_USE_ERASE
|
|
|
|
bool "Enable sector erase feature"
|
|
|
|
default n
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_DFS_ELM_REENTRANT
|
|
|
|
bool "Enable the reentrancy (thread safe) of the FatFs module"
|
|
|
|
default y
|
2021-09-26 01:45:55 +08:00
|
|
|
|
|
|
|
config RT_DFS_ELM_MUTEX_TIMEOUT
|
|
|
|
int "Timeout of thread-safe protection mutex"
|
|
|
|
range 0 1000000
|
|
|
|
default 3000
|
|
|
|
depends on RT_DFS_ELM_REENTRANT
|
2017-10-25 14:21:49 +08:00
|
|
|
endmenu
|
2017-01-31 11:54:12 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
config RT_USING_DFS_DEVFS
|
|
|
|
bool "Using devfs for device objects"
|
2021-11-08 10:40:19 +08:00
|
|
|
default n
|
2017-12-18 15:47:30 +08:00
|
|
|
|
2017-10-25 14:21:49 +08:00
|
|
|
config RT_USING_DFS_ROMFS
|
|
|
|
bool "Enable ReadOnly file system on flash"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config RT_USING_DFS_RAMFS
|
|
|
|
bool "Enable RAM file system"
|
2019-04-24 15:09:56 +08:00
|
|
|
select RT_USING_MEMHEAP
|
2017-10-25 14:21:49 +08:00
|
|
|
default n
|
|
|
|
|
2017-01-31 11:54:12 +08:00
|
|
|
config RT_USING_DFS_NFS
|
|
|
|
bool "Using NFS v3 client file system"
|
2018-09-05 20:52:16 +08:00
|
|
|
depends on RT_USING_LWIP
|
2017-01-31 11:54:12 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
if RT_USING_DFS_NFS
|
|
|
|
config RT_NFS_HOST_EXPORT
|
|
|
|
string "NFSv3 host export"
|
|
|
|
default "192.168.1.5:/"
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|