InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.63k stars 902 forks source link

(v)snprintf space optimisations #1986

Open mark9064 opened 5 months ago

mark9064 commented 5 months ago

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!