Littlefs – A little fail-safe filesystem designed for microcontrollers
github.com
github.com
I run an afl-base fuzzer against it back in 2020, and found a bunch of issues leading to assert failures in the code. I wasn't even checking data integrity. The tickets are still open (and it wasn't obvious to me how to fix them).
Spiffs is another micro controller file system, but it also fails fuzzing tests very rapidly with various failures. Spiffs seems less maintained than littlefs.
Are there any other good, reliable, freely licensed, microcontroller file systems suitable for small flash parts?
Power failure is a tough problem in embedded file systems (aka--too small for Linux).
Effectively--you need to be "append-only with checksums at checkpoints".
Every one of those words is anathema to making your flash small and cheap.
And even leaving the MP1 aside, the STM32H7 micro controller has a ARM Cortex-M7 core which runs up to 550MHz.
IBM 300PL by any chance?
Mine (256MB, 8GB) ran Windows 98, and (record scratch) a copy of Visual Basic 1.0 that I'd stumbled on an abandonware copy of while attempting to figure the internet out at the local library. lol
Then there was the the 486 with 4MB RAM and 8MB free disk that I was playing with just a year earlier (yep - 2005). And the 800MHz AMD Duron w/ 320MB RAM I used between 2012-2014. And now there's a 2004-era Pentium 4 in the corner here that I'm currently running ddrescue on to try and shoo away ~300KB of unhappy disk sectors. What can I say... work-blocking health issues guarantees life will be InTeReStInG haha
Still playing catchup to equilibrium, and taking longer than I'd like because where it matters I annoyingly go a little slower than everyone else (huff).
I'm almost certain you were probably doing something slightly more interesting on your PIII...? Delphi, maybe, or perhaps a newer (interestinger) version of VB? Or maybe a super-lightweight Linux setup and Vim?
(Oh now that reminds me of the old Toshiba laptop I found on the side of the road with a ~300MHz K6-2 and (IIRC) 32MB RAM in it... hibernation worked so well on that thing it's how I would typically boot into Slackware on it (4 second resume time on a 20 year old laptop?!?! yes please!). Sadly my install CD was a bit scratched so the only things that really worked were bash, grep and sed... which I attempted to write a package manager for Slackware in. I got halfway there too, but had to quit because the 15-line regexes I was writing were giving me a headache. However, to this day I have zero issue with regular expressions up to sed's level of complexity. I do badly need to go back and revisit the subject though.)
I got free ram upgrades and used it to play free games (tons of time in Wolf ET) and learn programming.
Tried a bunch of OSes after that. Eventually I got a free 1ghz PIII and mobo which was a nice upgrade that lasted until late 2007 when I built a Core2Duo machine.
Hope you get well soon.
Very cool.
I only knew about Knoppix at that point, which being a LiveCD didn't quite like 128MB RAM (just realized that's how much RAM my PIII had too, huh). Properly switched to Linux (cold-turkey :D) around 2007, and my focus on programming took a giant nosedive as I discovered the internet. Upgraded from Pentiums/Celerons to an i3 a friend gave me in 2012 IIRC. Still figuring out how to juggle the internet and focusing on programming lol
I'm not "sick" per se, it's really just the whole head-exploding dumpster fire that is government support around mental health and "I really cannot jump this curb *points* so what do I do now?" et al. It's just a matter of time, fingers crossed things get figured out before I'm like 35 or 40... hmph
Copyright (c) 2017, Arm Limited. All rights reserved.
so this is from Arm? That is not so clearly communicated, but perhaps given the license (standard BSD 3-Clause) I guess it doesn't really matter. Might be politically sensitive in some organizations, but perhaps I'm just being a cynic.Looks really nice, and stuff like this is seriously useful and can really make engineering on embedded platforms way easier.
I'm writing Embedsys Weekly newsletter and so I have listed littlefs project for the next issue. Do you think you can eventually share to the reader your experience in few words? If you feel good with the idea, my email is embedsys@embedsysweekly.com
I just proposed the exact same thing to a sibling commenter. I plan to add Littlefs to the next issue of Embedsys Weekly. If you feel confortable to share your experience with my readers on 3/4 sentences it would be fantastic.
For example, a Raspberry Pi Pico is $4 and has 2MB. There are many other nice options from Adafruit or Teensy.
I see that the Uno R3 is a popular product on Amazon but I don't really get the appeal.
The design of littlefs: A fail-safe filesystem designed for microcontrollers - https://news.ycombinator.com/item?id=20845112 - Aug 2019 (72 comments)
A little fail-safe filesystem designed for microcontrollers (2017) - https://news.ycombinator.com/item?id=18989705 - Jan 2019 (30 comments)
That could mean file systems are hard to create, or that this particular one is buggy.
https://danuker.go.ro/frequency-of-bugfix-commits.html
Edit: looks like it's a problem with other file systems also:
https://github.com/pellepl/spiffs - 40.2%
https://github.com/tytso/e2fsprogs - 36.8%
But a reimplementation of exFAT is not as buggy: https://github.com/relan/exfat - 19.4%
That's not surprising, because the FAT family is relatively simple for a filesystem. As a result, you can easily get read-only support done almost right the first time, and writing is only slightly more difficult.
Sorry, as a commenter on this pointed out, the comment I was replying to was probably talking about eMMC. For which indeed no wear levelling is specified by the JEDEC standard - it is a standard that defines the communication protocol between a device and a host system. Newer JEDEC standards define the interface to access vendor specific "health reports", the actual method of wear levelling isn't regularly disclosed by vendors.
If anyone is looking for a FAT file system (ie for an SD card or for making a USB mass storage device) fatfs is still a great option.
Personally I would be reluctant to use FATFS as a writable filesystem on a commercial embedded device.
The prime majority of SDKs from chip vendors still use much older Freertos ports which were under GPL
RelianceFS is GPL as well
* Typo fix