Leveraging Modern C++ for Embedded Systems [2018 class archive]

“Leveraging Modern C++ for Embedded Systems” is a two-day training course with programming exercises taught by Dan and Ben Saks. It is offered at the Meydenbauer Conference Center from 9AM to 5PM on Saturday and Sunday, September 29th and 30th, 2018 (immediately after the conference). Lunch is included.

Course Description

While C remains the dominant language used in embedded programming, C++ offers very powerful tools that make it much better-suited for embedded development. Modern C++ adds even more advantages by providing native support for commonly-used embedded programming constructs such as threads on top of C++’s powerful abstraction and generic programming capabilities. This course shows how to take advantage of these tools to write embedded software that is extremely efficient, yet readable and maintainable.

Using real programming examples running on real single-board computers, this course explains how to use C++ features such as classes, overloading and user-defined type conversions to hide messy hardware details behind cleaner interfaces. It shows how to use more advanced C++ features to create abstract, reusable code without sacrificing performance. It explores programming styles and idioms that turn potential run-time errors into compile-time errors, and turn run-time computations into compile-time computations.


Participants should have basic knowledge of the C++ language and standard library.

This course includes programming exercises. The exercises run on a simulator provided by the instructor. Each exercise compiles and links with the simulator in C++ and executes as a command-line application. Please bring a computer with a C++11 or C++14 development environment that can build command-line applications.

Course Topics

  • Extended integer types
  • Using const and volatile appropriately
  • Memory-mapped object placement and initialization
  • Constant expressions and constexpr objects
  • Inline and constexpr functions
  • Hardware abstraction techniques
  • Function and operator overloading
  • Implicit conversions
  • User-defined literals
  • Alignment and padding concerns
  • Standard-layout types
  • Type traits and static assertions
  • Placement and class-specific new
  • Co-located and intertwined devices
  • Non-public inheritance
  • Using-declarations and access control adjustment
  • Read-only and write-only semantics
  • Interrupt handling frameworks
  • Language linkage
  • Race conditions, critical sections and atomic types

Course Instructors

Dan SaksDan Saks is the President of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. He has been a columnist for The C/C++ Users Journal, The C++ Report, Embedded Systems Design, embedded.com and several other publications. Dan served as the first secretary of the C++ Standards Committee and contributed to the CERT Secure Coding Standards for C and C++.
Ben SaksBen Saks is the Chief Engineer of Saks & Associates. Previously he was a Software Engineer at Vorne Industries where he used C++ and JavaScript to develop embedded systems that help improve manufacturing productivity in factories all over the world. He is a contributing author on multiple patents and a technical editor for much of Saks & Associates’ C++ training curriculum.