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

SD card formatting tool #282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iandinwoodie
Copy link

Overview

This patch adds an SD card formatting tool (SDFmt) that formats the currently inserted SD card using the ESP32 Arduino framework's SD card library.

Rationale

I had recently ordered some 256MB SD cards (Class 4) to use with the CYD. The CYD was unable to utilize the SD card and produced the following error:

[    46][E][sd_diskio.cpp:806] sdcard_mount(): f_mount failed: (13) There is no valid FAT volume

I attempted to remedy the situation by formatting the card with the following tools:

  • Windows Disk Management
  • macOS Disk Utility
  • SD Association SD Card Formatter

Regardless, the card continued to fail to mount with the no valid FAT volume error message. However, I was able to remedy the situation using the format_if_empty flag of the SDFS::begin method. The caveat of this solution is that the resulting formatted card can be utilized by the CYD, but none of the other platforms recognize it as a valid format.

I think this is a worthwhile addition to the CYD collection for users seeking out smaller capacity SD cards that may run into the same scenario.

@iandinwoodie
Copy link
Author

Also, please let me know if you would like the project moved to a different location. I added it to a new top-level Tools directory because it is not necessarily an example and I wasn't sure of a better location for it.

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.

1 participant