Skip to content

oofatfs: Allow fat32 mkfs to be compiled out. optimize rainbowio & enable everywhere #5578

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

Merged
merged 9 commits into from
Nov 15, 2021

Conversation

jepler
Copy link

@jepler jepler commented Nov 12, 2021

The only storage you can format in CircuitPython is the built in flash, and we don't ship any devices which are so big that fat32 is required. So, save space by compiling it out by default. Seemed to save 508 bytes on Trinket M0, 512 bytes on Clue.

Testing performed: that storage.erase_filesystem() on a Clue created a fresh filesystem usable by Linux & CircuitPython.

Then I made it possible to test rainbowio and optimized it for size, saving about 88 bytes of flash storage without changing functionality. (this wasn't strictly necessary, as the above change gave us more than enough space back)

Finally, I enabled rainbowio on the few boards that lacked it before.

@tannewt
Copy link
Member

tannewt commented Nov 13, 2021

You'll want to leave FAT32 in for anything that should support SD cards as well.

@jepler
Copy link
Author

jepler commented Nov 13, 2021

This does not disable accessing fat32 filesystems. It disables formatting them. If we have a device with built in flash (or, like the raspberry pi / broadcom port, an SD card that might need FAT32) we can enable that with a preprocessor define.

@tannewt tannewt self-requested a review November 15, 2021 18:50
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you! I will enable it on my upcoming broadcom PR.

@tannewt tannewt merged commit ba2f32e into adafruit:main Nov 15, 2021
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