# Quantum Leaps: QP real-time event frameworks and tools > Event-driven QP embedded frameworks and QM visual modeling tool based on state machines and asynchronous active objects. Ideal for ARM Cortex-M and other MCUs. Latest release: QP/C and QP/C++ 8.1.6, QM 7.0.4, QTools 8.1.6 (November 12, 2026). Open-source downloads (QP-bundle for Windows, Linux, macOS): https://www.state-machine.com/#Download. Manuals: https://www.state-machine.com/qpc/ (QP/C), https://www.state-machine.com/qpcpp/ (QP/C++), https://www.state-machine.com/qm/ (QM), https://www.state-machine.com/qtools/ (QTools). ## Table of Contents ### Other - [“Input-Driven” vs. Event-Driven State Machines](https://www.state-machine.com/input-driven-vs-event-driven-state-machines.md): Superloops with switch statements implement input-driven (polled) state machines, not event-driven ones. The difference explains why event-driven state machines scale better. - [A Clash of Worldviews: RTOS Model vs. Actor Model](https://www.state-machine.com/a-clash-of-worldviews-rtos-model-vs-actor-model.md): 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... - [A Heap of Problems](https://www.state-machine.com/heap-of-problems.md): 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](https://www.state-machine.com/a-nail-for-a-fuse.md): 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... - [About Quantum Leaps](https://www.state-machine.com/about.md): Quantum Leaps, LLC is an embedded software company delivering quantum leaps in quality and productivity for embedded systems programming: QP real-time event frameworks, QM model-based design tool, and QTools. - [Active Object (Actor)](https://www.state-machine.com/active-object.md): Active Objects combine event-driven programming with multithreading. They naturally implement and automatically enforce the best practices of concurrent... - [Agile Embedded Development](https://www.state-machine.com/agile-embedded-development.md): Silicon Valley finally seems to be taking a serious look at “agile development” as a competitive advantage. Articles like “Reinventing the Software... - [Application Notes & Articles](https://www.state-machine.com/an.md): Application notes by Quantum Leaps (coding standards, QP ports, middleware, state-machine design patterns) and recommended articles about active objects, state machines and real-time programming. - [Are We Shooting Ourselves in the Foot with Stack Overflow?](https://www.state-machine.com/are-we-shooting-ourselves-in-the-foot-with-stack-overflow.md): 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... - [Blocking == Technical Debt](https://www.state-machine.com/blocking-technical-debt.md): 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... - [Book: Practical Statecharts in C/C++](https://www.state-machine.com/psicc.md): Quantum Programming for Embedded Systems by Miro Samek, Ph.D. Home Download in PDF The first practical book about UML statecharts and event-driven... - [Book: Practical UML Statecharts in C/C++, 2nd Ed](https://www.state-machine.com/psicc2.md): 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... - [Contact](https://www.state-machine.com/contact.md): Contact Quantum Leaps: free support forum, bug reports, feature requests, contact form, newsletter sign-up, email, phone and office address. - [Customers & Markets](https://www.state-machine.com/customers.md): Over 500 commercial licensees and many times more open-source users worldwide use the QP real-time embedded frameworks, in products from implantable medical devices to complex defense systems. - [Cute Creator](https://www.state-machine.com/cute-creator.md): 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... - [Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities](https://www.state-machine.com/cutting-through-the-confusion-with-arm-cortex-m-interrupt-priorities.md): The insanely popular ARM Cortex-M processor offers very versatile interrupt priority management, but unfortunately, the multiple priority numbering... - [Design by Contract](https://www.state-machine.com/dbc.md): Design by Contract is the single most effective programming technique for delivering high-quality code. Here you can learn what the Design by Contract... - [Dual Targeting and Agile Prototyping of Embedded Software on Windows](https://www.state-machine.com/dual-targeting-and-agile-prototyping-of-embedded-software-on-windows.md): When developing embedded code for devices with non-trivial user interfaces, it often pays off to build a prototype (virtual prototype) of the embedded... - [Economics 101: UML in Embedded Systems](https://www.state-machine.com/economics-101-uml-in-embedded-systems.md): 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... - [Embedded C Programming with ARM Cortex-M Video Course](https://www.state-machine.com/embedded-c-programming-with-arm-cortex-m-video-course.md): 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... - [Embedded Online Conference 2021](https://www.state-machine.com/embedded-online-conference-2021.md): 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... - [Embedded Online Conference 2022](https://www.state-machine.com/embedded-online-conference-2022.md): 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 Programming Video Course Shows How OOP Works Under the Hood](https://www.state-machine.com/embedded-programming-video-course-shows-how-oop-works-under-the-hood.md): 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](https://www.state-machine.com/embedded-programming-video-course-teaches-rtos.md): 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 Software Crisis or Embedded Software Glut?](https://www.state-machine.com/embedded-software-crisis-or-embedded-software-glut.md): 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... - [Embedded Toolbox: Programmer’s Calculator](https://www.state-machine.com/my-embedded-toolbox-programmers-calculator.md): 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.... - [Embedded Toolbox: Source Code Whitespace Cleanup](https://www.state-machine.com/my-embedded-toolbox-source-code-whitespace-cleanup.md): 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.fm Podcast “Oil and Water” with Miro Samek](https://www.state-machine.com/embedded-fm-podcast-oil-and-water-with-miro-samek.md): 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... - [ESD closes shop. What’s next in store for embedded programming?](https://www.state-machine.com/esd-closes-shop-whats-next-in-store-for-embedded-programming.md): 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... - [Event-Driven Programming](https://www.state-machine.com/event-driven-programming.md): 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... - [Fast, Deterministic, and Portable Count Leading Zeros (CLZ)](https://www.state-machine.com/fast-deterministic-and-portable-clz.md): 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... - [Finite State Machine (FSM)](https://www.state-machine.com/fsm.md): 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... - [Free state machine tool for embedded systems](https://www.state-machine.com/free-state-machine-tool-for-embedded-systems.md): 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... - [Free store is not free lunch](https://www.state-machine.com/free-store-is-not-free-lunch.md): 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... - [Hierarchical State Machines Persevere on Mars](https://www.state-machine.com/hierarchical-state-machines-persevere-on-mars.md): 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... - [How Big Should Active Objects Get?](https://www.state-machine.com/how-big-should-active-objects-get.md): Q: How big should active objects get? A: As big as possible, but not bigger. - [Insects of the computer world](https://www.state-machine.com/insects-of-the-computer-world.md): 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... - [Interview with Miro Samek](https://www.state-machine.com/interview-with-miro-samek.md): Interview with Miro Samek of Quantum Leaps conducted by Leonardo Held in February 2021. Published in Portuguese in “Embarcados”. Origins What is Quantum... - [Intuitive Modeling: The Missing Ingredient in AI‑Aided Development](https://www.state-machine.com/intuitive-modeling-the-missing-ingredient-in-ai-aided-development.md): 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... - [Is an RTOS really the best way to design embedded systems?](https://www.state-machine.com/is-an-rtos-really-the-best-way-to-design-embedded-systems.md): 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... - [Is Eclipse The Emperor’s New Clothes?](https://www.state-machine.com/is-eclipse-the-emperors-new-clothes.md): “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... - [Licensing](https://www.state-machine.com/licensing.md): Quantum Leaps licensing: dual licensing (GPL open source or commercial closed source) for QP/C and QP/C++, commercial licenses for SafeQP, license types and request form. - [Linear statechart notation](https://www.state-machine.com/linear-statechart-notation.md): 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... - [Make the most of side-by-side code differencing](https://www.state-machine.com/make-the-most-of-side-by-side-code-differencing.md): 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... - [Model-Based Design](https://www.state-machine.com/mbd.md): 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... - [Modern Embedded Programming Podcast](https://www.state-machine.com/modern-embedded-programming-podcast.md): Is it possible to be agile and do modeling, state-machine design and code generation? You bet! Modern event-driven approach with asynchronous active... - [Modern Embedded Programming: Beyond the RTOS](https://www.state-machine.com/beyond-the-rtos.md): An RTOS (Real-Time Operating System) is the most universally accepted way of designing and implementing embedded software. It is the most sought after... - [Modern Embedded Systems Programming Video Course](https://www.state-machine.com/video-course.md): Companion page to the free YouTube video course about programming embedded microcontrollers in C the modern way, taught by Miro Samek: all lessons, project downloads, transcripts and course resources. - [New Quantum Leaps Website](https://www.state-machine.com/new-website.md): 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. - [New Version of QCalc Programmer’s Calculator](https://www.state-machine.com/new-version-of-qcalc-programmers-calculator.md): 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... - [New Videos Explain Finite State Machines](https://www.state-machine.com/new-videos-explain-finite-state-machine.md): The popular “Modern Embedded Programming” video course now contains a segment devoted to state machines. If you really want to understand state machines... - [New Website for 2021](https://www.state-machine.com/news-website-2021.md): 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.... - [NULL pointer protection with ARM Cortex-M MPU](https://www.state-machine.com/null-pointer-protection-with-arm-cortex-m-mpu.md): 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... - [Object-based programming in C](https://www.state-machine.com/object-based-programming-in-c.md): 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... - [Object-Oriented Programming](https://www.state-machine.com/oop.md): 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... - [On the Origin of Software by Means of Artificial Selection](https://www.state-machine.com/on-the-origin-of-software-by-means-of-artificial-selection.md): 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... - [Partners & Resellers](https://www.state-machine.com/partners-resellers.md): The global network of Quantum Leaps partners: product development partners, education providers and resellers, who help companies adopt the QP real-time event frameworks and tools. - [Privacy Policy](https://www.state-machine.com/privacy.md): How Quantum Leaps handles personal information on state-machine.com: no cookies, no tracking, and only the data you send us through our forms or by email. - [Products Overview](https://www.state-machine.com/products.md): Quantum Leaps products: QP and SafeQP real-time event frameworks (RTEFs) for embedded systems, the QM modeling and code-generation tool, and the QTools collection. - [Protothreads versus State Machines](https://www.state-machine.com/protothreads-versus-state-machines.md): 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... - [QM Model-Based Design Tool](https://www.state-machine.com/products/qm.md): QM (QP Modeler) is a freeware model-based design (MBD) and automatic code generation tool for hierarchical state machines (UML statecharts) and the QP real-time event frameworks, for Windows, Linux and macOS. - [QP 7.0.0 Milestone Release](https://www.state-machine.com/qp-7-0-0-milestone-release.md): 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... - [QP and Arduino](https://www.state-machine.com/arduino.md): The Quantum Leaps’ QP™ real-time embedded frameworks (RTEFs) and the QM™ modeling tool complement the Arduino platform and provide everything you need to... - [QP Real-Time Event Frameworks (RTEFs)](https://www.state-machine.com/products/qp.md): QP (Quantum Platform) is a family of real-time event frameworks (RTEFs) that implement the asynchronous, event-driven, non-blocking Active Object (Actor) model for real-time embedded systems such as MCUs. - [QP-bundle 6.9.2 released](https://www.state-machine.com/qp-bundle-6-9-2-released.md): 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... - [QP-bundle 6.9.3 released](https://www.state-machine.com/qp-bundle-6-9-3-released.md): 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... - [QP-bundle 8.1.6 Released](https://www.state-machine.com/qp-bundle-8-1-6-released.md): 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. - [QP/QM Training](https://www.state-machine.com/training.md): 3-day on-site training in modern embedded systems programming with the QP real-time event frameworks and the QM modeling tool: active objects, UML state machines, QP internals, kernels, tracing and unit testing. - [QP™ and POSIX (Linux)](https://www.state-machine.com/posix.md): 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... - [QSPY Sequence Diagram Generation](https://www.state-machine.com/qspy-sequence-diagram-generation.md): 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... - [QTools Collection](https://www.state-machine.com/products/qtools.md): QTools is a collection of open-source host-based tools for the QP frameworks: QP/Spy software tracing, QUTest trace-based testing, QView monitoring, and QWin GUI prototyping, plus GNU tools for Windows. - [Rapid Prototyping with QP and Arduino](https://www.state-machine.com/rapid-prototyping-with-qp-and-arduino.md): Arduino (see arduino.cc) is an open-source electronics prototyping platform, designed to make digital electronics more accessible to non-specialists in... - [Reactive Systems](https://www.state-machine.com/reactive-systems.md): 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](https://www.state-machine.com/rtef.md): A Real-Time Event Framework (RTEF) is an implementation of the Active Object design pattern specifically designed for real-time embedded systems. RTEF... - [RTOS Alternatives](https://www.state-machine.com/rtos-alternatives.md): 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... - [RTOS Considered Harmful](https://www.state-machine.com/rtos-considered-harmful.md): 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... - [RTOS Vendors Won’t Say It, But Blocking Is the Real Problem](https://www.state-machine.com/rtos-vendors-wont-say-it-but-blocking-is-the-real-problem.md): 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... - [RTOS Without Blocking?](https://www.state-machine.com/rtos-without-blocking.md): In my previous post, “RTOS Considered Harmful”, I have identified blocking as the main cause of the particular brittleness and inflexibility of the... - [RTOS, TDD and the “O” in the S-O-L-I-D rules](https://www.state-machine.com/rtos-tdd-and-the-o-in-the-s-o-l-i-d-rules.md): Due to prevalent blocking, RTOS-based designs are generally difficult to reconcile with the Open-Closed Principle. In contrast, event-driven approach is... - [Sequential Programming](https://www.state-machine.com/sequential-programming.md): 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](https://www.state-machine.com/software-tracing.md): Software tracing is a method for obtaining diagnostic information about the embedded software in a live environment without the need to stop the... - [Superloop vs event-driven framework](https://www.state-machine.com/superloop-vs-event-driven-framework.md): 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... - [The Best Christmas Present for a Nerd](https://www.state-machine.com/the-best-christmas-present-for-a-nerd.md): 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... - [Tips for Migrating from Superloop/RTOS to QP Framework](https://www.state-machine.com/tips-for-migrating-from-superloop-rtos-to-qp-framework.md): A developer interested in the QP/C framework has recently posted the following questions on the qpc GitHub repository: For developers transitioning from... - [Turning automatic code generation upside down](https://www.state-machine.com/turning-automatic-code-generation-upside-down.md): 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... - [What Embedded Programs have to do with Hollywood?](https://www.state-machine.com/what-embedded-programs-have-to-do-with-hollywood.md): 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...