Zephyr Off-Chip Peripheral Emulation
summary
Zephyr provides off‑chip peripheral emulation for driver testing that runs in native_posix or QEMU, intercepts bus transactions (I2C/SPI/ESPI) at the bus-transaction level, and implements a small bus API (~50 lines) plus a backend API to inject conditions like low battery or temperature; typical emulators are about 400 lines of C, plug into device tree, run deterministically in CI, and Google reports moving driver coverage from 30% to 90% using this approach, so the emulators are cheap to build and effective at catching regressions.
AI-written summary · about
chapters (9)
- 0:00Off-chip peripheral emulation intro
- 1:51Peripheral emulators in Zephyr
- 7:04Emulation cost and benefits
- 11:18Emulation in project lifecycle
- 15:15Step-by-step emulator creation
- 21:57Emulators in Zephyr tests
- 24:24Future Zephyr emulation improvements
- 26:52Google's emulation success story
- 37:15Q&A
related talks
37mStreamlining Testing with Generic Tests and Emulators
13mZephyr Unit Tests and Emulators at Google
37mStreamlining Testing with Generic Tests and Emulators
46mZephyr Application Development Using TDD: Getting Started
47mThe Native Simulator and Zephyr
47mThe Native Simulator and Zephyr
46mZephyr Application Development Using TDD: Getting Started
57mZephyr RTOS Debugging and Performance Analysis
