• Stars
    star
    788
  • Rank 57,762 (Top 2 %)
  • Language
    C
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

QP/C Real-Time Embedded Framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines

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 recommened that you clone this repo like that:

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

Alternatively, you can also download the latest QP/C Release.

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

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 is based on the Active Object (actor) design pattern, which inherently supports and automatically enforces the following best practices of concurrent programming:

  • Keep data isolated and bound to active objects' threads. Threads should hide (encapsulate) their private data and other resources, and not share them with the rest of the system.

  • Communicate among active object threads asynchronously via event objects. Using asynchronous events keeps the threads running truly independently, without blocking on each other.

  • Active object threads should spend their lifetime responding to incoming events, so their mainline should consist of an event-loop that handles events one at a time (to completion), thus avoiding any concurrency hazards within an active object thread itself.

This architecture is generally safer, more responsive and easier to understand and maintain than the shared-state concurrency of a conventional RTOS. It also provides higher level of abstraction and the correct abstractions to effectively apply 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 bare-metal single-chip microcontrollers, completely replacing a traditional RTOS. The framework contains a selection of built-in real-time kernels, such as the cooperative QV kernel, the preemptive non-blocking QK kernel, and the preemptive, blocking 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).

Traditional RTOS/OS

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

Popularity and Maturity

With 20 years of continuous development, over 350 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 Licensing

QP/C is licensed under the sustainable dual licensing model, in which both the open source software distribution mechanism and traditional closed source software distribution models are combined.

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.

QP/C Documentation

The online HTML documention 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. 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):

GitHub star

More Repositories

1

modern-embedded-programming-course

Companion repository to the "Modern Embedded Systems Programming" video course.
C
358
star
2

qpcpp

QP/C++ Real-Time Embedded Framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
C++
316
star
3

OOP-in-C

Simple and efficient implementation of OOP in C suitable for real-time embedded systems.
C
159
star
4

qpn

QP-nano real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
C
148
star
5

qtools

QTools collection of open source tools for embedded systems development on Windows, Linux and MacOS
C
113
star
6

Super-Simple-Tasker

Event-driven, preemptive, priority-based, hardware RTOS for ARM Cortex-M.
C
111
star
7

qm

QM model-based design tool and code generator based on UML state machines
Shell
107
star
8

MiROS

MiROS (Minimal Real-Time Operating System) for ARM Cortex-M
C
65
star
9

FreeAct

FreeAct is a minimal Active Object (Actor) framework for FreeRTOS
C
65
star
10

lock-free-ring-buffer

"Lock-Free Ring Buffer" (LFRB) is a minimal, customizable implementation of a ring buffer (a.k.a. circular buffer) in C, specifically suitable for embedded systems.
C
60
star
11

qp-arduino

QP real-time embedded frameworks/RTOS for Arduino (AVR and SAM)
C++
41
star
12

State-Oriented-Programming

State-Oriented Programming: was a cover story article about Hierarchical State Machines in C and C++ published originally in "Embedded Systems Programming" magazine in August 2000. This repository contains the article PDF and the updated code.
C
25
star
13

embedded-coding-style

Embedded C and C++ Coding Style
CSS
14
star
14

Embedded-Test

Embedded Test (ET) -- The Super-Simple Embedded Test
C
8
star
15

DBC-for-embedded-C

Design By Contract (DBC) for embedded C and C++
C
4
star
16

qpc-zephyr-app

Example project and starting point for creating QP/C-Zephyr applications.
C
4
star
17

contributed

Software contributed to the QP framework ecosystem
3
star
18

qpcpp-zephyr-app

Example project and starting point for creating QP/C++-Zephyr applications.
C++
3
star
19

3rd_party

3rd-party code used in the QP/C and QP/C++ examples
C
2
star
20

cmsis-packs

CMSIS packs released by Quantum Leaps
2
star
21

spexygen

Traceable specifications based on Doxygen
CSS
2
star
22

ql-doxygen

Doxygen customization based on doxygen-awesome-css
CSS
2
star
23

spexygen1

Traceable specifications based on Doxygen.
CSS
2
star
24

ET

ET (Embedded Test) -- The Super-Simple Embedded Test
C
1
star
25

.github

Quantum Leaps' profile
1
star