InfiniTimeOrg / InfiniTimeOrg/InfiniTime

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

Open
#2,197 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement external flash maintenance
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the LVGL file-system adapter, LittleFS integration, and watchface resource-loading path. Compare the proposed per-watchface copy approach with an intermediate cache, then define which files are copied, where they reside in internal flash, and how they are invalidated. Done means the selected watchface loads its resources from internal flash without breaking other watchfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.