Kconfig.littlefs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Copyright (c) 2019 Bolt Innovation Management, LLC
  2. # Copyright (c) 2019 Peter Bigot Consulting, LLC
  3. # Copyright (c) 2020 Nordic Semiconductor ASA
  4. # SPDX-License-Identifier: Apache-2.0
  5. config FILE_SYSTEM_LITTLEFS
  6. bool "LittleFS support"
  7. depends on FILE_SYSTEM
  8. depends on FLASH
  9. help
  10. Enables LittleFS file system support.
  11. if FILE_SYSTEM_LITTLEFS
  12. menu "LittleFS Settings"
  13. visible if FILE_SYSTEM_LITTLEFS
  14. config FS_LITTLEFS_NUM_FILES
  15. int "Maximum number of opened files"
  16. default 4
  17. help
  18. This is a global maximum across all mounted littlefs filesystems.
  19. config FS_LITTLEFS_NUM_DIRS
  20. int "Maximum number of opened directories"
  21. default 4
  22. help
  23. This is a global maximum across all mounted littlefs filesystems.
  24. config FS_LITTLEFS_READ_SIZE
  25. int "Minimum size of a block read"
  26. default 16
  27. help
  28. All read operations will be a multiple of this value.
  29. config FS_LITTLEFS_PROG_SIZE
  30. int "Minimum size of a block program"
  31. default 16
  32. help
  33. All program operations will be a multiple of this value.
  34. config FS_LITTLEFS_CACHE_SIZE
  35. int "Size of block caches in bytes"
  36. default 64
  37. help
  38. Each cache buffers a portion of a block in RAM. The littlefs
  39. needs a read cache, a program cache, and one additional cache
  40. per file. Larger caches can improve performance by storing
  41. more data and reducing the number of disk accesses. Must be a
  42. multiple of the read and program sizes of the underlying flash
  43. device, and a factor of the block size.
  44. config FS_LITTLEFS_LOOKAHEAD_SIZE
  45. int "Size of lookahead buffer in bytes"
  46. default 32
  47. help
  48. A larger lookahead buffer increases the number of blocks found
  49. during an allocation pass. The lookahead buffer is stored as a
  50. compact bitmap, so each byte of RAM can track 8 blocks. Must
  51. be a multiple of 8.
  52. config FS_LITTLEFS_BLOCK_CYCLES
  53. int "Number of erase cycles before moving data to another block"
  54. default 512
  55. help
  56. For dynamic wear leveling, the number of erase cycles before data
  57. is moved to another block. Set to a non-positive value to
  58. disable leveling.
  59. config FS_LITTLEFS_BLOCK_SIZE
  60. int "Size of an erasable block"
  61. default 4096
  62. help
  63. Must be a multiple of the read and program sizes.
  64. endmenu
  65. config FS_LITTLEFS_FC_HEAP_SIZE
  66. int "Enable flexible file cache sizes for littlefs"
  67. default 0
  68. help
  69. littlefs requires a per-file buffer to cache data.
  70. When applications customize littlefs configurations and support
  71. different cache sizes for different partitions this preallocation is
  72. inadequate as an application might require a small number of files
  73. using a large cache size and a larger number of files using a
  74. smaller cache size. In that case application should provide a
  75. positive value for the heap size. Be aware that there is a
  76. per-allocation overhead that affects how much usable space is
  77. present in the heap.
  78. If this option is set to a non-positive value the heap is sized to
  79. support up to FS_LITTLE_FS_NUM_FILES blocks of
  80. FS_LITTLEFS_CACHE_SIZE bytes.
  81. endif # FILE_SYSTEM_LITTLEFS