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

Support for LittleFS #498

Merged
merged 4 commits into from
Oct 11, 2024
Merged

Support for LittleFS #498

merged 4 commits into from
Oct 11, 2024

Conversation

ivmarkov
Copy link
Collaborator

This is the last filesystem of the three supported on the ESP-IDF via the VFS API.

Similarly to our OneWire support and mDNS support, it uses an external component from the ESP-IDF Manager.

While the component is not in the Espressif namespace, apparently it is considered stable enough and supported enough to be used, given that the official ESP IDF docu directly documents it.

  • W.r.t. NOR flash, this seems to be the recommended choice given that Spiffs is not supported anymore, and FATFS is unreliable on power loss (modulo NVS of course)
  • W.r.t. SD cards, it does support those, with the caveat that a max of 4GB from the SD card can be used, as everything in LittleFs seems to be limited to 32bits. :-)

@ivmarkov ivmarkov marked this pull request as ready for review October 10, 2024 13:25
src/io.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@Vollbrecht Vollbrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, looks good overall.

I have just two small questions though

I assume it should also work if we use the SdMmcHostDriver on targets that support it? Should we than maybe add a comment in the example so people notice that there is a option here as we don't promote it in any of the examples?

Should we maybe group all FS related examples in there own directory so its simpler to find them since slowly the number of example grows?

@ivmarkov
Copy link
Collaborator Author

Nice work, looks good overall.

I have just two small questions though

I assume it should also work if we use the SdMmcHostDriver on targets that support it? Should we than maybe add a comment in the example so people notice that there is a option here as we don't promote it in any of the examples?

Yes it should be well possible. (Too lazy to test that, but the API is anyway identical as the difference is only in how the SdCard driver is instantiated. And - FATFS was tested with both SPI and SDMMC).

Should we maybe group all FS related examples in there own directory so its simpler to find them since slowly the number of example grows?

Let's postpone for another time?
If we do this grouping, we should rather do it everywhere, i.e. for the "wifi", "http server", http client", "thread", all examples in the "hal" and so on. Perhaps we can do it once/if the examples have their own Cargo.toml and sdkconfig.defaults conf.

@ivmarkov ivmarkov merged commit 87f77b6 into master Oct 11, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants