Merge pull request #87 from bgamari/edge

StreamOutput: Mark printf with __attribute__((format))
Demangle C++ names in main.disasm.

Thanks to wolfmanjm on IRC for pointing out that I wasn't already doing this.
adding support for (comments)
the laser module now will not take the p21 pin, unless enabled. that was just silly. fixed
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.
https://gist.github.com/4671861 : using on_idle instead of on_main_loop caused everything to go way too deep
Merge branch 'edge' into checksum_macro
Add bgamari's C++11 checksumming approach.

I haved added bgamari's cool C++11 user defined literals approach.  In simple
cases it generates the exact same code as the C preprocessor approach but if
multiple checkums are calculated in the same function, I see the constant
folding not happening for some which makes the code even larger than just
having the string in the code.  For this reason I have disabled it for now but
left it in so that it is easy to test out in the future and hopefully switch
to as its implementation is much shorter and clearer.

Maybe just an issue in GCC as these features are new or maybe there is an
optimizer setting that needs to be set.  I tried GCC 4.7 from
https://launchpad.net/gcc-arm-embedded/+milestone/4.7-2012-q4-major
Make checksum macros work in non-optimized builds.

Previously the checksum macros would bloat the code because the inline math to
calculate the checksums were not constant folded in -O0 builds.  This commit
modifies the CHECKSUM() macro to just call get_checksum() instead in such
builds.

The fact that checksums are no longer constant expressions in non-optimized
builds means that they can't be used as case labels in switch statements. I
modified the affected switch statements to use if / else if statements instead.
Ensure that C++11 checksum is evaluated at compile-time

Wrapping the expression in an std::integral_constant<> seems to do the
right thing, even with no optimization.

Unfortunately, it seems that gcc 4.6 doesn't support user-defined string
literals, so we'll need to wait until we start building with 4.7 before
enabling this.