Real-Time C++: Efficient Development of Embedded Systems
590 pages
English
PDF
4.5

Real-Time C++: Efficient Development of Embedded Systems

Real-Time C++: Efficient Development of Embedded Systems

Author:

Year:

Summary:

Introduction

The book "Real-Time C++: Efficient Development of Embedded Systems" (original title Real-Time C++: Efficient Object-Oriented and Template Microcontroller Programming) by Christopher Kormanyos is not just another textbook on the C++ language. It is a deep dive into the world of microcontroller programming and hard real-time systems. The fourth edition, published in 2021, covers the C++17 and C++20 standards, making it one of the most relevant guides for embedded developers seeking to use modern language features without sacrificing performance.

What this book is about

The book is dedicated to applying C++ in resource-constrained environments: limited memory (RAM/ROM), low clock speeds, the absence of an operating system, or working with an RTOS. The author systematically reveals how, using templates, constexpr, lambda expressions, and other C++ features, you can create reliable, efficient, and easily maintainable code for embedded systems. Special attention is paid to working with peripherals (timers, ADC, UART), interrupt handling, and time management.

Who this book is for

  • Embedded developers who want to switch from C to C++ or deepen their knowledge of C++ in the context of microcontrollers.
  • Engineering students studying embedded systems and real-time programming.
  • Experienced C++ programmers who want to understand how to apply modern C++ under severe resource constraints.
  • Engineers working with ARM Cortex-M, AVR, MSP430 and other popular architectures.

What the reader will learn

  • How to use templates and constexpr for compile-time computations, saving processor cycles.
  • Principles of building peripheral drivers in C++ with minimal overhead.
  • Methods for working with interrupts and multitasking in real-time.
  • Code optimization for size and speed: avoiding virtual functions, using placement new, memory pools.
  • Applying C++20: coroutines, concepts, ranges in the embedded context.
  • Testing and debugging embedded software using simulators and debuggers.
  • Implementing digital signal processing algorithms (FFT, filters) in C++.

Strengths

One of the book's main advantages is its practical focus. Each chapter contains ready-to-use code examples that can be immediately adapted to your project. The author doesn't just explain theory but shows how to avoid common mistakes (e.g., undefined behavior when working with volatile or compiler optimizations). The excellent structure is also worth noting: from simple examples (blinking an LED) to complex multi-threaded systems. The book is written in a lively, understandable language, and all examples are accompanied by detailed comments. Furthermore, the fourth edition has updated chapters for C++20, keeping it relevant for years to come.

Who is recommended

The book will be useful to everyone professionally involved in developing embedded systems in C++ — from students to engineers with many years of experience. If you want to write code that runs fast, uses little memory, and is easy to read and maintain, "Real-Time C++" will become your go-to book. We also recommend it to those looking for a bridge between the classic C style and modern C++ in the world of microcontrollers.

Recommendations