TDD for Microcontrollers
summary
Explains how dual-target (host/off‑target + cross‑compiled on‑target) testing plus open loop tests let TDD hit microcontroller pin behavior, using Robot Framework to script a testbench that flashes STM32 firmware, sends UART frames, captures logic‑analyzer traces and gives feedback in seconds (flashes can be 2–3s). Shows a parity‑bit regression found by tests, demos an execution platform commercial test system that automates peripherals, and recommends running off‑target tests also on target to catch toolchain and hardware differences.
AI-written summary · about
chapters (19)
- 0:00TDD for microcontrollers
- 0:42Embedded testing challenges
- 3:12Embedded vs traditional TDD
- 5:24Dual Target testing by James Grenning
- 7:30Off Target testing with desktop compilers
- 11:50Risks of off Target testing
- 14:43On Target testing for hardware code
- 17:17Limitations of register-based testing
- 25:20Open loop testing for pin behavior
- 28:15Live demo: open loop testing with UART
- 35:23Debugging parity issues with tests
- 39:21Open loop testing benefits
- 41:29Testing approaches in embedded systems
- 42:12Q&A: On Target vs off Target ratios
- 45:28Real-time requirements in tests
- 47:01Hardware emulation unreliability
- 48:54TDD in functional safety
- 50:20Integration vs TDD feedback loops
- 51:44Bug detection in pin tests
related talks
01h 00mMetal-In Test-Driven Development: A Dual-Target TDD approach
34mOpen Loop Testing: The Missing Link for Embedded Testing?
01h 22mTest-Driven Development of C++ Embedded and System-Level Software
38mHow we implemented TDD in Embedded C/C++
18mTesting Intel TDX functionality with new set of self tests
01h 13mTDD Revisited
38mDeliver Better Code Faster With TDD
01h 01mAdvanced Unit Testing in C & C++
