Calculate Fletcher Checksums at compile time from string.
You can now just call CHECKSUM macro like the following to have the checksum
calculated for you at compile time:
#define enable_checksum CHECKSUM("enable")
This uses a set of recursive macros from src/libs/checksumm.h to inline the
checksum calculation and then the compiler uses constant folding in optimized
builds (-O1 or higher) to pre-calculate the values.
NOTE: The macros in checksumm.h currently only support a maximum string length
of 32 characters. If you exceed this, the macros will return a fixed value
of 0xFFFF which won't match your string. You should keep your
checksummed strings below this length.
I took a copy of main.bin from before I starting making these changes and then
kept running builds and verifying that the new main.bin was exactly the same
as the original. This means that it created the same checksums and didn't grow
the binary size at all.