Keynote: What can C++ do for embedded systems developers?
summary
Argues that modern C++ gives zero-overhead abstraction and real predictability: templates and constexpr produce identical assembly on x86/ARM (verified with Compiler Explorer), an integer-sqrt and compile-time date routines exist and run at compile time, and a no-virtual, template-based driver pattern is deployed in the field with better latency. Recommends full C++ except on critical paths, avoid dynamic allocation at runtime (no malloc after takeoff), use exceptions only for very rare events (~100 occurrences), and follow the C++ Core Guidelines and static analyzers from Microsoft/others.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:29Overview
- 3:12What is "embedded systems programming"?
- 6:01Who are "embedded systems programmers"?
- 7:28Complexity
- 8:392014 UBM survey
- 9:59Programming Languages
- 12:35C++ Background
- 13:47C++ machine model • Primitive operations maps to machine instructions
- 16:20Abstraction
- 18:20Tools
- 18:40Constraints on "embedded systems code" differ
- 21:55Where compactness matters
- 22:28Zero-overhead (classes vs structs)
- 28:49Constant expressions
- 31:19Compile-time computation
- 36:21Simple selection
- 38:13Static polymorphism (simplest form)
- 38:45Zero-overhead features
- 40:16Ordinary code
- 41:13Why type-rich code?
- 42:45Resource Management
- 43:30Resources and Errors
- 45:16We need error-code and exceptions
- 47:35Are exceptions zero-overhead?
- 48:50Simple experiment
- 50:34When you use exceptions
- 52:44RAll without exceptions?
- 53:53Ordinary features
- 56:55Keep simple things simple!
- 57:48Build on a sound foundation
related talks
01h 11mC++ in the World of Embedded Systems
52mC++ for Embedded Development
01h 00mModern Software Needs Embedded Modern C++ Programming
01h 09m“Modern C++ in Embedded Systems - The Saga Continues”
01h 18mWriting better embedded Software
39mRobotics at Compile Time: Optimizing Robotics Algorithms With C++'s Compile-Time Features
01h 31mBetter embedded library interfaces with modern C++
54mCost of Abstractions in Embedded Systems
