Overview of QP-nano™
QP-nano™ is the smallest member of the QP™ product family. QP-nano™ is an ultra-lightweight alternative to a traditional real-time kernel or RTOS specifically designed for low-end 8- and 16-bit embedded microcontrollers (MCUs), such as AVR, MSP430, 8051, PICmicro, 68HC(S)08, M16C, and many others. QP-nano™ enables parallel execution of multiple hierarchical state machines, which communicate by sending and receiving lightweight events. Typically, QP-nano™ requires around than 1-2KB of ROM and just a few bytes of RAM per state machine.

Most of QP™ is written in portable ANSI-C, with microprocessor-specific and compiler-specific code kept to a minimum for ease of portability.
QP™ includes a simple non-preemptive scheduler as well as fully-preemptive real-time kernel (QK-nano) to provide preemptive multitasking capabilities (requires more stack space). QP™ is very compact, typically taking about 1-2KB of code space (depending on the code density of the target processor) and only several bytes of RAM (not including the stack). QP™ can be used in microcontrollers with 100 bytes of RAM and a few KB of ROM. If you can program your application in C at all, you most likely can afford QP™.
The core components of QP™ are available under the dual-licensing model, that is, under the open source license (GPL) and also under flexible, royalty-free commercial licenses designed for customers who want to retain the proprietary status of their code and implementations.
Top of pageFeatures
Full support for hierarchical state nesting.
Guaranteed entry/exit action execution on arbitrary state transition topology with up to 4 levels of state nesting.
Full support of nested initial transitions.
Highly maintainable boilerplate state machine representation in C code that is very easy to modify and extend at any stage of the development cycle.
Extremely small RAM/ROM footprint. A state machine instance in QEP-nano requires only one function pointer and an event in RAM (altogether typically 4 bytes). The hierarchical state ma-chine code takes about 700-900 bytes of code space while the simpler “flat” finite state ma-chine takes only about 60 bytes of code space (ROM). QF-nano requires typically around 500 bytes of ROM and just a few bytes of RAM. Of course, you must also budget some RAM for the C stack.
No RAM required for representing states and transitions—number of states limited only by the code space (ROM).
Provisions in the code for placing constants in code space (ROM).
Support for events with one scalar parameter, configurable to 0 (no parameter), 8, 16, or 32-bits.
Support for up to 8 concurrently executing state machines (active objects)
Built-in cooperative, priority-based scheduler for Run-To-Completion (RTC) execution of active objects.
Configurable for fully preemptive multitasking kernel (QK-nano) (requires more stack than the non-preemptive option)
Idle-time callback for implementing power-saving modes.
One single-shot time event (timer) per active object with configurable tick-counter dynamic range: 0 (no timer), 8, 16, or 32-bits
Comprehensive documentation.
Development kits for various MCUs and compilers available online.
Royalty-free licensing model and commercial support contracts
Top of page
Version: March 24, 2007




