Real-Time C++ logo

Real-Time C++

Free

companion bare-metal code to Real-Time C++ book.

FreeFree tier
Type
Open Source

About Real-Time C++

This repository provides companion source code for the book 'Real-Time C++: Efficient Object-Oriented and Template Microcontroller Programming', 4th Edition, by Christopher Kormanyos. It is intended for educational and exploratory use. The code includes a reference application (with a microcontroller abstraction layer, multitasking scheduler, LED toggle, benchmarks, and watchdog service), examples from the book, and code snippets. The reference application is portable across a wide range of microcontroller targets (e.g., ARM, AVR, RISC-V, Renesas, STM32, Raspberry Pi) and is compatible with C++14/17/20/23. The project relies on GNU/GCC cross compilers and related tools available in a separate toolchains repository.

Key Features

Companion code for Real-Time C++ book (4th Edition)
Portable reference application with MCAL, multitasking scheduler, and LED toggle
Supports 20+ microcontroller targets (ARM, AVR, RISC-V, Renesas, etc.)
Compatible with C++14, 17, 20, and 23 standards
Includes benchmarks, examples, and code snippets
Uses GNU/GCC cross compilers with separate toolchains repository

Pros & Cons

Pros
  • Highly portable across many microcontroller families
  • Actively maintained with 798 stars and frequent updates
  • Covers multiple C++ standards for modern embedded development
  • Well-documented with clear reference application structure
Cons
  • Primarily useful for readers of the specific Real-Time C++ book
  • Requires familiarity with embedded C++ and microcontroller concepts
  • Limited to microcontroller targets; not for general-purpose or desktop software

Best For

Learning real-time C++ for embedded systemsEducational projects exploring microcontroller programmingPorting embedded C++ code across different MCU architecturesReference implementation for bare-metal microcontroller applications

FAQ

What is the purpose of this repository?
It provides companion source code for the book Real-Time C++ by Christopher Kormanyos, for educational and exploratory use.
What microcontroller targets are supported?
The reference application supports over 20 targets including ARM Cortex, AVR, RISC-V, Renesas, STM32, and Raspberry Pi boards.
Which C++ standards are compatible?
The code is compatible with C++14, 17, 20, and 23.
Is the code free to use?
Yes, the repository is open source and available for educational and exploratory use.