forked from joltwallet/esp_littlefs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kconfig
146 lines (125 loc) · 5.62 KB
/
Kconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
menu "LittleFS"
config LITTLEFS_MAX_PARTITIONS
int "Maximum Number of Partitions"
default 3
range 1 10
help
Define maximum number of partitions that can be mounted.
config LITTLEFS_PAGE_SIZE
int "LITTLEFS logical page size"
default 256
range 256 1024
help
Logical page size of LITTLEFS partition, in bytes. Must be multiple
of flash page size (which is usually 256 bytes).
Larger page sizes reduce overhead when storing large files, and
improve filesystem performance when reading large files.
Smaller page sizes reduce overhead when storing small (< page size)
files.
config LITTLEFS_OBJ_NAME_LEN
int "Maximum object name length including NULL terminator."
default 64
range 16 1024
help
Includes NULL-terminator.
config LITTLEFS_READ_SIZE
int "Minimum size of a block read."
default 128
help
Minimum size of a block read. All read operations will be a
multiple of this value.
config LITTLEFS_WRITE_SIZE
int "Minimum size of a block write."
default 128
help
Minimum size of a block program. All write operations will be a
multiple of this value.
config LITTLEFS_LOOKAHEAD_SIZE
int "Look ahead size."
default 128
help
Look ahead size. Must be a multiple of 8.
config LITTLEFS_CACHE_SIZE
int "Cache Size"
default 512
help
Size of block caches. 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. Larger caches can improve performance by storing more
data and reducing the number of disk accesses. Must be a multiple of
the read and program sizes, and a factor of the block size (4096).
config LITTLEFS_BLOCK_CYCLES
int "LittleFS wear-leveling block cycles"
default 512
range -1 1024
help
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.
config LITTLEFS_USE_MTIME
bool "Save file modification time"
default "y"
help
Saves timestamp on modification. Uses an additional 4bytes.
config LITTLEFS_USE_ONLY_HASH
bool "Don't store filepath in the file descriptor"
default "n"
help
Records the filepath only as a 32-bit hash in the file descriptor instead
of the entire filepath. Saves approximately `sizeof(filepath)` bytes
per file descriptor.
If enabled, functionality (like fstat) that requires the file path
from the file descriptor will not work.
In rare cases, may cause unlinking or renaming issues (unlikely) if
there's a hash collision between an open filepath and a filepath
to be modified.
config LITTLEFS_HUMAN_READABLE
bool "Make errno human-readable"
default "n"
help
Converts LittleFS error codes into human readable strings.
May increase binary size depending on logging level.
choice LITTLEFS_MTIME
prompt "mtime attribute options"
depends on LITTLEFS_USE_MTIME
default LITTLEFS_MTIME_USE_SECONDS
help
Save an additional 4-byte attribute. Options listed below.
config LITTLEFS_MTIME_USE_SECONDS
bool "Use Seconds"
help
Saves timestamp on modification.
config LITTLEFS_MTIME_USE_NONCE
bool "Use Nonce"
help
Saves nonce on modification; intended for detecting filechanges
on systems without access to a RTC.
A file who's nonce is the same as it was at a previous time has
high probability of not having been modified.
Upon file modification, the nonce is incremented by one. Upon file
creation, a random nonce is assigned.
There is a very slim chance that a file will have the same nonce if
it is deleted and created again (approx 1 in 4 billion).
endchoice
config LITTLEFS_SPIFFS_COMPAT
bool "Improve SPIFFS drop-in compatability"
default "n"
help
Enabling this feature allows for greater drop-in compatability
when replacing SPIFFS. Since SPIFFS doesn't have folders, and
folders are just considered as part of a file name, enabling this
will automatically create folders as necessary to create a file
instead of throwing an error. Similarly, upon the deletion of the
last file in a folder, the folder will be deleted. It is recommended
to only enable this flag as a stop-gap solution.
config LITTLEFS_FLUSH_FILE_EVERY_WRITE
bool "Flush file to flash after each write operation"
default "n"
help
Enabling this feature extends SPIFFS capability.
In SPIFFS data is written immediately to the flash storage when fflush() function called.
In LittleFS flush() does not write data to the flash, and fsync() call needed after.
With this feature fflush() will write data to the storage.
endmenu