Modern Embedded Systems Programming with Miro Samek

The Pragmatic Embedded Podcast · 18 Jan 2022 · 56m

What this episode covers

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.

Mentioned

Companies
Quantum Leaps, GE
Products
Arduino, FreeRTOS, Patterns in the Machine
Also
state-machine.com

Other shows on the same ground, closest first.

  • Embedded.fm · 1h 22m

    179: Spaghetti Reducer

    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.

  • Embedded.fm · 1h 09m

    401: Oil and Water

    Miro Samek, founder of Quantum Leaps, discusses his 'Modern Embedded Systems Programming' YouTube series and the QP framework, explaining why event-driven state machines and active objects are superior to traditional RTOS usage for hard real-time systems. He details the architectural pitfalls of mixing blocking and non-blocking paradigms, advocating for strict separation to avoid race conditions and priority inversion. Samek also explains the business model of selling commercial licenses for QP to companies that cannot use its GPL open-source version, while providing free educational content to build trust and community.

  • Embedded.fm · 1h 09m

    364: All the Abstractions

    Jacob Beningo, an embedded software consultant and author, discusses the critical role of tracing technology in embedded development, recommending tools like Percepio Tracealyzer and SEGGER SystemView to visualize system behavior without the performance overhead of print statements. He explains how tracing helps debug timing issues, optimize low-power states, and validate real-time operating system (RTOS) performance, particularly in complex applications like satellite flight software. Beningo also shares insights from his books on reusable firmware and MicroPython, advocating for the use of Hardware Abstraction Layers (HALs) to accelerate development while understanding their limitations, and highlights the Embedded Online Conference as a way to access industry expertise efficiently.

  • Embedded.fm · 1h 13m

    290: Rule of Thumbs (Repeat)

    Phillip Johnston, founder of Embedded Artistry, discusses his embedded systems consulting firm and his educational website, highlighting his focus on firmware engineering, code reviews, and robust software design. He explains how his company helps early-stage startups and medium-sized companies transition from prototypes to production, often by addressing firmware bottlenecks and implementing better testing and abstraction strategies. The conversation covers specific technical challenges, including the limitations of standard C++ threading libraries on embedded RTOSs like FreeRTOS and ThreadX, and the importance of risk analysis in complex systems, using the Boeing 737 MAX crashes as a case study for systemic failure.

  • Embedded.fm · 1h 05m

    53: Being a Grownup Engineer (Repeat)

    Jack Ganssle, author of 'The Art of Designing Embedded Systems' and 'The Embedded Systems Dictionary', argues that embedded software development has failed to adopt true engineering discipline, relying on 'heroics' rather than process. He cites the Toyota unintended acceleration case, where Michael Barr identified 11,000 global variables, as evidence of the catastrophic costs of poor software practices. Ganssle advocates for rigorous requirements gathering, static analysis tools like LDRA and Spark, and metrics-driven benchmarking to reduce debugging time and improve code quality. He contrasts this disciplined approach with the 'hacker' and 'maker' cultures, emphasizing that safety-critical systems require proven processes rather than ad-hoc coding.

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.