QP-nano is Quantum Leaps’ ultra-lightweight, event-driven state-machine framework for very small bare-metal microcontrollers. It combines hierarchical UML state machines, active objects, event queues and optional cooperative or preemptive kernels in a footprint intended for 8- and 16-bit devices with less than 1 KB of RAM. Quantum Leaps currently says QP-nano is being phased out and is not recommended for new product development, so it is mainly a fit for maintaining or extending an existing design.
What QP-nano is
QP-nano is a framework for building concurrent embedded behavior as asynchronous, event-driven active objects. Each active object owns a state machine and processes one event at a time to completion, rather than sharing a large collection of interrupt flags and ad-hoc global variables.
It is designed to replace a conventional superloop or a full real-time operating system on extremely small MCUs. The framework is part of Quantum Leaps’ QP family, alongside QP/C and QP/C++.
Framework or RTOS?
QP-nano is best described as a state-machine and active-object framework, not a general-purpose RTOS. Its QF-nano layer supplies event-driven active objects, queues and time events; QV-nano supplies cooperative scheduling; and QK-nano supplies a small preemptive, non-blocking kernel. The scheduling choice is therefore inside the framework, but the programming model remains event-driven run-to-completion state machines rather than threads that block on arbitrary operations.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Support LWIP protocol, Freertos
- SupportThree Modes: AP, STA, and AP+STA
- Ultra-Low power consumption, Compatible with Arduino IDE
- ESP32 is a safe, reliable, and scalable to a variety of applications
How the QP-nano architecture works
QEP-nano: hierarchical event processing
QEP-nano is the UML-compliant event processor. It implements hierarchical state machines in ANSI C, with each state-machine element represented in readable code. Quantum Leaps associates this one-to-one mapping with traceability and MISRA-compliant development: a designer can relate a transition or state in the model to a specific C implementation.
QF-nano: active objects and events
QF-nano is the portable framework layer. Active objects communicate by posting or directly passing events, and each object has an event queue and an execution context. This separates independent behaviors, such as input handling, communication and control, without requiring shared-state coordination for every interaction.
QV-nano and QK-nano: two scheduling options
| Component | Scheduling model | When it fits |
|---|---|---|
| QV-nano | Cooperative kernel | Tasks are short, non-blocking run-to-completion steps and deterministic hand-offs are preferred. |
| QK-nano | Preemptive, non-blocking kernel | Higher-priority active objects must be able to preempt lower-priority work without using blocking task primitives. |
Both options rely on event-driven processing. A handler should finish quickly; lengthy work is normally divided into additional events or state transitions rather than performed as a blocking call.
Rank #2
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
- SupportThree Modes: AP, STA, and AP+STA
- Ultra-Low power consumption, Compatible with Arduino IDE
- 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters
Hierarchical state machines
States can be nested under superstates. A substate inherits behavior such as common entry handling or event reactions from its superstate, so shared behavior is written once. This reduces the transition explosion that occurs when a flat finite-state machine repeats the same reactions in every state.
Which microcontrollers can run QP-nano?
The intended targets are low-end 8- and 16-bit bare-metal parts, including AVRmega, MSP430 and 8051 families. The practical dividing line in Quantum Leaps’ overview is available RAM: QP-nano is aimed at systems with very limited memory, especially below 1 KB of RAM; when an MCU has more than 1 KB of RAM, the overview points developers toward QP/C instead.
That rule is a selection guideline, not a universal technical cutoff. Actual feasibility still depends on compiler options, application objects, queue sizes, interrupt usage and the amount of state data your product needs.
Rank #3
- Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
- Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
- Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
- Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
- Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.
Footprint expectations
Quantum Leaps’ application note gives an approximate QP-nano footprint of 1–2 KB of code and several bytes of RAM. This is a vendor engineering figure from the cited application note, not an independent benchmark; treat it as an order-of-magnitude planning value until you measure your exact build.
QP-nano compared with common alternatives
| Dimension | Hand-written superloop | QP-nano | QP/C | Conventional RTOS |
|---|---|---|---|---|
| Typical hardware target | Any MCU; often chosen for the smallest devices | 8-/16-bit MCUs with very limited RAM | MCUs with more than 1 KB of RAM, according to the official selection guidance | Depends on the RTOS; specific target range not stated |
| Execution model | Application-defined polling and interrupt logic | Active objects processing events to completion | QP-family active-object and state-machine model | Usually tasks and synchronization primitives; implementation varies |
| Scheduling choices | Usually cooperative polling | QV-nano cooperative or QK-nano preemptive, both non-blocking | Not stated in the supplied product information | Depends on the RTOS |
| Hierarchical UML state machines | Only if implemented by the team | Built in through QEP-nano | Part of the QP family’s state-machine approach | Not inherent; normally supplied by an application library or tool |
| Events, queues and time services | Must be designed and maintained by the application | Framework facilities for event queues, direct event passing and event-driven time events | Framework facilities are available in the QP family; exact footprint is not stated | Usually supplied, with API and memory cost varying by product |
| Traceability and generated code | Depends on coding practice | Readable ANSI C mapped to state-machine elements; QM can generate code | QP tooling and modeling support | Depends on the RTOS and development tools |
| Desktop development | Application-specific | Linux and Windows emulation supports testing substantial portions away from the target | Not stated for this comparison | Depends on the RTOS and port |
| Lifecycle status | Controlled by your codebase | Being phased out by Quantum Leaps | Current QP family alternative identified by Quantum Leaps | Depends on vendor and project |
When a superloop is enough
A superloop can be the simpler choice when there are only a few short activities, timing is straightforward, and the team can keep polling and interrupt interactions understandable. QP-nano becomes more valuable when several independent behaviors need explicit ownership, queued events, timeouts and reusable state behavior.
When a conventional RTOS is justified
A conventional RTOS may be appropriate when the product needs thread-oriented APIs, blocking drivers, richer synchronization or capabilities outside QP-nano’s deliberately small event-driven model. Those benefits generally come with a larger and more configurable platform; the supplied QP-nano footprint figure should not be used to estimate an RTOS.
Rank #4
- High-performance foundation line, ARM Cortex-M4 core with DSP and FPU, 512 Kbytes Flash, 180 MHz CPU, ART Accelerator, Dual QSPI
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
- Can be powered from USB
- Three LEDs, Two Push-buttons
- Support of wide choice of Integrated Development Environments (IDEs) including IAR, ARM Keil, GCC-based IDEs
Modeling, code generation and testing
Hand-written or generated C and C++
State machines can be coded manually in C or C++, or generated from Quantum Leaps’ free graphical QM modeling tool. Generation is useful when a design contains many transitions and nested states because it keeps the model and implementation aligned and makes the state-machine structure reviewable.
Desktop emulation
QP-nano supports emulation on Linux and Windows, allowing substantial portions of embedded behavior to be exercised before the target board is available. Hardware-specific drivers and timing still require target testing, but event logic, state transitions and many application rules can be validated on a desktop.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Licensing and project implications
QP-nano uses Quantum Leaps’ dual-licensing approach, combining an open-source distribution with traditional closed-source licensing. Teams should read the license that applies to their distribution and product, especially when modifying framework code or shipping proprietary firmware.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- with pre-soldered header Raspberry Pi Pico. RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
- Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz. 264KB of SRAM, and 2MB of on-board Flash memory.
- Castellated module allows soldering direct to carrier boards. USB 1.1 with device and host support. Low-power sleep and dormant modes. Drag-and-drop programming using mass storage over USB. 26 × multi-function GPIO pins.
- 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels.Accurate clock and timer on-chip.Temperature sensor.
- Accelerated floating-point libraries on-chip.8 × Programmable I/O (PIO) state machines for custom peripheral support
The framework has a long history: Quantum Leaps describes more than 15 years of continuous development, about 60,000 downloads per year and use in millions of products worldwide. Those figures are company-stated, and the page does not specify a year for them. They indicate adoption history, not a promise of future QP-nano feature development.
Should you use QP-nano for a new product?
For a new design, the prudent default is no. Quantum Leaps’ current overview explicitly says QP-nano is being phased out and is not recommended for new product development. Starting a new product on a retiring framework increases the risk that future maintenance, tool support, ports and security review will be harder than with the current QP/C family or another actively maintained platform.
Cases where QP-nano can still make sense
- You are maintaining an existing product that already uses QP-nano and need compatible fixes or features.
- The target is an unusually constrained 8- or 16-bit MCU, the existing team has QP-nano expertise, and migration cost is higher than the product’s remaining life.
- You need to reproduce or extend a qualified legacy implementation whose state-machine traceability is already part of the project evidence.
Questions to answer before adopting it for legacy work
- Can you obtain the exact QP-nano source, QM model files and compiler configuration used by the existing build?
- Do the required MCU port, documentation and development tools remain available to your team?
- Have you measured code, RAM, queue and stack margins on the production compiler and optimization settings?
- Is there a documented migration path to QP/C or another maintained framework if the hardware is redesigned?
- Does your licensing arrangement cover internal modifications and redistribution of the resulting firmware?
Learning resource
For a detailed treatment of the design method behind QP frameworks, Quantum Leaps names Practical UML Statecharts in C/C++, 2nd Edition as its companion book. It is the most directly relevant starting point for learning hierarchical statechart design, active objects and event-driven embedded architecture; verify the current retailer listing and availability before purchasing.
Bottom line
QP-nano is a compact, disciplined alternative to a hand-built superloop for tiny MCUs: it supplies hierarchical state machines, active objects, event queues, time events and either cooperative or preemptive non-blocking scheduling. Its strongest fit is an existing, memory-constrained 8- or 16-bit design. Because Quantum Leaps is phasing it out, new products should normally evaluate QP/C or another maintained framework instead.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

