Book Image

Hands-On Embedded Programming with C++17

By : Maya Posch
5 (1)
Book Image

Hands-On Embedded Programming with C++17

5 (1)
By: Maya Posch

Overview of this book

C++ is a great choice for embedded development, most notably, because it does not add any bloat, extends maintainability, and offers many advantages over different programming languages. Hands-On Embedded Programming with C++17 will show you how C++ can be used to build robust and concurrent systems that leverage the available hardware resources. Starting with a primer on embedded programming and the latest features of C++17, the book takes you through various facets of good programming. You’ll learn how to use the concurrency, memory management, and functional programming features of C++ to build embedded systems. You will understand how to integrate your systems with external peripherals and efficient ways of working with drivers. This book will also guide you in testing and optimizing code for better performance and implementing useful design patterns. As an additional benefit, you will see how to work with Qt, the popular GUI library used for building embedded systems. By the end of the book, you will have gained the confidence to use C++ for embedded programming.
Table of Contents (19 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

The power of the right framework


A framework is essentially a collection of code aimed at easing the development of software for a specific application. It provides the developer with a range of classes—or the language equivalent—to allow you to implement the application logic without having to worry about interfacing with the underlying hardware, or using the OS's APIs.

In previous chapters, we used a number of frameworks to make our development efforts easier, from the No date Framework (Chapter 4, Resource-Restricted Embedded Systems) and CMSIS to Arduino for microcontrollers (MCUs), and from the low-level POCO framework for cross-platform development to the higher-level Qt framework.

Each of these frameworks has a specific type of system that they are intended for. For No date, CMSIS, and Arduino, the target is MCUs, ranging from 8-bit AVR MCUs to 32-bit ARM MCUs. These target the bare-metal systems, without any intermediate operating system (OS) or similar. Above those in terms of complexity...