Skip to content

Increase file system size on V2 #226

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

Open
kevinjwalters opened this issue Feb 26, 2025 · 3 comments
Open

Increase file system size on V2 #226

kevinjwalters opened this issue Feb 26, 2025 · 3 comments

Comments

@kevinjwalters
Copy link

The flash storage increased from 256 on the V1 to 512KB on the V2. The file system still appears to be limited to "there is approximately 30k of storage available" according to https://microbit-micropython.readthedocs.io/en/latest/tutorials/storage.html.

I ran out of space for wav files for a previous project. I'm now running out of space for code with the double whammy of not being able to use mpy (bbcmicrobit/micropython#524).

@kevinjwalters
Copy link
Author

For anyone else facing code size issues, I have found that pyminify from https://pypi.org/project/python-minifier/ helps.

@microbit-carlos
Copy link
Contributor

Thanks for the request @kevinjwalters!
Yeah, we should consider adding a compile time flag to expand the fs to all the flash left available. That way advance users can easily compile MicroPython and take advantage of the extra space.

That being said, in V2 we also include the Nordic SoftDevice and bootloader, so that adds an extra 150-ish KBs. Between that and the additional features the last time I checked the max fs size possible was around 60 Kbs, but I might be wrong about that figure.

@kevinjwalters
Copy link
Author

A compile option is useful for a minority but won't be of much use to a typical MicroPython programmer. I'd still like this to be increased in size on the V2. Perhaps a compromiste value that's viable in the long-term can be chosen based on the roadmap and guestimate on bloat and additions over time of libraries, SoftDevice and bootloader? As part of the increase in interpreter code size, mpy support would be great, at least for code in the file system.

A documentation update with accurate values for V1 and V2 would be useful too.

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

No branches or pull requests

2 participants