Skip to content
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

Virtual filesystem support broken on baremetal targets #3460

Open
bgould opened this issue Feb 18, 2023 · 7 comments
Open

Virtual filesystem support broken on baremetal targets #3460

bgould opened this issue Feb 18, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@bgould
Copy link
Member

bgould commented Feb 18, 2023

As best I can tell, virtual filesystem support on baremetal targets was effectively removed by a680bfb

NewFile in src/os/file_other.go always returns a stdioFileHandle now (a680bfb#diff-639e6d3c80d353b492953bcbd0b3eec979e6c88a776684acd1ac961b6217e24eR36) and should be refactored to delegate a mounted virtual filesystem if it exists.

@bgould bgould self-assigned this Feb 18, 2023
@deadprogram
Copy link
Member

Now that we have all these processors with flash support, I think I am feeling the pain of this issue.

Connected to /dev/ttyACM0. Press Ctrl-C to exit.
SPI Configured. Reading flash info
==> lsblk

-------------------------------------
 Device Information:  
-------------------------------------
 flash data start: 08015800
 flash data end:  08040000
-------------------------------------

==> format
Successfully formatted LittleFS filesystem.

==> ls
Could not open directory /: littlefs: Corrupted

@deadprogram
Copy link
Member

What can I do to help resolve this @bgould ?

@deadprogram deadprogram added the bug Something isn't working label Mar 25, 2023
@deadprogram
Copy link
Member

@bgould I think I need some help to understand how to fix this, if you please.

@deadprogram
Copy link
Member

LittleFS filesystem is working with onboard flash using the latest dev branches of both TinyGo and TinyFS.

@deadprogram
Copy link
Member

However, FAT filesystem is still broken, which was perhaps not clear from my previous comment.

@deadprogram
Copy link
Member

@bgould I need your help to figure out what to fix, and where. 😿

How is it possible that LittleFS is still working but FatFS not? I am very confused.

@soypat
Copy link
Contributor

soypat commented Jan 18, 2024

@deadprogram @bgould Heads up to both of y'all, I'm writing a FatFS port in pure Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants