Re:A little fail-safe filesystem designed for microcontrolle...
by scoutt on Friday January 25, 2019 @10:52AM
(#18998960)
I had the same reaction. Really impressive and well documented. I will surely do some tests.
> variables, constants, and functions are well-prefixed (without being too verbose) to avoid collisions.
Unfortunately it has the same name (Little File System, LFS) and the same function prototypes (lfs_*) of a filesystem for NOR/NAND based systems I did like 10 years ago and still in use, so it will be at least confusing.
As a matter of fact, I guess every embedded technology company using NAND/NOR/whatever memories have their own version of a LFS.
* zero dependencies, no assumptions about libc, doesn't use timers or heap, fully synchronous, and it's passive when you're not interacting with it.
* variables, constants, and functions are well-prefixed (without being too verbose) to avoid collisions.
* BSD license is friendly for single-binary firmwares.
* the Makefile doesn't assume anything, it just outputs a .a file which you can link however you want.
* the Makefile is simple and doesn't require cmake or autotools. it's easy to point it at your cross-compile toolchain.
it has other hallmarks of a well-planned and well-maintained project too:
* the readme shows exactly why i might want this (or might not), and how to use it. the separate design doc shows exactly how it works.
* functionality is cleanly separated by file.
* consistent style (could specify which style guide they're using, though).
* the tests serve their usual purpose but also serve as examples. they're well encapsulated and the code was obviously written to be tested.
these authors have absolutely nailed everything i strive for at my embedded firmware development job.