Kconfig 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. menu "FAT Filesystem support"
  2. config FATFS_VOLUME_COUNT
  3. int "Number of volumes"
  4. default 2
  5. range 1 10
  6. help
  7. Number of volumes (logical drives) to use.
  8. choice FATFS_SECTOR_SIZE
  9. prompt "Sector size"
  10. default FATFS_SECTOR_4096
  11. help
  12. Specify the size of the sector in bytes for FATFS partition generator.
  13. config FATFS_SECTOR_512
  14. bool "512"
  15. config FATFS_SECTOR_1024
  16. bool "1024"
  17. config FATFS_SECTOR_2048
  18. bool "2048"
  19. config FATFS_SECTOR_4096
  20. bool "4096"
  21. endchoice
  22. choice FATFS_SECTORS_PER_CLUSTER
  23. prompt "Sectors per cluster"
  24. default FATFS_SECTORS_PER_CLUSTER_1
  25. help
  26. This value specifies how many sectors there are in one cluster.
  27. config FATFS_SECTORS_PER_CLUSTER_1
  28. bool "1"
  29. config FATFS_SECTORS_PER_CLUSTER_2
  30. bool "2"
  31. config FATFS_SECTORS_PER_CLUSTER_4
  32. bool "4"
  33. config FATFS_SECTORS_PER_CLUSTER_8
  34. bool "8"
  35. config FATFS_SECTORS_PER_CLUSTER_16
  36. bool "16"
  37. config FATFS_SECTORS_PER_CLUSTER_32
  38. bool "32"
  39. config FATFS_SECTORS_PER_CLUSTER_64
  40. bool "64"
  41. config FATFS_SECTORS_PER_CLUSTER_128
  42. bool "128"
  43. endchoice
  44. choice FATFS_CHOOSE_CODEPAGE
  45. prompt "OEM Code Page"
  46. default FATFS_CODEPAGE_437
  47. help
  48. OEM code page used for file name encodings.
  49. If "Dynamic" is selected, code page can be chosen at runtime using
  50. f_setcp function. Note that choosing this option will increase
  51. application size by ~480kB.
  52. config FATFS_CODEPAGE_DYNAMIC
  53. bool "Dynamic (all code pages supported)"
  54. config FATFS_CODEPAGE_437
  55. bool "US (CP437)"
  56. config FATFS_CODEPAGE_720
  57. bool "Arabic (CP720)"
  58. config FATFS_CODEPAGE_737
  59. bool "Greek (CP737)"
  60. config FATFS_CODEPAGE_771
  61. bool "KBL (CP771)"
  62. config FATFS_CODEPAGE_775
  63. bool "Baltic (CP775)"
  64. config FATFS_CODEPAGE_850
  65. bool "Latin 1 (CP850)"
  66. config FATFS_CODEPAGE_852
  67. bool "Latin 2 (CP852)"
  68. config FATFS_CODEPAGE_855
  69. bool "Cyrillic (CP855)"
  70. config FATFS_CODEPAGE_857
  71. bool "Turkish (CP857)"
  72. config FATFS_CODEPAGE_860
  73. bool "Portugese (CP860)"
  74. config FATFS_CODEPAGE_861
  75. bool "Icelandic (CP861)"
  76. config FATFS_CODEPAGE_862
  77. bool "Hebrew (CP862)"
  78. config FATFS_CODEPAGE_863
  79. bool "Canadian French (CP863)"
  80. config FATFS_CODEPAGE_864
  81. bool "Arabic (CP864)"
  82. config FATFS_CODEPAGE_865
  83. bool "Nordic (CP865)"
  84. config FATFS_CODEPAGE_866
  85. bool "Russian (CP866)"
  86. config FATFS_CODEPAGE_869
  87. bool "Greek 2 (CP869)"
  88. config FATFS_CODEPAGE_932
  89. bool "Japanese (DBCS) (CP932)"
  90. config FATFS_CODEPAGE_936
  91. bool "Simplified Chinese (DBCS) (CP936)"
  92. config FATFS_CODEPAGE_949
  93. bool "Korean (DBCS) (CP949)"
  94. config FATFS_CODEPAGE_950
  95. bool "Traditional Chinese (DBCS) (CP950)"
  96. endchoice
  97. choice FATFS_CHOOSE_TYPE
  98. prompt "FAT type"
  99. default FATFS_AUTO_TYPE
  100. help
  101. If user specifies automatic detection of the FAT type,
  102. the FATFS generator will determine the type by the size.
  103. config FATFS_AUTO_TYPE
  104. bool "Select a suitable FATFS type automatically."
  105. config FATFS_FAT12
  106. bool "FAT12"
  107. config FATFS_FAT16
  108. bool "FAT16"
  109. endchoice
  110. config FATFS_CODEPAGE
  111. int
  112. default 0 if FATFS_CODEPAGE_DYNAMIC
  113. default 437 if FATFS_CODEPAGE_437
  114. default 720 if FATFS_CODEPAGE_720
  115. default 737 if FATFS_CODEPAGE_737
  116. default 771 if FATFS_CODEPAGE_771
  117. default 775 if FATFS_CODEPAGE_775
  118. default 850 if FATFS_CODEPAGE_850
  119. default 852 if FATFS_CODEPAGE_852
  120. default 855 if FATFS_CODEPAGE_855
  121. default 857 if FATFS_CODEPAGE_857
  122. default 860 if FATFS_CODEPAGE_860
  123. default 861 if FATFS_CODEPAGE_861
  124. default 862 if FATFS_CODEPAGE_862
  125. default 863 if FATFS_CODEPAGE_863
  126. default 864 if FATFS_CODEPAGE_864
  127. default 865 if FATFS_CODEPAGE_865
  128. default 866 if FATFS_CODEPAGE_866
  129. default 869 if FATFS_CODEPAGE_869
  130. default 932 if FATFS_CODEPAGE_932
  131. default 936 if FATFS_CODEPAGE_936
  132. default 949 if FATFS_CODEPAGE_949
  133. default 950 if FATFS_CODEPAGE_950
  134. default 437
  135. choice FATFS_LONG_FILENAMES
  136. prompt "Long filename support"
  137. default FATFS_LFN_NONE
  138. help
  139. Support long filenames in FAT. Long filename data increases
  140. memory usage. FATFS can be configured to store the buffer for
  141. long filename data in stack or heap (Currently not supported by FATFS partition generator).
  142. config FATFS_LFN_NONE
  143. bool "No long filenames"
  144. config FATFS_LFN_HEAP
  145. bool "Long filename buffer in heap"
  146. config FATFS_LFN_STACK
  147. bool "Long filename buffer on stack"
  148. endchoice
  149. config FATFS_MAX_LFN
  150. int "Max long filename length"
  151. depends on !FATFS_LFN_NONE
  152. default 255
  153. range 12 255
  154. help
  155. Maximum long filename length. Can be reduced to save RAM.
  156. choice FATFS_API_ENCODING
  157. prompt "API character encoding"
  158. depends on !FATFS_LFN_NONE
  159. default FATFS_API_ENCODING_ANSI_OEM
  160. help
  161. Choose encoding for character and string arguments/returns when using
  162. FATFS APIs. The encoding of arguments will usually depend on text
  163. editor settings.
  164. config FATFS_API_ENCODING_ANSI_OEM
  165. bool "API uses ANSI/OEM encoding"
  166. config FATFS_API_ENCODING_UTF_8
  167. bool "API uses UTF-8 encoding"
  168. endchoice
  169. config FATFS_FS_LOCK
  170. int "Number of simultaneously open files protected by lock function"
  171. default 0
  172. range 0 65535
  173. help
  174. This option sets the FATFS configuration value _FS_LOCK.
  175. The option _FS_LOCK switches file lock function to control duplicated file open
  176. and illegal operation to open objects.
  177. * 0: Disable file lock function. To avoid volume corruption, application
  178. should avoid illegal open, remove and rename to the open objects.
  179. * >0: Enable file lock function. The value defines how many files/sub-directories
  180. can be opened simultaneously under file lock control.
  181. Note that the file lock control is independent of re-entrancy.
  182. config FATFS_TIMEOUT_MS
  183. int "Timeout for acquiring a file lock, ms"
  184. default 10000
  185. help
  186. This option sets FATFS configuration value _FS_TIMEOUT, scaled to milliseconds.
  187. Sets the number of milliseconds FATFS will wait to acquire a mutex when
  188. operating on an open file. For example, if one task is performing a lenghty
  189. operation, another task will wait for the first task to release the lock,
  190. and time out after amount of time set by this option.
  191. config FATFS_PER_FILE_CACHE
  192. bool "Use separate cache for each file"
  193. default y
  194. help
  195. This option affects FATFS configuration value _FS_TINY.
  196. If this option is set, _FS_TINY is 0, and each open file has its own cache,
  197. size of the cache is equal to the _MAX_SS variable (512 or 4096 bytes).
  198. This option uses more RAM if more than 1 file is open, but needs less reads
  199. and writes to the storage for some operations.
  200. If this option is not set, _FS_TINY is 1, and single cache is used for
  201. all open files, size is also equal to _MAX_SS variable. This reduces the
  202. amount of heap used when multiple files are open, but increases the number
  203. of read and write operations which FATFS needs to make.
  204. config FATFS_ALLOC_PREFER_EXTRAM
  205. bool "Perfer external RAM when allocating FATFS buffers"
  206. default y
  207. depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
  208. help
  209. When the option is enabled, internal buffers used by FATFS will be allocated
  210. from external RAM. If the allocation from external RAM fails, the buffer will
  211. be allocated from the internal RAM.
  212. Disable this option if optimizing for performance. Enable this option if
  213. optimizing for internal memory size.
  214. config FATFS_USE_FASTSEEK
  215. bool "Enable fast seek algorithm when using lseek function through VFS FAT"
  216. default n
  217. help
  218. The fast seek feature enables fast backward/long seek operations without
  219. FAT access by using an in-memory CLMT (cluster link map table).
  220. Please note, fast-seek is only allowed for read-mode files, if a
  221. file is opened in write-mode, the seek mechanism will automatically fallback
  222. to the default implementation.
  223. config FATFS_FAST_SEEK_BUFFER_SIZE
  224. int "Fast seek CLMT buffer size"
  225. default 64
  226. depends on FATFS_USE_FASTSEEK
  227. help
  228. If fast seek algorithm is enabled, this defines the size of
  229. CLMT buffer used by this algorithm in 32-bit word units.
  230. This value should be chosen based on prior knowledge of
  231. maximum elements of each file entry would store.
  232. endmenu