Skip to content

Commit 761e075

Browse files
committed
8.1.0
1 parent 0726fd7 commit 761e075

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2493
-1604
lines changed

.gitignore

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
*.qms
2+
*.cov
3+
*.gcov
4+
*.log
25
*.obj
36
*.o
47
*.d
@@ -29,17 +32,37 @@
2932
*.chw
3033
*.sfr
3134
*.ewt
35+
*.csv
3236
*.user
3337
*.avrsuo
3438
*.Debug
3539
*.Release
3640
*.bak
3741
version-*
3842
JLink*.*
43+
*.host
44+
*.trg
45+
46+
dbg/
47+
rel/
48+
spy/
49+
build*/
50+
settings/
51+
.settings/
52+
targetConfigs/
53+
Debug/
54+
Release/
55+
Spy/
56+
QSpy/
57+
58+
lib/
59+
obj/
60+
output/
3961

4062
include/qs.h
4163
include/qs_pkg.h
4264
include/qxk.h
65+
4366
src/qs/qs.c
4467
src/qs/qs_64bit.c
4568
src/qs/qs_fp.c
@@ -49,29 +72,14 @@ src/qxk/qxk.c
4972
src/qxk/qxk_mutex.c
5073
src/qxk/qxk_sema.c
5174
src/qxk/qxk_xthr.c
52-
zephyr/qutest_port.c
5375

5476
ports/arm-cm/qxk/
5577
ports/arm-cm/qutest/
5678
ports/posix-qutest/
5779
ports/win32-qutest/
80+
zephyr/qutest_port.c
5881

59-
priv/
60-
html/
61-
latex/
62-
dbg/
63-
rel/
64-
spy/
65-
build*/
66-
settings/
67-
.settings/
68-
targetConfigs/
69-
70-
Debug/
71-
Release/
72-
Spy/
73-
QSpy/
82+
static-analysis/pclp/
7483

75-
lib/
76-
obj/
77-
output/
84+
tests/TIN*/
85+
tests/TUN*/

3rd_party

Submodule 3rd_party updated 98 files

README.md

Lines changed: 70 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ it is recommended that you clone this repo like that:
1313
git clone https://github.com/QuantumLeaps/qpc --recurse-submodules --depth 1
1414
```
1515

16-
Alternatively, you can also download one of the stable
17-
[QP/C Releases][QP-Rel].
16+
However, the easiest and most recommended way of
17+
[getting started with QP/C](#getting-started-with-qpc) is to download
18+
the QP-bundle, as [described below](#getting-started-with-qpc).
19+
1820

1921
# About QP/C Real-Time Event Framework
2022
QP/C real-time event framework (RTEF) is a lightweight implementation of
@@ -25,56 +27,94 @@ of Active Objects (Actors) and a runtime environment for executing the Active
2527
Objects in a deterministic, real-time fashion. Additionally, QP/C Framework
2628
supports Hierarchical State Machines with which to specify the behavior of
2729
Active Objects [UML 2.5], [Sutter:10], [ROOM:94]. The QP/C Framework can be
28-
viewed as a modern, asynchronous, and truly event driven real-time operating
30+
viewed as a modern, asynchronous, and truly event-driven real-time operating
2931
system (RTOS).
3032

3133
## QP Framework Family
32-
QP/C framework is part of the larger QP family consisting of the following
33-
QP editions:
34+
QP/C framework is part of the larger QP family, consisting of the following
35+
QP editions (please also see [__QP Frameworks Feature Comparison__](https://www.state-machine.com/products/qp#Features)
36+
):
3437

3538
|QP Edition | Language | API | Safety Functions |Certification Artifacts| Licensing
3639
|:----------|:-----------:|:-----------------|:-------------------|:----------------|:---------
37-
| QP/C | C (C11) |same as SafeQP/C |Selected Assertions |Req/Arch/Design | [dual][Lic]
38-
| QP/C++ | C++ (C++17) |same as SafeQP/C++|Selected Assertions |Req/Arch/Design | [dual][Lic]
39-
| SafeQP/C | C (C11) |same as QP/C |All Safety Functions|Extensive<br>Certification Kit| [commercial][Com]
40-
| SafeQP/C++| C++ (C++17) |same as QP/C++ |All Safety Functions|Extensive<br>Certification Kit| [commercial][Com]
40+
| QP/C | C (C11) |same as<br>SafeQP/C |Selected Assertions |Req/Arch/Design | [open-source & commercial][Lic]
41+
| QP/C++ | C++ (C++17) |same as<br>SafeQP/C++|Selected Assertions |Req/Arch/Design | [open-source & commercial][Lic]
42+
| SafeQP/C | C (C11) |same as<br>QP/C |All Safety Functions|[SafeQP/C<br>Certification Kit][CERT-KIT]| [commercial][Com]
43+
| SafeQP/C++| C++ (C++17) |same as<br>QP/C++ |All Safety Functions|[SafeQP/C++<br>Certification Kit][CERT-KIT]| [commercial][Com]
4144

4245
The **SafeQP/C** and **SafeQP/C++** frameworks were originally derived from QP/C and QP/C++,
4346
respectively, but were extensively reengineered for the safety market using compliant
4447
Software Safety Lifecycle (SSL). In this process, the QP framework functional model has been
4548
subjected to a full Hazard and Risk Analysis, which identified all areas of weakness within
46-
the functional model and API. These findings led to creation of Safety Requirements and risk
49+
the functional model and API. These findings led to the creation of Safety Requirements and risk
4750
mitigation by Safety Functions, which were subsequently implemented, verified, and validated.
4851
The SafeQP frameworks are accompanied by the "SafeQP Certification Kits", which provide
4952
developers with ready-to-use artifacts, enabling them to save time, mitigate risk, and reduce
5053
costs during application certification for safety-critical devices in the industrial, medical,
5154
aerospace, and automotive industries. Please [contact Quantum Leaps](#contact-information)
5255
for more information about the SafeQP frameworks and the "Certification Kits".
5356

54-
> **NOTE:** The SafeQP/C edition remain fully API- and functionally compatible with the
57+
> **NOTE:** The SafeQP/C edition remains fully API- and functionally compatible with the
5558
corresponding standard QP/C framework. This ensures existing QP/C Applications can transition
56-
seamlessly to SafeQP/C without requiring any modifications. SafeQP/C edition retain QP/C
57-
Frameworks' hallmark features, including a small memory footprint, excellent efficiency,
58-
and hard real-time functionality.
59+
seamlessly to SafeQP/C without requiring any modifications. SafeQP/C edition retains QP/C
60+
Frameworks' hallmark features: a small memory footprint, excellent efficiency, and hard
61+
real-time performance.
5962

6063

6164
# Getting Started with QP/C
62-
The most recommended way of obtaining QP/C is by downloading the
63-
[QP-bundle](https://www.state-machine.com/#Downloads), which includes QP/C
64-
as well as the [QM modeling tool][QM] and the [QTools collection][QTools].
65-
The main advantage of obtaining QP/C bundled together like that is
66-
that you get all components, tools and examples ready to go.
67-
68-
### Getting Started Resources
69-
- ["QP/C Tutorial"][Tut]
70-
describes a series of progressively advanced QP/C example applications.
71-
65+
The most recommended way to get started with QP/C is by
66+
[__downloading the QP-bundle__](https://www.state-machine.com/#Downloads),
67+
which includes QP/C as well as the [QM modeling tool][QM] and the
68+
[QTools collection][QTools]. The main advantage of obtaining QP/C bundled
69+
together is that you get all components, tools, and _examples_ all ready to go.
70+
71+
> **NOTE:**
72+
Perhaps the most important fact to remember is that in embedded systems,
73+
nothing works until everything works. This means that you should always start
74+
with a _working system_ and gradually evolve it, changing one thing at a time
75+
and making sure that it keeps working every step of the way.
76+
77+
The provided [__QP/C example projects__](examples), such as the super-simple
78+
[Blinky](examples/arm-cm/blinky_nucleo-u545re/), or a bit more advanced
79+
[Dining Philosophers Problem (DPP)](examples/arm-cm/dpp_nucleo-u545re/),
80+
allow you to get started with a __working project__ rather than starting from
81+
scratch. You should also always try one of the unmodified examples on one
82+
of the very inexpensive evaluation boards (such as
83+
[STM32 NUCLEO-U545RE](examples/arm-cm/dpp_nucleo-u545re/stm32-nucleo-u545re.webp))
84+
that it was designed for, _before_ attempting to immediately adapt the projects
85+
to your specific hardware. Only once an example project is built and runs on
86+
the evaluation board, can you use it as a starting point for your specific hardware
87+
and software development.
88+
89+
90+
## Getting Started Resources
7291
- [Video: "Getting Started with QP Real-Time Event Frameworks"][Video]
7392
provides instructions on how to download, install, and get started with QP.
7493

7594
- [AppNote: "Getting Started with QP Real-Time Event Frameworks"][AN]
7695
contains also a tutorial, in which you build a simple "Blinky" application.
7796

97+
- ["QP/C Tutorial"][Tut]
98+
describes a series of progressively advanced QP/C example applications.
99+
100+
## QP/C Extras
101+
The open source GPL distribution of QP/C can be augmented by the
102+
["QP/C Extras"][QPX/C], which provide more advanced QP/C features, such as:
103+
- [QS software tracing][QS] component (QP Spy)
104+
- [QXK real-time kernel][QXK] component
105+
- Static-analysis configuration and automation scripts for PC-Lint-Plus (MISRA-C:2025 compliance)
106+
- Test suite (based on the [QUTest trace-based test harness][QUTest])
107+
that demonstrates 100% lines of code and 100% MC/DC code coverage for QP/C.
108+
109+
> **NOTE:** The ["QP/C Extras"][QPX/C] are [licensed commercially][Lic] only
110+
and available to the commercial licensees with the active Support Term. Please contact
111+
[Quantum Leaps technical support][Sup] to get the matching ["QP/C Extras"][QPX/C]
112+
for the public QP/C version.
113+
114+
> **NOTE:** The ["QP/C Extras"][QPX/C] are also __available for evaluation__
115+
([upon request][ReqForm]).
116+
117+
78118
# Licensing
79119
The QP/C real-time event framework is licensed under the
80120
[dual licensing model](https://www.state-machine.com/licensing), with
@@ -101,21 +141,6 @@ any open source license and you do not violate your policy.
101141
are licensed commercially only.
102142

103143

104-
## Files Removed from the QP/C Open Source GPL Distribution
105-
Due to the widespread non-compliance with the GPL, as well as infringement on the
106-
[dual-licensing model of QP frameworks][Lic], the following QP/C components
107-
have been **removed from the open-source GPL distribution**:
108-
- QS target-resident software tracing component
109-
- QXK dual-mode kernel
110-
111-
> NOTE: These components are available to the [commercial licensees][Cust] with
112-
the active Support Term. Please contact [Quantum Leaps technical support][Sup]
113-
to get the complete QP/C framework distribution.
114-
115-
> **NOTE:** To request **evaluation** of the complete QP/C framework, please contact
116-
Quantum Leaps at: https://www.state-machine.com/contact
117-
118-
119144
# Documentation
120145
The online HTML documentation for the **latest** version of QP/C is located
121146
at: https://www.state-machine.com/qpc
@@ -126,7 +151,7 @@ To view the offline documentation, open the file [html/index.html](html/index.ht
126151
in your web browser.
127152

128153

129-
# Contact Information
154+
# Support & Contact Information
130155
- [Free Support Forum](https://sourceforge.net/p/qpc/discussion/668726)
131156
- [Bug Reports](https://sourceforge.net/p/qpc/bugs/)
132157
- [Feature Requests](https://sourceforge.net/p/qpc/feature-requests/)
@@ -146,11 +171,15 @@ If you like this project, please give it a star (in the upper-right corner of yo
146171
[QP]: <https://www.state-machine.com/products/qp>
147172
[QP/C]: <https://github.com/QuantumLeaps/qpc>
148173
[QP/C++]: <https://github.com/QuantumLeaps/qpcpp>
149-
[Cert]: <https://www.state-machine.com/products/qp#CERT>
174+
[QPX/C]: <https://www.state-machine.com/qpc/gs_extras.html>
175+
[QPX/C++]: <https://www.state-machine.com/qpcpp/gs_extras.html>
176+
[CERT-KIT]: <https://www.state-machine.com/products/qp#CERT-KIT>
150177
[QM]: <https://github.com/QuantumLeaps/qm>
151178
[QTools]: <https://github.com/QuantumLeaps/qtools>
179+
[QUTest]: <https://www.state-machine.com/qtools/qutest.html>
152180
[Lic]: <https://www.state-machine.com/licensing>
153181
[Com]: <https://www.state-machine.com/licensing#Commercial>
182+
[ReqForm]: <https://www.state-machine.com/licensing#RequestForm>
154183
[Cust]: <https://www.state-machine.com/customers>
155184
[Sup]: <mailto:[email protected]>
156185
[AN]: <https://www.state-machine.com/doc/AN_Getting_Started_with_QP.pdf>

examples

Submodule examples updated 277 files

include/README.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

include/qequeue.h

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ struct QEvt; // forward declaration
4646
//============================================================================
4747
//! @class QEQueue
4848
typedef struct QEQueue {
49-
struct QEvt const * volatile frontEvt; //!< @private @memberof QEQueue
50-
struct QEvt const * * ring; //!< @private @memberof QEQueue
51-
QEQueueCtr end; //!< @private @memberof QEQueue
52-
QEQueueCtr volatile head; //!< @private @memberof QEQueue
53-
QEQueueCtr volatile tail; //!< @private @memberof QEQueue
54-
QEQueueCtr volatile nFree; //!< @private @memberof QEQueue
55-
QEQueueCtr nMin; //!< @private @memberof QEQueue
49+
struct QEvt const *frontEvt; //!< @private @memberof QEQueue
50+
struct QEvt const * *ring; //!< @private @memberof QEQueue
51+
QEQueueCtr end; //!< @private @memberof QEQueue
52+
QEQueueCtr head; //!< @private @memberof QEQueue
53+
QEQueueCtr tail; //!< @private @memberof QEQueue
54+
QEQueueCtr nFree; //!< @private @memberof QEQueue
55+
QEQueueCtr nMin; //!< @private @memberof QEQueue
5656
} QEQueue;
5757

5858
//! @public @memberof QEQueue
@@ -76,18 +76,15 @@ struct QEvt const * QEQueue_get(QEQueue * const me,
7676
uint_fast8_t const qsId);
7777

7878
//! @public @memberof QEQueue
79-
static inline QEQueueCtr QEQueue_getNFree(QEQueue const * const me) {
80-
return me->nFree;
81-
}
79+
uint16_t QEQueue_getFree(QEQueue const * const me);
8280

8381
//! @public @memberof QEQueue
84-
static inline QEQueueCtr QEQueue_getNMin(QEQueue const * const me) {
85-
return me->nMin;
86-
}
82+
uint16_t QEQueue_getUse(QEQueue const * const me);
8783

8884
//! @public @memberof QEQueue
89-
static inline bool QEQueue_isEmpty(QEQueue const * const me) {
90-
return me->frontEvt == (struct QEvt *)0;
91-
}
85+
uint16_t QEQueue_getMin(QEQueue const * const me);
86+
87+
//! @public @memberof QEQueue
88+
bool QEQueue_isEmpty(QEQueue const * const me);
9289

9390
#endif // QEQUEUE_H_

0 commit comments

Comments
 (0)