The Right Amount of Abstraction
summary
Compares concrete C++ patterns—register wrappers, function wrappers, template static, template objects, constructors, and virtual interfaces—measures code size and shows optimized builds match the C baseline (about ~50 bytes in his tests) while unoptimized and global virtual setups blow up; global vs local instantiation changes whether the optimizer removes indirection, and ARMv6 often optimizes away virtual layers while ARMv5 sometimes does not. Uses UML/Rhapsody code generation to produce GPIO drivers and a stopwatch app that runs in simulation and on the LPC1768 target, proving the model-driven approach works.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:20Abstraction in C
- 3:10UML Code Generation
- 3:55Should I use C
- 4:24Arm Controllers
- 8:17Goals
- 11:40How to Abstract
- 13:31Code Samples
- 14:13Benchmarks
- 16:47Functions
- 19:06Digital IO
- 19:55Template IO
- 23:47No constructor
- 30:57The Digital IO
- 36:19Example
- 39:35Discussion Round
- 40:14Solutions
- 41:59Framework
- 46:28Scheduling
- 49:03UML Architecture
