Kconfig 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. config FS_SPIFFS
  6. bool "SPIFFS File System"
  7. default n
  8. select FS_READABLE
  9. select FS_WRITABLE
  10. depends on !DISABLE_MOUNTPOINT
  11. ---help---
  12. Build the SPIFFS file system. This is a port of version 0.3.7 of
  13. the SPIFFS file system by Peter Andersson. It was originally
  14. released under the MIT license.
  15. if FS_SPIFFS
  16. comment "In-memory Cache Options"
  17. config SPIFFS_CACHE_SIZE
  18. int "Size of the cache"
  19. default 8192
  20. config SPIFFS_CACHE_HITSCORE
  21. int "Cache Hit Score"
  22. default 4
  23. range 1 255
  24. ---help---
  25. Temporal file cache hit score. Each time a file is opened, all
  26. cached files will lose one point. If the opened file is found in
  27. cache, that entry will gain CONFIG_SPIFFS_CACHE_HITSCORE points.
  28. One can experiment with this value for the specific access patterns
  29. of the application. However, it must be between 1 (no gain for
  30. hitting a cached entry often) and 255.
  31. config SPIFFS_CACHEDBG
  32. bool "Enable cache debug output"
  33. default n
  34. depends on DEBUG_FS_INFO
  35. ---help---
  36. Dumps cache debug output. Depends on CONFIG_DEBUG_FS_INFO
  37. comment "Garbage Collection (GC) Options"
  38. config SPIFFS_GC_MAXRUNS
  39. int "Max GC runs"
  40. default 5
  41. ---help---
  42. Define maximum number of gc runs to perform to reach desired free
  43. pages.
  44. config SPIFFS_GC_DELWGT
  45. int "Deleted pages weight"
  46. default 5
  47. ---help---
  48. Garbage collecting examines all pages in a block which and sums up
  49. to a block score. Deleted pages normally gives positive score and
  50. used pages normally gives a negative score (as these must be moved).
  51. To have a fair wear-leveling, the erase age is also included in
  52. score, whose factor normally is the most positive. The larger the
  53. score, the more likely it is that the block will picked for garbage
  54. collection.
  55. This option provides the weight used for deleted pages.
  56. config SPIFFS_GC_USEDWGT
  57. int "Used pages weight"
  58. default -1
  59. ---help---
  60. Garbage collecting examines all pages in a block which and sums up
  61. to a block score. Deleted pages normally gives positive score and
  62. used pages normally gives a negative score (as these must be moved).
  63. To have a fair wear-leveling, the erase age is also included in
  64. score, whose factor normally is the most positive. The larger the
  65. score, the more likely it is that the block will picked for garbage
  66. collection.
  67. This option provides the weight used for used pages.
  68. config SPIFFS_GC_ERASEAGEWGT
  69. int "Used pages weight"
  70. default 50
  71. ---help---
  72. Garbage collecting examines all pages in a block which and sums up
  73. to a block score. Deleted pages normally gives positive score and
  74. used pages normally gives a negative score (as these must be moved).
  75. To have a fair wear-leveling, the erase age is also included in
  76. score, whose factor normally is the most positive. The larger the
  77. score, the more likely it is that the block will picked for garbage
  78. collection.
  79. This option provides the weight used weight used for time between
  80. last erased and erase of this block.
  81. config SPIFFS_GCDBG
  82. bool "Enable garbage collection debug output"
  83. default n
  84. depends on DEBUG_FS_INFO
  85. ---help---
  86. Dumps garbage collection debug output. Depends on CONFIG_DEBUG_FS_INFO
  87. comment "Consistency Check Options"
  88. config SPIFFS_CHECK_ONMOUNT
  89. bool "Consistency check on mount"
  90. default n
  91. select SPIFFS_CHECK_OUTPUT
  92. ---help---
  93. Perhaps a full, extended consistency check on mount. By default, a
  94. simple scan of the file system only is performed.
  95. config SPIFFS_CHECK_OUTPUT
  96. bool "Enable consistency check SYSLOG output"
  97. default n
  98. config SPIFFS_DUMP
  99. bool "Dump Logical FLASH Content"
  100. default n
  101. depends on SPIFFS_CHECK_OUTPUT
  102. ---help---
  103. Enables support for the FIOC_DUMP IOCTL command which will dump a
  104. terse summary of the state of each FLASH page.
  105. comment "MTD Interface Options"
  106. config SPIFFS_MTDDBG
  107. bool "Enable MTD Interface DEBUG"
  108. default n
  109. depends on DEBUG_FS_INFO
  110. ---help---
  111. Dumps MTD debug output. Depends on CONFIG_DEBUG_FS_INFO
  112. config SPIFFS_MTDDUMP
  113. bool "Enable MTD Data Dump"
  114. default n
  115. depends on SPIFFS_MTDDBG
  116. ---help---
  117. Dumps every byte of data going to and coming from FLASH. You
  118. probably do not want this unless you are debugging a particular
  119. MTD interfacing issue.
  120. comment "SPIFFS Core Options"
  121. config SPIFFS_NO_BLIND_WRITES
  122. bool "No blind writes"
  123. default n
  124. ---help---
  125. By default SPIFFS in some cases relies on the property of NOR flash
  126. that bits cannot be set from 0 to 1 by writing and that controllers
  127. will ignore such bit changes. This results in fewer reads as SPIFFS
  128. can in some cases perform blind writes, with all bits set to 1 and
  129. only those it needs reset set to 0. Most of the chips and
  130. controllers allow this behavior, so the default is to use this
  131. technique. If your controller is one of the rare ones that don't,
  132. turn this option on and SPIFFS will perform a read-modify-write
  133. instead.
  134. config SPIFFS_PAGE_CHECK
  135. bool "Check Page Headers"
  136. default y
  137. ---help---
  138. Always check header of each accessed page to ensure consistent state.
  139. If enabled it will increase number of reads, will increase flash.
  140. config SPIFFS_NAME_MAX
  141. int "Maximum Name Length"
  142. default 32
  143. ---help---
  144. Object name maximum length. Note that this length include the zero
  145. termination character, meaning maximum string of characters.
  146. config SPIFFS_COPYBUF_STACK
  147. int "Max Stack Allocation"
  148. default 64
  149. ---help---
  150. Size of buffer allocated on stack used when copying data. Lower
  151. value generates more read/writes. No meaning having it bigger
  152. than logical page size.
  153. endif # FS_SPIFFS