2019-01-10 04:26:51 +08:00
|
|
|
config FS_LITTLEFS
|
|
|
|
bool "LITTLEFS File System"
|
|
|
|
default n
|
2019-01-28 02:31:28 +08:00
|
|
|
depends on !DISABLE_MOUNTPOINT
|
2019-01-10 04:26:51 +08:00
|
|
|
---help---
|
2021-08-12 15:17:01 +08:00
|
|
|
Build the LITTLEFS file system. https://github.com/littlefs-project/littlefs.
|
|
|
|
|
|
|
|
if FS_LITTLEFS
|
2023-02-13 16:55:46 +08:00
|
|
|
config FS_LITTLEFS_PROGRAM_SIZE_FACTOR
|
|
|
|
int "LITTLEFS Program size multiplication factor"
|
2021-08-12 15:17:01 +08:00
|
|
|
default 4
|
|
|
|
---help---
|
2023-02-13 16:55:46 +08:00
|
|
|
A factor used for multiplying program size.
|
|
|
|
|
|
|
|
The result is used as the minimum size of a block program in bytes.
|
|
|
|
All program operations will be a multiple of the result.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_READ_SIZE_FACTOR
|
|
|
|
int "LITTLEFS Read size multiplication factor"
|
|
|
|
default FS_LITTLEFS_PROGRAM_SIZE_FACTOR
|
|
|
|
---help---
|
|
|
|
A factor used for multiplying read size.
|
|
|
|
|
|
|
|
The result is used as the minimum size of a block read in bytes.
|
|
|
|
All read operations will be a multiple of the result.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_BLOCK_SIZE_FACTOR
|
|
|
|
int "LITTLEFS Block size multiplication factor"
|
|
|
|
default 1
|
|
|
|
---help---
|
|
|
|
A factor used for multiplying block size and dividing block count.
|
|
|
|
|
|
|
|
The result is size of an erasable block in bytes. This does not impact ram consumption
|
|
|
|
and may be larger than the physical erase size. However, non-inlined
|
|
|
|
files take up at minimum one block. Must be a multiple of the read and
|
|
|
|
program sizes.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_CACHE_SIZE_FACTOR
|
|
|
|
int "LITTLEFS Cache size multiplication factor"
|
|
|
|
default FS_LITTLEFS_READ_SIZE_FACTOR
|
|
|
|
---help---
|
|
|
|
A factor used for multiplying cache size.
|
|
|
|
|
|
|
|
The result is size of block caches in bytes.
|
|
|
|
Each cache buffers a portion of a block in RAM.
|
|
|
|
The littlefs needs a read cache, a program cache, and one additional
|
|
|
|
cache per file. A larger cache can improve performance by storing more
|
|
|
|
data and reducing the number of disk accesses. It must be a multiple of the
|
|
|
|
read and program sizes, and a factor of the block size.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_LOOKAHEAD_SIZE
|
|
|
|
int "LITTLEFS Lookahead size"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
Size of the lookahead buffer in bytes. A larger lookahead buffer
|
|
|
|
increases the number of blocks found during an allocation pass. The
|
|
|
|
lookahead buffer is stored as a compact bitmap, so each byte of RAM
|
|
|
|
can track 8 blocks. Must be a multiple of 8.
|
|
|
|
|
|
|
|
Set value 0 for enabling internal calculation.
|
|
|
|
|
2021-08-12 15:17:01 +08:00
|
|
|
config FS_LITTLEFS_BLOCK_CYCLE
|
2023-02-13 16:55:46 +08:00
|
|
|
int "LITTLEFS Block cycle"
|
2021-08-12 15:17:01 +08:00
|
|
|
default 200
|
|
|
|
---help---
|
2023-02-13 16:55:46 +08:00
|
|
|
Number of erase cycles before littlefs evicts metadata logs and moves
|
|
|
|
the metadata to another block. Suggested values are in the
|
|
|
|
range 100-1000, with large values having better performance at the cost
|
|
|
|
of less consistent wear distribution.
|
|
|
|
|
|
|
|
Set to -1 to disable block-level wear-leveling.
|
2022-12-01 20:28:38 +08:00
|
|
|
|
|
|
|
config FS_LITTLEFS_NAME_MAX
|
|
|
|
int "LITTLEFS LFS_NAME_MAX"
|
|
|
|
default NAME_MAX
|
|
|
|
---help---
|
|
|
|
Configure LFS_NAME_MAX value for LITTLEFS file systems.
|
|
|
|
|
|
|
|
Note: Using a larger value for this configuration makes the lfs_info
|
|
|
|
structure larger and thus increases the stack usage.
|
|
|
|
|
|
|
|
Note: To mount a LITTLEFS filesystem, this configuration should
|
|
|
|
equal to or larger than the corresponding on-disk parameter.
|
|
|
|
|
|
|
|
Note: Many of tools to generate LITTLEFS images use 255 for
|
|
|
|
this by default.
|
|
|
|
|
|
|
|
Note: NuttX releases prior to 10.4.0 (exclusive) uses 255
|
|
|
|
for this. If you need to mount LITTLEFS filesystems used by
|
|
|
|
previous versions of NuttX, it's safer to use 255.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_FILE_MAX
|
|
|
|
int "LITTLEFS LFS_FILE_MAX"
|
|
|
|
default 2147483647
|
|
|
|
---help---
|
|
|
|
Configure LFS_FILE_MAX value for LITTLEFS file systems.
|
|
|
|
|
|
|
|
Note: To mount a LITTLEFS filesystem, this configuration should
|
|
|
|
equal to or larger than the corresponding on-disk parameter.
|
|
|
|
|
|
|
|
Note: Many of tools to generate LITTLEFS images use 2147483647
|
|
|
|
for this by default.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_ATTR_MAX
|
|
|
|
int "LITTLEFS LFS_ATTR_MAX"
|
|
|
|
default 1022
|
|
|
|
---help---
|
|
|
|
Configure LFS_ATTR_MAX value for LITTLEFS file systems.
|
|
|
|
|
|
|
|
Note: To mount a LITTLEFS filesystem, this configuration should
|
|
|
|
equal to or larger than the corresponding on-disk parameter.
|
|
|
|
|
|
|
|
Note: because NuttX's LITTLEFS driver does never use custom attributes,
|
|
|
|
the value of this configuration doesn't matter much. The default value
|
|
|
|
here is chosen to be compatible with filesystems created by external
|
|
|
|
tools. Unlike LFS_NAME_MAX, a large LFS_ATTR_MAX value doesn't
|
|
|
|
have any runtime overhead, at least with the implementation as of
|
|
|
|
writing this.
|
|
|
|
|
|
|
|
Note: Many of tools to generate LITTLEFS images use 1022
|
|
|
|
for this by default.
|
2024-11-18 23:02:53 +08:00
|
|
|
|
2024-11-26 19:21:33 +08:00
|
|
|
config FS_LITTLEFS_LOCAL_PATCHES
|
|
|
|
bool
|
|
|
|
depends on FS_LITTLEFS_VERSION = "v2.5.1"
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
For the internal use to control the application of NuttX local
|
|
|
|
patches for LITTLEFS.
|
|
|
|
This is NOT expected to be tweaked directly by users.
|
|
|
|
|
2024-12-12 13:48:55 +08:00
|
|
|
config FS_LITTLEFS_HAS_LFS_DEFINES
|
|
|
|
bool "Use LFS_DEFINES (available for littlefs >=2.10.0)"
|
|
|
|
depends on !FS_LITTLEFS_LOCAL_PATCHES
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Set this y if you are using littlefs versions which supports
|
|
|
|
LFS_DEFINES. (that is, 2.10.0 and later)
|
|
|
|
Otherwise, set this n.
|
|
|
|
|
|
|
|
See the littlefs 2.10.0 release notes about what LFS_DEFINES is.
|
|
|
|
https://github.com/littlefs-project/littlefs/releases/tag/v2.10.0
|
|
|
|
|
2024-11-18 23:02:53 +08:00
|
|
|
config FS_LITTLEFS_ATTR_UPDATE
|
|
|
|
bool "LITTLEFS update attributes"
|
|
|
|
depends on FS_LITTLEFS_ATTR_MAX > 0
|
2024-11-26 19:21:33 +08:00
|
|
|
depends on FS_LITTLEFS_LOCAL_PATCHES
|
2024-11-18 23:02:53 +08:00
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Enable support for attributes when create a file.
|
|
|
|
|
2024-11-26 19:21:33 +08:00
|
|
|
CAVEAT: This feature is implemented with NuttX specific
|
|
|
|
modifications to LITTLEFS v2.5.1. The modifications might
|
|
|
|
not be compatible with other versions of LITTLEFS.
|
|
|
|
|
|
|
|
config FS_LITTLEFS_GETPATH
|
|
|
|
bool "LITTLEFS FIOC_FILEPATH ioctl support"
|
|
|
|
depends on FS_LITTLEFS_LOCAL_PATCHES
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
FIOC_FILEPATH ioctl support for LITTLEFS file system.
|
|
|
|
|
|
|
|
CAVEAT: This feature is implemented with NuttX specific
|
|
|
|
modifications to LITTLEFS v2.5.1. The modifications might
|
|
|
|
not be compatible with other versions of LITTLEFS.
|
|
|
|
|
2024-11-22 15:22:28 +08:00
|
|
|
config FS_LITTLEFS_VERSION
|
|
|
|
string "LITTLEFS version to use"
|
2024-11-25 22:38:39 +08:00
|
|
|
default "v2.5.1"
|
2024-11-22 15:22:28 +08:00
|
|
|
---help---
|
|
|
|
The LITTLEFS version to use.
|
|
|
|
|
2024-11-26 15:41:02 +08:00
|
|
|
config FS_LITTLEFS_MULTI_VERSION
|
|
|
|
bool "Support multiple on-disk versions"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enable LFS_MULTIVERSION for LITTLEFS file system
|
|
|
|
|
|
|
|
config FS_LITTLEFS_DISK_VERSION
|
|
|
|
hex "LITTLEFS on-disk version"
|
|
|
|
default 0x0
|
|
|
|
depends on FS_LITTLEFS_MULTI_VERSION
|
|
|
|
---help---
|
|
|
|
The LITTLEFS disk version to use.
|
|
|
|
|
|
|
|
0 means to leave it to the default from the LITTLEFS.
|
|
|
|
0x00020000 means 2.0.
|
|
|
|
0x00020001 means 2.1.
|
|
|
|
|
2021-08-12 15:17:01 +08:00
|
|
|
endif
|