QuantumLeaps / qpc

QP/C Real-Time Embedded Framework/RTOS is a lightweight implementation of the Active Object (Actor) model of computation for real-time embedded systems.
https://www.state-machine.com/products/qp
990 stars 248 forks source link
active-object actor actor-model arm arm-cortex-m arm-cortex-m0 arm-cortex-m3 arm-cortex-m4 arm-cortex-m7 embedded embedded-c event-driven framework hierarchical-state-machine qp rtos samek state-machine statechart uml-state-machine

QP Framework

What's New?

GitHub release (latest by date)

View QP/C Revision History at: https://www.state-machine.com/qpc/history.html

NOTE: If you're interested in the latest QP/C version from GitHub, it is recommended that you clone this repo like that:

git clone https://github.com/QuantumLeaps/qpc --recurse-submodules --depth 1

Alternatively, you can also download one of the stable QP/C Releases.

Getting Started with QP/C

The most recommended way of obtaining QP/C is by downloading the QP-bundle, which includes QP/C as well as the QM modeling tool and the QTools collection. The main advantage of obtaining QP/C bundled together like that is that you get all components, tools and examples ready to go.

Getting Started Resources

Licensing

The QP/C real-time embedded framework is licensed under the dual licensing model, with the following licensing options:

  1. Open-source licensing under the GNU General Public License (GPLv3).

NOTE: The GPL requires that all modifications to the original code as well as your application code (Derivative Works as defined in the Copyright Law) must also be released under the terms of the GPL open source license.

  1. Closed-source licensing under one of Quantum Leaps commercial licenses, which are specifically designed for users interested in retaining the proprietary status of their code.

NOTE: If your company has a policy forbidding open source in your product, all QP frameworks can be licensed commercially, in which case you don't use any open source license and you do not violate your policy.

Files Removed from the QP/C Open Source GPL Distribution

Due to the widespread non-compliance with the GPL, as well as infringement on the dual-licensing model of QP frameworks, the following QP/C components have been removed from the open-source GPL distribution:

NOTE: These components are available to the commercial licensees with the active Support Term. Please contact Quantum Leaps technical support to get the complete QP/C framework distribution.

NOTE: To request evaluation of the complete QP/C framework, please contact Quantum Leaps at: https://www.state-machine.com/contact

About QP/C

QP/C (Quantum Platform in C) is a lightweight, open source Real-Time Embedded Framework (RTEF) for building modern embedded software as systems of asynchronous, event-driven Active Objects (actors). The QP/C framework is a member of a QP family consisting of QP/C and QP/C++ frameworks, which are strictly quality controlled, thoroughly documented, and commercially licensable.

Safer Model of Concurrency

The QP framework family implements the Active Object model of computation, which is inherently safer than the traditional "shared state concurrency" based on explicit mutual exclusion and managing RTOS threads by blocking. The Active Object model supports and automatically enforces the following best practices of concurrent programming:

This architecture also provides higher level of abstraction and the correct abstractions to effectively apply Hierarchical State Machines, modeling and code generation to deeply embedded real-time systems.

Hierarchical State Machines

The behavior of Active Objects is specified in QP/C by means of Hierarchical State Machines (UML statecharts). The framework supports manual coding of UML state machines in C as well as automatic code generation by means of the free QM modeling tool.

Built-in Real-Time Kernels

The QP/C framework can run on standalone on single-chip microcontrollers, without any traditional RTOS. The framework contains a selection of built-in real-time kernels, such as the non-preemptive QV kernel, the preemptive non-blocking QK kernel, and the preemptive, dual-mode QXK kernel that provides all the features you might expect from a traditional RTOS. Native QP ports and ready-to-use examples are provided for major CPUs, such as ARM Cortex-M (M0/M0+/M3/M4/M7/M23/M33/...).

Traditional RTOS/OS

QP/C can also work with a traditional RTOS, such as ThreadX, embOS, FreeRTOS, uC/OS-II and Zephyr, as well as with (embedded) Linux (POSIX) and Windows.

Popularity and Maturity

With 20 years of continuous development, 400+ commercial licensees, and many times more open source users worldwide, the QP frameworks are the most popular such offering on the market. They power countless electronic products ranging from implantable medical devices to complex weapon systems.

QP/C Documentation

The online HTML documentation for the latest version of QP/C is located at: https://www.state-machine.com/qpc

The offline HTML documentation for this particular version of QP/C is located in the sub-folder html (included in the QP/C releases). To view the offline documentation, open the file html/index.html in your web browser.

How to Get Help?

How to Help this Project?

If you like this project, please give it a star (in the upper-right corner of your browser window):