179: Spaghetti Reducer

Embedded.fm · 15 Dec 2016 · 1h 22m

What this episode covers

Miro Samek, founder of Quantum Leaps and creator of the QP framework, explains how hierarchical state machines and active objects solve the 'spaghetti code' problem in embedded systems. He contrasts event-driven programming with traditional super-loops and RTOS, arguing that the former offers better scalability and traceability for complex applications. Samek also details specific debugging techniques, such as using hardware faults to detect stack overflows and the critical importance of keeping assertions enabled in production code.

Mentioned

Companies
Quantum Leaps, GE medical systems
Products
QP framework, QM modeling tool, Practical UML Statecharts in C/C++
Chips
Arm Cortex, Renesas RX
Tools
IBM Rhapsody
Also
Jean Labrosse, Michael Barr, EmbeddedGurus.com

Other shows on the same ground, closest first.

  • The Pragmatic Embedded Podcast · 56m

    Modern Embedded Systems Programming with Miro Samek

    Miro Samek, founder and CEO of Quantum Leaps, explains why traditional embedded architectures like superloops and RTOS lead to 'spaghetti code' and concurrency bugs, advocating instead for event-driven active objects and hierarchical state machines. He details how this approach eliminates race conditions and mutexes by enforcing a 'no sharing' principle, thereby improving testability and development velocity. Samek also discusses the importance of using lightweight modeling tools to generate code from state diagrams, ensuring the model remains the source of truth in an agile workflow.

  • The Pragmatic Embedded Podcast · 44m

    QP framework with Mitch English

    Mitch English, a product development team lead at Inertia, discusses implementing the QP (Quantum Platform) framework for a medical device blood analyzer. He explains how QP's actor model and hierarchical state machines manage concurrency and complexity better than traditional RTOS approaches. The team shares lessons on testing strategies, using CppUTest for host-based unit tests, and the architectural decision to favor publish-subscribe patterns over direct posting to improve testability.

  • Oxide and Friends · 2h 03m

    The Pragmatism of Hubris

    Cliff Biffle, principal engineer at Oxide Computer Company, explains the origins of Hubris, an embedded operating system designed for Oxide's rack-scale computers, drawing on his prior experience with Project Loon at Google. The team evaluated existing options like Tock and QNX but chose to build Hubris in Rust to ensure memory safety and value alignment, leveraging a software-hardware co-design approach to bypass the risks of secure FPGAs. Key technical decisions include using a minimal kernel, self-describing build archives, and advanced debugging tools like Humility to manage complex embedded systems without dynamic loading or self-hosting constraints.

  • The Amp Hour · 1h 25m

    Real Time Operating Systems with Brian Amos

    Chris Gammell, author of 'Hands-On RTOS with Microcontrollers', explains the practical application of Real-Time Operating Systems (RTOS) to host Brian Amos. They discuss when to use an RTOS versus a simple state machine or super loop, highlighting use cases like UI handling and complex communications. Gammell details how FreeRTOS manages task prioritization, memory segmentation, and inter-task communication using queues and semaphores. The conversation covers debugging strategies using tools like Segger Ozone and SystemView, and contrasts lightweight RTOS with full operating systems like Linux and Zephyr.

  • The Pragmatic Embedded Podcast · 39m

    Christmas Special

    Hosts Jeff Gable and Luca share war stories from their careers in embedded systems, highlighting the pain of manual testing in helicopter avionics, the chaos of managing requirements with Word and Excel in Dropbox for medical devices, and the technical debt of massive #ifdef blocks in legacy machine tool software. They discuss the industry's slow adoption of modern software practices like version control and CI/CD, contrasting embedded development with web development standards. The episode concludes with book recommendations including 'The Phoenix Project' and 'Team Topologies', and reflections on the future of IoT security and agile adoption in hardware.

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