Skip to content

Knowledge Base ​

AllNewsBlogConceptsBooks
New Quantum Leaps Website

The state-machine.com website has been rebuilt as a fast, secure static site that is easy to read for people, search engines, and AI assistants.

QP-bundle 8.1.6 Released

QP-bundle 8.1.6 is available for Windows, Linux, and macOS. The release adds a link-time configuration check, a simpler priority specification, fixes in software tracing, and an extended test suite.

A Clash of Worldviews: RTOS Model vs. Actor Model

The geocentric model of the universe is intuitive and perfectly aligned with common sense. After all, we see the sun, planets, and stars circling an...

RTOS Vendors Won’t Say It, But Blocking Is the Real Problem

Every few years an RTOS vendor rediscovers the fact that developers are tired of creating multiple tasks just to handle multiple events. The latest example...

Tips for Migrating from Superloop/RTOS to QP Framework

A developer interested in the QP/C framework has recently posted the following questions on the qpc GitHub repository: For developers transitioning from...

Intuitive Modeling: The Missing Ingredient in AI‑Aided Development

David Harel — the inventor of Statecharts — tells a story from his early days working on the idea: In 1983, during a design session, an Air Force pilot...

Blocking == Technical Debt

Blocking occurs every time a program waits in line for something to happen. For instance, the basic Arduino “Blink” example turns the LED on and calls the...

How Big Should Active Objects Get?

Q: How big should active objects get? A: As big as possible, but not bigger.

NULL pointer protection with ARM Cortex-M MPU

The second of the Ten Commandments for C Programmers says: 2. Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end. This...

QP 7.0.0 Milestone Release

New QP 7.0.0 milestone release has just been made available for download. The QP-bundle contains the following software: QP/C 7.0.0 QP/C++ 7.0.0 QTools...

Embedded Online Conference 2022

The Embedded Online Conference has emerged as the one of the most important learning events for embedded software in the U.S. This year, Quantum Leaps’...

Embedded.fm Podcast “Oil and Water” with Miro Samek

What are the main programming paradigms in embedded software? Which of them can be mixed together and which are like “oil and water”? NOTE: Embedded.fm is...

Modern Embedded Programming Podcast

Is it possible to be agile and do modeling, state-machine design and code generation? You bet! Modern event-driven approach with asynchronous active...

New Videos Explain Finite State Machines

The popular “Modern Embedded Programming” video course now contains a segment devoted to state machines. If you really want to understand state machines...

Hierarchical State Machines Persevere on Mars

Steve Scandore, the technical lead of the Mars 2020 FSW, talks about the role of Hierarchical State Machines in the Mars Perseverance Software in his...

Interview with Miro Samek

Interview with Miro Samek of Quantum Leaps conducted by Leonardo Held in February 2021. Published in Portuguese in “Embarcados”. Origins What is Quantum...

Embedded Online Conference 2021

The Embedded Online Conference was a big success last year. This year, Quantum Leaps’ Miro Samek will present again and continue the subject of “Modern...

QP-bundle 6.9.3 released

New QP-bundle 6.9.3 is now available for download: Released software versions: QP/C 6.9.3: See QP/C revision history for version 6.9.3 QP/C++ 6.9.3: See...

RTOS, TDD and the “O” in the S-O-L-I-D rules

Due to prevalent blocking, RTOS-based designs are generally difficult to reconcile with the Open-Closed Principle. In contrast, event-driven approach is...

“Input-Driven” vs. Event-Driven State Machines

Superloops with switch statements implement input-driven (polled) state machines, not event-driven ones. The difference explains why event-driven state machines scale better.

QSPY Sequence Diagram Generation

The QSPY host application can now generate sequence diagrams. This new feature replaces the previous support for MscGen and is no longer reliant on any...

QP-bundle 6.9.2 released

New QP-bundle 6.9.2 is now available for download: Released software versions: QP/C 6.9.2: See QP/C revision history for version 6.9.2 QP/C++ 6.9.2: See...

New Version of QCalc Programmer’s Calculator

A new Python version of the popular QCalc tool has been released in QTools 6.9.2. The new QCalc is a console application, unlike its predecessor, which was...

Active Object (Actor)

Active Objects combine event-driven programming with multithreading. They naturally implement and automatically enforce the best practices of concurrent...

Design by Contract

Design by Contract is the single most effective programming technique for delivering high-quality code. Here you can learn what the Design by Contract...

Event-Driven Programming

Embedded systems need a program structure that can respond to a multitude of possible event sequences, any of which can arrive at unpredictable times. This...

Finite State Machine (FSM)

The behavior of each Active Object in the QP™ real-time embedded frameworks is specified by means of a modern finite state machine (UML statechart), which...

Model-Based Design

Model-Based Design (MBD) is a software development process in which the primary focus and products are software models rather than directly code. MBD holds...

New Website for 2021

We are excited to announce the launch of our updated website at www.state-machine.com. The new site has a fresh new look and is based on WordPress....

Object-Oriented Programming

Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which can contain data and code: data in the form of...

Reactive Systems

The main common characteristic of Real-Time Embedded (RTE) systems is that they constantly interact with the external world. Such systems, termed reactive...

Real-Time Event Framework

A Real-Time Event Framework (RTEF) is an implementation of the Active Object design pattern specifically designed for real-time embedded systems. RTEF...

Sequential Programming

A sequential program explicitly waits in-line, for the expected events in various places in the execution path. This explicit waiting for events is...

Software Tracing

Software tracing is a method for obtaining diagnostic information about the embedded software in a live environment without the need to stop the...

QP and Arduino

The Quantum Leaps’ QP™ real-time embedded frameworks (RTEFs) and the QM™ modeling tool complement the Arduino platform and provide everything you need to...

Embedded Programming Video Course Shows How OOP Works Under the Hood

If you’d like to understand how Object-Oriented Programming (OOP) really works under the hood, here is a free video course for you: OOP Part-1...

Embedded Programming Video Course Teaches RTOS

If you’d like to understand how a Real-Time Operating System (RTOS) really works, here is a free video course for you: RTOS Part-1: Threads as Background...

Embedded Toolbox: Source Code Whitespace Cleanup

In this installment of my “Embedded Toolbox” series, I would like to share with you the free source code cleanup utility called QClean for cleaning...

Embedded Toolbox: Programmer’s Calculator

Like any craftsman, I have accumulated quite a few tools during my embedded software development career. Some of them proved to me more useful than others....

Modern Embedded Programming: Beyond the RTOS

An RTOS (Real-Time Operating System) is the most universally accepted way of designing and implementing embedded software. It is the most sought after...

QP™ and POSIX (Linux)

This Application Note describes how to use the QP™/C and QP™/C++ real-time embedded frameworks (RTEFs) version 5.x.x or higher with the POSIX...

Fast, Deterministic, and Portable Count Leading Zeros (CLZ)

Count Leading Zeros (CLZ) is a critical operation in many DSP algorithms, such as normalization of samples in sound or video processing, as well as in...

Are We Shooting Ourselves in the Foot with Stack Overflow?

In the latest Lesson #10 of my Embedded C Programming with ARM Cortex-M Video Course I explain what stack overflow is and I show what can transpire deep...

Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities

The insanely popular ARM Cortex-M processor offers very versatile interrupt priority management, but unfortunately, the multiple priority numbering...

Dual Targeting and Agile Prototyping of Embedded Software on Windows

When developing embedded code for devices with non-trivial user interfaces, it often pays off to build a prototype (virtual prototype) of the embedded...

Embedded C Programming with ARM Cortex-M Video Course

As part of my New Year’s resolution for 2013, I just started to teach an Embedded C Programming Course with ARM Cortex-M on YouTube. The playlist for this...

The Best Christmas Present for a Nerd

Christmas is right around the corner and if you wonder about the presents, I have just an idea for you. No, it is not the new iPad, Galaxy S3 phone, or any...

Superloop vs event-driven framework

On the free support forum for the QP state machine frameworks, an engineer has recently asked a question “superloop vs event dispatching“, which I quote...

ESD closes shop. What’s next in store for embedded programming?

The demise of the ESD Magazine marks the end of an era. In his recent post “Trends in Embedded Software Design“, the magazine insider Michael Barr...

Economics 101: UML in Embedded Systems

With UML, just as with anything else in the embedded space, the ultimate criterion for success is the return on investment (ROI). Sure there are many...

Turning automatic code generation upside down

Much ink has been spilled on the Next Big Thing in software development. One of these things has always been “automatic code generation” from high-level...

On the Origin of Software by Means of Artificial Selection

If you haven’t put your hands on the recent James Grenning’s book “Test-Driven Development for Embedded C” yet, I highly recommend you do. Here is why. TDD...

Protothreads versus State Machines

For a number of years I’ve been getting questions regarding protothreads and comparisons to state machines. Here is what I think: Protothreads in a...

Is an RTOS really the best way to design embedded systems?

Recently I’ve been involved in a discussion on the LinkedIn Real-Time Embedded Engineering group, which I started with the question “Is an RTOS really the...

Rapid Prototyping with QP and Arduino

Arduino (see arduino.cc) is an open-source electronics prototyping platform, designed to make digital electronics more accessible to non-specialists in...

Linear statechart notation

The traditional fully 2-dimensional structure of UML state diagrams is too much rope to hang yourself with. There is no standard drawing order or pattern...

Free state machine tool for embedded systems

Today I wanted to let you know about a new, free, graphical tool called QM (QP-Modeler) for drawing state machines and generating production-quality...

RTOS Without Blocking?

In my previous post, “RTOS Considered Harmful”, I have identified blocking as the main cause of the particular brittleness and inflexibility of the...

RTOS Considered Harmful

I have to confess that I’ve been experiencing a severe writer’s block lately. It’s not that I’m short of subjects to talk about, but I’m getting tired of...

Free store is not free lunch

In my previous post “A Heap of Problems” I have compiled a list of problems the free store (heap) can cause in real-time embedded (RTE) systems. This was...

A Heap of Problems

Some design problems never seem to go away. You think that anybody who has been in the embedded software development business for a while must have learned...

A Nail for a Fuse

If I were to search my soul, I’d have to admit that the use of assertions has helped me more than any other single technique, even more than my favorite...

Cute Creator

For a long time I’ve been looking for a good cross platform development environment that would allow fast exploration and navigation of C/C++ source code...

Insects of the computer world

Small MCUs Dominate the Computer Chip Market All life on earth is really just insects. Statistically speaking, that’s the deal. There are more different...

RTOS Alternatives

As hundreds of commercial and other RTOS offerings can attest, the greatest demand for third-party software in the embedded systems community is for the...

Book: Practical UML Statecharts in C/C++, 2nd Ed

Event-Driven Programming for Embedded Systems by Miro Samek, Ph.D. Home View/Download PDF The second edition of the “Practical Statecharts” book by Quantum...

Make the most of side-by-side code differencing

I’m constantly amazed how many developers shoot themselves in the foot by defeating the benefits of side-by-side source code differencing, which is perhaps...

Object-based programming in C

Embedded developers abandon C++ in droves. According to the 2007 survey published in the ESD magazine, the C++ use declined by one-third compared to year...

Is Eclipse The Emperor’s New Clothes?

“Many years ago there was an Emperor so exceedingly fond of new clothes… …one day came two swindlers. They let it be known they were weavers, and they said...

Embedded Software Crisis or Embedded Software Glut?

The Perpetual “Software Crisis” I’ve been listening to the recent webcast “Solving the Embedded Software Crisis” (see also Rich Nass’ column “The need for...

Agile Embedded Development

Silicon Valley finally seems to be taking a serious look at “agile development” as a competitive advantage. Articles like “Reinventing the Software...

What Embedded Programs have to do with Hollywood?

I still remember the “Triumph of the Nerds” PBS special, where Steve Jobs recalled his early days at Apple and how the young Apple team picked up the...

Book: Practical Statecharts in C/C++

Quantum Programming for Embedded Systems by Miro Samek, Ph.D. Home Download in PDF The first practical book about UML statecharts and event-driven...