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

Copy in-use resources from SPI flash to built-in flash #2197

Open
pipe01 opened this issue Dec 10, 2024 · 1 comment
Open

Copy in-use resources from SPI flash to built-in flash #2197

pipe01 opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement Enhancement to an existing app/feature external flash maintenance Background work

Comments

@pipe01
Copy link
Contributor

pipe01 commented Dec 10, 2024

Since reading files from the SPI flash is very slow we could copy the files that the current watchface needs into the internal flash, then use them from there instead of the flash. This could be implemented as an LVGL file system, although I don't think we need to use LittleFS and could instead use a trivial flat file system structure.

For example, when the casio watchface is selected the three font files it uses will be copied into the internal flash, and when the watchface is shown it will load the files from there much quicker.

Alternatively, we could implement a sort of caching LVGL file system that sits in between the LittleFS file system and the LVGL adapter that caches some files in the internal flash, but that might be trickier due to fragmentation.

@mark9064
Copy link
Member

I've thought about this a bit too. The one thing I'm worried about is the durability of the inbuilt flash, which is only rated for 10K cycles. So I think we'd want to avoid a cache setup where resources get swapped in and out often. An architecture that copies in watchface files on watchface change could be good though I think, watchface is not changed often.

@mark9064 mark9064 added enhancement Enhancement to an existing app/feature external flash maintenance Background work labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing app/feature external flash maintenance Background work
Projects
None yet
Development

No branches or pull requests

2 participants