You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-27
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## mbed wrapper for the [little filesystem](https://github.com/geky/littlefs)
1
+
## mbed wrapper for the little filesystem
2
2
3
3
This is the mbed wrapper for [littlefs](https://github.com/geky/littlefs),
4
4
a little fail-safe filesystem designed for embedded systems.
@@ -12,34 +12,17 @@ a little fail-safe filesystem designed for embedded systems.
12
12
| | |
13
13
```
14
14
15
-
The littlefs comes with the following features:
15
+
**Bounded RAM/ROM** - The littlefs is designed to work with a limited amount
16
+
of memory. Recursion is avoided and dynamic memory is limited to configurable
17
+
buffers that can be provided statically.
16
18
17
-
-**Power-loss resilient** - The littlefs is designed to handle random power
18
-
failures and has strong copy-on-write guaruntees. During all filesystem
19
-
operations, the storage on disk is always kept in a valid state. When
20
-
updating a file, the original file will remain unmodified until the file is
21
-
closed, or sync is called.
19
+
**Power-loss resilient** - The littlefs is designed for systems that may have
20
+
random power failures. The littlefs has strong copy-on-write guaruntees and
21
+
storage on disk is always kept in a valid state.
22
22
23
-
-**Error detection** - While the littlefs does not implement static wear
24
-
leveling, the littlefs detects write error and uses a limited form of dynamic
25
-
wear leveling to work around blocks that go bad during the lifetime of the
26
-
filesystem.
27
-
28
-
-**Low RAM/ROM usage** - The littlefs is designed to work in a limited amount
29
-
of memory, recursion is avoided, and dynamic memory is limited to
30
-
configurable buffers that can be provided statically.
31
-
32
-
The littlefs also comes with the following limitations:
33
-
34
-
-**Not portable to host OSs** - While the littlefs can use an SD card, no
35
-
littlefs driver has been ported to host OSs such as Linux or Windows. If
36
-
you need to support host OSs consider using the [FATFileSystem](https://github.com/ARMmbed/mbed-os/blob/mbed-os-5.5/features/filesystem/fat/FATFileSystem.h)
37
-
found in mbed OS.
38
-
39
-
-**No static wear leveling** - While the littlefs does extend the lifetime
40
-
of storage through a form of dynamic wear leveling, the littlefs does not
41
-
evict static blocks. If you need to maximize the longevity of the underlying
42
-
storage consider using the [SPIFFileSystem](https://github.com/armmbed/mbed-spiffs).
23
+
**Wear leveling** - Since the most common form of embedded storage is erodible
24
+
flash memories, littlefs provides a form of dynamic wear leveling for systems
25
+
that can not fit a full flash translation layer.
43
26
44
27
## Usage
45
28
@@ -95,3 +78,27 @@ int main() {
95
78
printf("boot_count: %ld\n", boot_count);
96
79
}
97
80
```
81
+
82
+
## Reference material
83
+
84
+
[DESIGN.md](littlefs/DESIGN.md) - DESIGN.md contains a fully detailed dive into
85
+
how littlefs actually works. I would encourage you to read it since the
86
+
solutions and tradeoffs at work here are quite interesting.
87
+
88
+
[SPEC.md](littlefs/SPEC.md) - SPEC.md contains the on-disk specification of
89
+
littlefs with all the nitty-gritty details. Can be useful for developing
90
+
tooling.
91
+
92
+
## Related projects
93
+
94
+
[littlefs](https://github.com/geky/littlefs) - Where the core of littlefs
95
+
currently lives.
96
+
97
+
[littlefs-fuse](https://github.com/geky/littlefs-fuse) - A [FUSE](https://github.com/libfuse/libfuse)
98
+
wrapper for littlefs. The project allows you to mount littlefs directly in a
99
+
Linux machine. Can be useful for debugging littlefs if you have an SD card
100
+
handy.
101
+
102
+
[littlefs-js](https://github.com/geky/littlefs-js) - A javascript wrapper for
103
+
littlefs. I'm not sure why you would want this, but it is handy for demos.
104
+
You can see it in action [here](http://littlefs.geky.net/demo.html).
0 commit comments