InfiniTimeOrg / InfiniTime

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

Watch face selection at build time #1926

Closed JF002 closed 6 months ago

JF002 commented 6 months ago

This PR allows to select which watch faces will be built into the firmware at build time. This is done in a similar way than in #1894 : a list of watch face descriptions is generated at build time (using constexpr / consteval and template meta programming). This list is then used at run time to build the setting menu and to load the watchface when requested by the user.

Using this PR together with #1894 (which is already merged), it is now possible to build a bare minimum firmware with no user app and a single watchface. This reduces the image size from 377KB (79%) down to 311KB (65%) in flash memory.

github-actions[bot] commented 6 months ago
Build size and comparison to main: Section Size Difference
text 377408B -240B
data 940B 0B
bss 63460B -32B