Metal-In Test-Driven Development: A Dual-Target TDD approach
summary
Metal-In TDD shows a Dual-Target workflow that builds a portable BatteryMonitor in C for an 8-bit MCU by driving behavior with unit tests, test doubles and gradual refactoring. Uses Ceedling and CMock with GCC and a Microchip simulator to run tests on target (27s) and host (≈10s), triangulates thresholds (0, 25, 49, 50%), extracts a PAL to hide GPIO bits, and verifies the module runs green on both simulator and real target.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 6:25Motivation for Metal-In TDD
- 13:32Four-level battery monitor demo
- 17:46Development environment setup
- 22:00First test and hardware discovery
- 25:37First test pass and validation
- 27:24Refactoring code structure
- 33:05Test doubles for dependencies
- 38:01Battery percentage logic
- 41:38Host environment tests
- 45:29Behavior expansion with triangulation
- 49:49Decoupling hardware specifics
- 57:45Final refactoring and inversion
- 59:33Conclusion
related talks
54mTDD for Microcontrollers
01h 22mTest-Driven Development of C++ Embedded and System-Level Software
38mHow we implemented TDD in Embedded C/C++
01h 01mMicrocontrollers in Micro-increments...
01h 01mAdvanced Unit Testing in C & C++
53mHow to fall in love with TDD
46mHow to fall in love with TDD
01h 00mC++ Test-driven Development
