On my end, the default length for the abbreviated commit hash is 9 characters.
This won't fit into uint32_t (4 bytes).
Instead change FW_COMMIT_HASH into a string
and create preprocessor symbol for the string length
such that it's known at compile time.
If the string should be longer or shorter
then only FW_COMMIT_HASH_LENGTH needs to be configured on the CMake side
- Use the HEAD commit hash as the default suffix
- Use the output of "describe" as the full version string
- Use the HEAD commit time as SOURCE_DATE_EPOCH
Allow to set the source epoch of the build with
PROJECT_VERSION_TIMESTAMP.
When unset fetch the commit timestamp of the current HEAD automatically
instead of leaving the source as 0. This fixes the firmware DATE
information in the support menu.