Run a C program bare metal on an ARM Cortex M3
jacobmossberg.se
jacobmossberg.se
Super appreciate this article, might dust off my of Pandaboard again :)
However, why not mention or explain the widely available and extremely affordable ST-link2 or the ST Discovery boards? I suspect that for people just getting started with STM32 these would be more common.
I personally don't think there's anything wrong at all with using c++11 (or any version) on devices like this, so long as the compiler you need to use provides a stable implementation of it. The new language features of c++11, like constexpr and move semantics, and the static meta-programming contraptions that are readily at hand in the STL can all be very helpful to create manageable and fast embedded systems.
Though it usually isn't a free for all. These things are commonly avoided:
* Exceptions (in many cases this alters the call-return sequence, which can increase code size, and add overhead that may not be acceptable)
* Most of the STL (because either a feature requires exceptions to use safely--like containers, or perhaps because the feature doesn't fit into your code section, or just takes up too much of it to be worthwhile)
* RTTI (which can increase the size of a vtable)
I have written solid, maintainable c++ code for the AVR, but the writing of it was difficult -- it was the maintenance and use by others was easier (example: what looked like a struct actually laid out its code noncontiguously -- but someone who needed to add a small feature didn't need to know that much less worry about it).
C++ is fundamentally a systems programming language so quite a bit of embedded code is written with it. But it's designed to be span tiny to massive applications, and different features are intended for different points on that curve.