InfiniTimeOrg / InfiniTimeOrg/InfiniTime
(v)snprintf space optimisations
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
We can save about 1.5K flash by only including one (v)snprintf implementation. Currently both LVGL's and newlib-nano's are included. The newlib-nano implementation does not support 64 bit integers, so we can't replace the LVGL one with it (notably the calculator app PR depends on it which is slated to be merged soon, there may be other usages I'm not aware of). So as far as I'm aware we'd ideally want to link against the normal newlib (not nano) implementation (no clue how big this is), or use the LVGL one everywhere. I'd propose this in a PR but my CMake skills are nowhere near what's needed, so if anyone wants to give it a go have at it!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the CMake configuration and how LVGL, newlib-nano, and the normal newlib snprintf implementations are linked. Done means only one implementation is included, 64-bit integer support remains available, and the resulting flash usage is measured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system, embedded-iot
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100