-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FatFS not working #15
Comments
I was able to confirm the above behavior (seemingly corrupted filesystem after formatting) using external SPI flash memory as well. Incidentally, if I flash Circuit Python onto the board and let it create its default files, I can mount the filesystem and read the files successfully:
|
I think it is possible that this never actually worked properly ... When first added, the FATFS_READONLY flag was set to be read-only: 0610c74#diff-617510d59fc788cf34e3af911f36ff1ccc2b0478a9c2b9f440a5f1c18a838654R15 Read-write was enabled when the sdcard driver was developed - - but the necessary enhancements for FatFS to work properly on flash devices is st
In both of those cases, format operations using the library maybe was never tested, if the filesystems were created on some other system first. I'm thinking that a few improvements might be needed here
|
Great research @bgould thank you very much for all this info. I was looking in all the wrong places.
That is very confusing. We are better off documenting this and offering a read-only mode for experts, but defaulting to r/w.
Not surprising. I learned a bit about how this is harder than it first looks when trying to implement
Yes please!
also yes please and thank you! |
There is definitely a bug or something with Format operation, even this is failing in full-sized Go, and I know this used to be working. Continuing to investigate
|
Turns out that the simple-fatfs example needed updating with a call to the
|
FYI Created an idiomatic FAT filesystem library in pure Go over here: https://github.com/soypat/fat. Be great to get some testing in with it to see if we can replace these pesky CGo libraries! |
The FatFS is not working correctly, apparently ever since tinygo-org/tinygo#3460
The text was updated successfully, but these errors were encountered: