Skip to content

Commit 3027a37

Browse files
committed
7.0.2
1 parent 2b9d784 commit 3027a37

Some content is hidden

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

43 files changed

+532
-227
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
*.so
22
*.so.*
3+
*.exe
4+
*.dmg
35
qm
46
qmc
57

68
html/
79
latex/
8-
win64/bin/
9-
linux64/bin
10+
windows/bin/
11+
linux/bin
1012
macos/bin/

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ the file `html/index.html` in your web browser.
2121
QM (QP Modeler) is a freeware graphical modeling tool for designing and
2222
implementing real-time embedded software based on the UML state machines
2323
and the lightweight
24-
[QP Real-Time Embedded Frameworks (RTEFs)](https://www.state-machine.com/products/qp).
24+
[QP Real-Time Event Frameworks (RTEFs)](https://www.state-machine.com/products/qp).
2525
QM is available for Windows (x64), Linux (x64), and macOS (ARM64).
2626

2727
> NOTE: For more information, please refer to the online QM Manual at:
@@ -86,8 +86,27 @@ chmod u+x qm.sh
8686
```
8787

8888
> NOTE: To run the QM application on Linux, you need to run the
89-
`qm/bin/qm.sh` script. Make sure that the file has executable permissions.
89+
`qm/bin/qm.sh` script as well as the `qm/bin/qm` executable. Make sure
90+
that both files have executable permissions.
9091

92+
#### Troubleshooting QM on Linux
93+
> NOTE: Some Linux distributions (e.g., Ubuntu) might report problems
94+
with missing Qt plugins. For example, if you launch `qm/bin/qm.sh` form a
95+
terminal, you might get the following output:
96+
97+
```
98+
qt.qpa.plugin: Could not load the Qt platform plugin "wayland"...
99+
100+
or
101+
102+
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found...
103+
```
104+
105+
One know solution to fix this issue is to install the following:
106+
107+
```sh
108+
sudo apt install libxcb-cursor0
109+
```
91110

92111
### Installing QM on macOS (ARM64)
93112
Go to the [QM releases](https://github.com/QuantumLeaps/qm/releases) and

linux/Resources/qpc/blinky_console.qm

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="7.0.0" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm7.xsd">
2+
<model version="7.0.1" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm7.xsd">
33
<documentation>About this example:
44
-------------------
55
Simple &quot;Blinky&quot; console application for workstations (Windows, Linux, MacOS)
@@ -101,6 +101,15 @@ BSP_TICKS_PER_SEC/2, BSP_TICKS_PER_SEC/2);</action>
101101
</package>
102102
<!--${.}-->
103103
<directory name=".">
104+
<!--${.::qp_config.h}-->
105+
<file name="qp_config.h">
106+
<text>#ifndef QP_CONFIG_H_
107+
#define QP_CONFIG_H_
108+
109+
// put here macros that override the default QP/C settings
110+
111+
#endif // QP_CONFIG_H_</text>
112+
</file>
104113
<!--${.::bsp.h}-->
105114
<file name="bsp.h">
106115
<text>#ifndef BSP_H_
@@ -125,6 +134,10 @@ $declare ${Shared}
125134
#include &lt;stdio.h&gt; // for printf()/fprintf()
126135
#include &lt;stdlib.h&gt; // for exit()
127136

137+
#if (QP_VERSION &lt; 800U)
138+
#error this application requires qpc version 8.0.0 or higher
139+
#endif
140+
128141
//............................................................................
129142
void BSP_init(void) {
130143
printf(&quot;Simple Blinky example\n&quot;
@@ -145,7 +158,7 @@ void BSP_start(void) {
145158

146159
static QEvt const *blinkyQueueSto[10];
147160
Blinky_ctor();
148-
QACTIVE_START(AO_Blinky,
161+
QActive_start(AO_Blinky,
149162
1U, // QP prio. of the AO
150163
blinkyQueueSto, // event queue storage
151164
Q_DIM(blinkyQueueSto), // queue length [events]
@@ -161,7 +174,7 @@ void BSP_ledOn(void) { printf(&quot;LED ON\n&quot;); }
161174
void QF_onStartup(void) {}
162175
void QF_onCleanup(void) {}
163176
void QF_onClockTick(void) {
164-
QF_TICK_X(0U, (void *)0); // QF clock tick processing for rate 0
177+
QTIMEEVT_TICK_X(0U, (void *)0); // clock tick processing for rate 0
165178
}
166179
void Q_onError(char const * const module, int id) {
167180
fprintf(stderr, &quot;Assertion failed in %s:%d&quot;, module, id);
@@ -182,14 +195,14 @@ $define ${AOs::Blinky}</text>
182195
</file>
183196
<!--${.::main.c}-->
184197
<file name="main.c">
185-
<text>#include &quot;qpc.h&quot; // QP/C real-time embedded framework
186-
#include &quot;bsp.h&quot; // Board Support Package
198+
<text>#include &quot;qpc.h&quot; // QP/C real-time embedded framework
199+
#include &quot;bsp.h&quot; // Board Support Package
187200

188201
//............................................................................
189202
int main() {
190203
QF_init(); // initialize the framework and the underlying RT kernel
191204
BSP_init(); // initialize the BSP
192-
BSP_start(); // start the AOs/Threads
205+
BSP_start(); // start the Active Objects
193206
return QF_run(); // run the QF application
194207
}</text>
195208
</file>

linux/Resources/qpc/blinky_console.qms

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<session version="7.0.0">
2+
<session version="7.0.1">
3+
<item name="license">GPL</item>
34
<group name="locked"/>
45
<group name="settings">
56
<item name="tabs">1</item>
@@ -8,27 +9,29 @@
89
<item name="backups">0</item>
910
</group>
1011
<group name="windows">
11-
<item id="AOs::Blinky::SM">0,0,692,843,*</item>
12+
<item id="AOs::Blinky::SM">0,0,610,590,*</item>
1213
</group>
1314
<group name="search">
1415
<item name="options">2032128</item>
1516
<item name="replace">0</item>
1617
</group>
17-
<group name="vars"/>
18+
<group name="vars">
19+
<item id="QPC">c:\qp\qpc</item>
20+
</group>
1821
<group name="tools">
1922
<group name="tool">
2023
<item name="icon">0</item>
21-
<item name="title"></item>
22-
<item name="command"></item>
24+
<item name="title">make</item>
25+
<item name="command">make</item>
2326
<item name="args"></item>
2427
<item name="dir"></item>
25-
<item name="options">0</item>
28+
<item name="options">3</item>
2629
</group>
2730
<group name="tool">
28-
<item name="icon">0</item>
29-
<item name="title"></item>
30-
<item name="command"></item>
31-
<item name="args"></item>
31+
<item name="icon">3</item>
32+
<item name="title">clean</item>
33+
<item name="command">make</item>
34+
<item name="args">clean</item>
3235
<item name="dir"></item>
3336
<item name="options">0</item>
3437
</group>

linux/Resources/qpc/dpp_console.qm

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="7.0.0" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm7.xsd">
2+
<model version="7.0.1" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm7.xsd">
33
<documentation>About this example:
44
-------------------
55
Dining Philosopher Problem console application for workstations
@@ -461,6 +461,18 @@ me-&gt;fork[n] = FREE;</action>
461461
</package>
462462
<!--${.}-->
463463
<directory name=".">
464+
<!--${.::qp_config.h}-->
465+
<file name="qp_config.h">
466+
<text>#ifndef QP_CONFIG_H_
467+
#define QP_CONFIG_H_
468+
469+
// put here macros that override the default QP/C settings
470+
471+
// Activate the QF console access
472+
#define QF_CONSOLE
473+
474+
#endif // QP_CONFIG_H_</text>
475+
</file>
464476
<!--${.::bsp.h}-->
465477
<file name="bsp.h">
466478
<text>#ifndef BSP_H_
@@ -494,6 +506,10 @@ void BSP_ledOff(void);
494506

495507
//Q_DEFINE_THIS_FILE
496508

509+
#if (QP_VERSION &lt; 800U)
510+
#error this application requires qpc version 8.0.0 or higher
511+
#endif
512+
497513
// local variables -----------------------------------------------------------
498514
static uint32_t l_rnd; // random seed
499515

@@ -561,7 +577,7 @@ void BSP_start(void) {
561577
static QEvt const *philoQueueSto[N_PHILO][10];
562578
for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
563579
Philo_ctor(n);
564-
QACTIVE_START(AO_Philo[n],
580+
QActive_start(AO_Philo[n],
565581
n + 3U, // QP prio. of the AO
566582
philoQueueSto[n], // event queue storage
567583
Q_DIM(philoQueueSto[n]), // queue length [events]
@@ -571,7 +587,7 @@ void BSP_start(void) {
571587

572588
static QEvt const *tableQueueSto[N_PHILO];
573589
Table_ctor();
574-
QACTIVE_START(AO_Table,
590+
QActive_start(AO_Table,
575591
N_PHILO + 7U, // QP prio. of the AO
576592
tableQueueSto, // event queue storage
577593
Q_DIM(tableQueueSto), // queue length [events]
@@ -621,7 +637,7 @@ void QF_onCleanup(void) {
621637
}
622638
//............................................................................
623639
void QF_onClockTick(void) {
624-
QF_TICK_X(0U, &amp;l_clock_tick); // perform the QF clock tick processing
640+
QTIMEEVT_TICK_X(0U, &amp;l_clock_tick); // perform clock tick processing
625641

626642
QS_RX_INPUT(); // handle the QS-RX input
627643
QS_OUTPUT(); // handle the QS output
@@ -632,11 +648,11 @@ void QF_onClockTick(void) {
632648
break;
633649
}
634650
case 'p': {
635-
QF_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &amp;l_clock_tick);
651+
QACTIVE_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &amp;l_clock_tick);
636652
break;
637653
}
638654
case 's': {
639-
QF_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &amp;l_clock_tick);
655+
QACTIVE_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &amp;l_clock_tick);
640656
break;
641657
}
642658
default: {

linux/Resources/qpc/dpp_console.qms

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<session version="7.0.0">
2+
<session version="7.0.1">
3+
<item name="license">GPL</item>
34
<group name="locked"/>
45
<group name="settings">
56
<item name="tabs">1</item>
@@ -8,10 +9,10 @@
89
<item name="backups">0</item>
910
</group>
1011
<group name="windows">
11-
<item id="AOs::Philo::SM">0,0,632,843,*</item>
12-
<item id="AOs::Table::SM">0,387,640,480</item>
12+
<item id="AOs::Philo::SM">0,0,610,590,*</item>
13+
<item id="AOs::Table::SM">-30,134,640,480</item>
1314
<item id=".::philo.c">0,0,674,300</item>
14-
<item id=".::table.c">0,300,674,300</item>
15+
<item id=".::table.c">0,314,674,300</item>
1516
</group>
1617
<group name="search">
1718
<item name="options">2032128</item>
@@ -22,19 +23,19 @@
2223
</group>
2324
<group name="tools">
2425
<group name="tool">
25-
<item name="icon">2</item>
26+
<item name="icon">0</item>
2627
<item name="title">make</item>
2728
<item name="command">make</item>
2829
<item name="args"></item>
29-
<item name="dir">.</item>
30+
<item name="dir"></item>
3031
<item name="options">1</item>
3132
</group>
3233
<group name="tool">
3334
<item name="icon">3</item>
3435
<item name="title">clean</item>
3536
<item name="command">make</item>
3637
<item name="args">clean</item>
37-
<item name="dir">.</item>
38+
<item name="dir"></item>
3839
<item name="options">0</item>
3940
</group>
4041
<group name="tool">

linux/Resources/qpc/dpp_nucleo-c031c6.qm

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="7.0.0" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm7.xsd">
2+
<model version="7.0.1" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm7.xsd">
33
<documentation>About this example:
44
-------------------
55
Dining Philosopher Problem for STM32 NUCLEO-C031C6 board
@@ -460,6 +460,15 @@ me-&gt;fork[n] = FREE;</action>
460460
</package>
461461
<!--${.}-->
462462
<directory name=".">
463+
<!--${.::qp_config.h}-->
464+
<file name="qp_config.h">
465+
<text>#ifndef QP_CONFIG_H_
466+
#define QP_CONFIG_H_
467+
468+
// put here macros that override the default QP/C settings
469+
470+
#endif // QP_CONFIG_H_</text>
471+
</file>
463472
<!--${.::bsp.h}-->
464473
<file name="bsp.h">
465474
<text>#ifndef BSP_H_
@@ -492,6 +501,10 @@ void BSP_ledOff(void);
492501

493502
Q_DEFINE_THIS_FILE // define the name of this file for assertions
494503

504+
#if (QP_VERSION &lt; 800U)
505+
#error this application requires qpc version 8.0.0 or higher
506+
#endif
507+
495508
// Local-scope defines -----------------------------------------------------
496509
// LED pins available on the board (just one user LED LD4--Green on PA.5)
497510
#define LD4_PIN 5U
@@ -1111,8 +1124,7 @@ QP_PORT_DIR := $(QPC)/ports/arm-cm/qk/gnu
11111124

11121125
# list of all source directories used by this project
11131126
VPATH = \
1114-
.. \
1115-
../.. \
1127+
. \
11161128
$(QPC)/src/qf \
11171129
$(QPC)/src/qk \
11181130
$(QPC)/src/qs \
@@ -1122,7 +1134,7 @@ VPATH = \
11221134

11231135
# list of all include directories needed by this project
11241136
INCLUDES = \
1125-
-I../.. \
1137+
-I. \
11261138
-I$(QPC)/include \
11271139
-I$(QP_PORT_DIR) \
11281140
-I$(QPC)/3rd_party/CMSIS/Include \

0 commit comments

Comments
 (0)