CONFIG_FS_LITTLEFS_FC_HEAP_SIZE

Enable flexible file cache sizes for littlefs

Type: int

Help

littlefs requires a per-file buffer to cache data.

When applications customize littlefs configurations and support
different cache sizes for different partitions this preallocation is
inadequate as an application might require a small number of files
using a large cache size and a larger number of files using a
smaller cache size.  In that case application should provide a
positive value for the heap size.  Be aware that there is a
per-allocation overhead that affects how much usable space is
present in the heap.

If this option is set to a non-positive value the heap is sized to
support up to FS_LITTLE_FS_NUM_FILES blocks of
FS_LITTLEFS_CACHE_SIZE bytes.

Direct dependencies

FILE_SYSTEM_LITTLEFS && FILE_SYSTEM

(Includes any dependencies from ifs and menus.)

Default

  • 0

Kconfig definition

At <Zephyr>/subsys/fs/Kconfig.littlefs:73

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:44<Zephyr>/subsys/Kconfig:25<Zephyr>/subsys/fs/Kconfig:61

Menu path: (Top) → Sub Systems and OS Services → File Systems → File system support → LittleFS support

config FS_LITTLEFS_FC_HEAP_SIZE
    int "Enable flexible file cache sizes for littlefs"
    default 0
    depends on FILE_SYSTEM_LITTLEFS && FILE_SYSTEM
    help
      littlefs requires a per-file buffer to cache data.

      When applications customize littlefs configurations and support
      different cache sizes for different partitions this preallocation is
      inadequate as an application might require a small number of files
      using a large cache size and a larger number of files using a
      smaller cache size.  In that case application should provide a
      positive value for the heap size.  Be aware that there is a
      per-allocation overhead that affects how much usable space is
      present in the heap.

      If this option is set to a non-positive value the heap is sized to
      support up to FS_LITTLE_FS_NUM_FILES blocks of
      FS_LITTLEFS_CACHE_SIZE bytes.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)