Practical Guide to Bare Metal C++



Book Details
Author | Alex Robenko |
Published | 2021 |
Edition | 1st |
Paperback | 177 pages |
Language | English |
License | Creative Commons Attribution-NonCommercial-NoDerivatives |
Book Description
The primary intended audience of this open book is professional C++ developers who want to understand bare metal development a little bit better, get to know how to use their favourite programming language in an embedded environment, and probably bring their C++ skills to an "expert" level. The author asks "Why professional?" and explains that it is because the bare metal platform has lots of limitations. In most cases no exceptions and no runtime type information (RTTI) support will be available. In many cases the dynamic memory allocation will also be excluded. The author states that in order to be able to use C++ effectively the reader will have to have deep knowledge of existing C++ idioms, constructs and STL contents. The reader must know how their favourite data structures are implemented and whether it is possible to reuse them in their environment. The author notes that if it is not possible to use the STL (or any other library) code "as is", the reader will have to implement a reduced version of it, and it is better to know how the library developers implemented the feature and how to make it work with the constrains of their environment.
The author indicates that professional embedded developers with intermediate knowledge of C++ may also find this document useful. They will probably benefit from lots of C++ insights and will have several "eureka" moments with "I didn't know I could do that!!!" kind of thoughts.
The author states that if the reader's C++ knowledge doesn't go much beyond polymorphism and virtual functions, and if template meta-programming doesn't mean anything to them, they are probably not ready to use C++ in the embedded environment and this document will probably be too complex to understand.
The author would like to emphasise the fact that this is NOT a C++ tutorial. The reader is reminded that there are lots of resources on the web that teach conventional C++ with OS services, exceptions and RTTI. The author's personal opinion is that one has to master C++ in a regular environment before using it effectively in the bare metal world.
This book is available under a Creative Commons Attribution-NonCommercial-NoDerivatives license (CC BY-NC-ND), which means that you are free to copy and distribute it, as long as you attribute the source, don't use it commercially, and don't create modified versions.
If you enjoyed the book and would like to support the author, you can purchase a printed copy (hardcover or paperback) from official retailers.