Testing on the Host vs Target

The Pragmatic Embedded Podcast · 7 Sept 2021 · 30m

What this episode covers

Jeff Gable and Luca discuss the strategy of testing embedded software on the host machine versus the target hardware, arguing that host testing catches the majority of bugs while target testing is reserved for hardware-specific interactions. They introduce architectural patterns like the Model-Hardware-Controller (MHC) and the Data Model pattern to decouple business logic from hardware, enabling effective unit testing. The conversation also covers handling resource-constrained systems by optimizing last and using special integration tests to uncover low-level bugs like interrupt priority issues.

Most relevant to

early-stage companies

Topics

Mentioned

Companies
Throw the Switch
Products
Patterns in the Machine
Also
John Taylor, Model-Hardware-Controller, Data Model

Other shows on the same ground, closest first.

  • Embedded.fm · 1h 06m

    191: What, Yogurt!?!

    Hosts Elecia White and Christopher White answer listener emails, covering topics from I2C pitfalls and RTOS choices to advice for students and engineers dealing with legacy code. They discuss the 'March Micro Madness' dev kit tournament, automation in embedded testing, and the challenges of refactoring a 60,000-line monolithic codebase. The episode also includes career advice for undergraduates and a discussion on short stories.

  • Embedded.fm · 1h 00m

    280: Reginald P. Theodore Johnson

    Hosts Elecia White and Christopher White discuss software design patterns, including Wrapper, Decorator, and Observer, using the 'Gang of Four' and 'Head First' books as references. They cover practical embedded applications like the CM0s hardware abstraction layer, dependency injection, and the Model-View-Controller pattern for UI separation. The episode also features announcements for the KiCad conference in Chicago and a recap of the BangBangConWest conference, along with a discussion of Python static analysis tools like PyFlakes.

  • Embedded.fm · 56m

    30: Eventually Lightning Strikes

    James Grenning, author of 'Test Driven Development for Embedded C' and founder of Renaissance Software, explains how TDD reduces bugs and improves design in embedded systems. He argues that manual testing is unsustainable because the cost of retesting grows exponentially, leading to hidden defects that cause late-stage failures. Grenning advocates for getting code off the target hardware to run on PCs using mocks and fakes, which forces modularity and allows engineers to build confidence before hardware is available. He emphasizes that TDD is not just about testing but about driving SOLID design principles, such as single responsibility, by making complex code difficult to test.

  • Embedded.fm · 1h 02m

    159: Flying Rainbow Children

    Hosts Elecia White and Christopher White discuss compiler optimizations, explaining how levels like -O2 or -O3 trade size for speed via loop unrolling and inlining, which complicates debugging by hiding variables and altering timing. They define bit-banging as software-controlled GPIO toggling for protocols like I2C, noting that implementing it in an FPGA constitutes hardware design rather than bit-banging. The conversation covers the challenges of unit testing in embedded systems, particularly for drivers and legacy code, and references games like Human Resource Machine and TIS-100 for learning assembly.

  • Embedded.fm · 1h 10m

    270: Broccoli Is Good Too

    James Grenning, author of 'Test Driven Development for Embedded C' and founder of Wingman Software, discusses the philosophy and practice of Test Driven Development (TDD) for embedded systems. He explains how TDD reduces debugging time by enforcing small, verifiable steps and using techniques like 'ZOMBIES' to defer complex decisions. Grenning also shares insights from a recent side project involving a Synapse Wireless mesh network for industrial water pressure monitoring, illustrating how to handle hardware uncertainty through experimentation and loose coupling.

The summary, chapters and topics are generated from the episode’s audio by this directory, not written by The Pragmatic Embedded Podcast. The episode itself belongs to its publisher.