Skip to content

Commit b11c80e

Browse files
committed
7.4.0
1 parent 6056ac6 commit b11c80e

File tree

171 files changed

+5517
-2498
lines changed

Some content is hidden

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

171 files changed

+5517
-2498
lines changed

arm-cm/dpp_efm32-slstk3401a/dpp.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp.qm
44
// File: ${.::dpp.h}
55
//
6-
// This code has been generated by QM 6.1.1 <www.state-machine.com/qm>.
6+
// This code has been generated by QM 6.1.2 <www.state-machine.com/qm>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -74,19 +74,12 @@ typedef struct {
7474
} TableEvt;
7575

7676
// public:
77-
78-
#ifdef QEVT_DYN_CTOR
79-
static inline TableEvt * TableEvt_ctor(TableEvt * const me,
77+
static inline TableEvt * TableEvt_init(TableEvt * const me,
8078
uint8_t id)
8179
{
82-
if (me != (TableEvt *)0) {
83-
// don't call QEvt_ctor() because the initialization of all
84-
// QEvt attributes is already done in QF_newX_()
85-
me->philoId = id;
86-
}
80+
me->philoId = id;
8781
return me;
8882
}
89-
#endif // def QEVT_DYN_CTOR
9083

9184
//${Shared::AO_Philo[N_PHILO]} ...............................................
9285
extern QActive * const AO_Philo[N_PHILO];

arm-cm/dpp_efm32-slstk3401a/dpp.qm

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="6.1.1" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm.xsd">
2+
<model version="6.1.2" links="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.state-machine.com/qm/qm.xsd">
33
<documentation>Dining Philosopher Problem example</documentation>
44
<!--${qpc}-->
55
<framework name="qpc"/>
@@ -39,15 +39,11 @@ QS_SIG_DICTIONARY(HUNGRY_SIG, (void *)0);</code>
3939
<class name="TableEvt" superclass="qpc::QEvt">
4040
<!--${Shared::TableEvt::philoId}-->
4141
<attribute name="philoId" type="uint8_t" visibility="0x00" properties="0x00"/>
42-
<!--${Shared::TableEvt::ctor}-->
43-
<operation name="ctor?def QEVT_DYN_CTOR" type="TableEvt *" visibility="0x00" properties="0x02">
44-
<!--${Shared::TableEvt::ctor::id}-->
42+
<!--${Shared::TableEvt::init}-->
43+
<operation name="init" type="TableEvt *" visibility="0x00" properties="0x02">
44+
<!--${Shared::TableEvt::init::id}-->
4545
<parameter name="id" type="uint8_t"/>
46-
<code>if (me != (TableEvt *)0) {
47-
// don't call QEvt_ctor() because the initialization of all
48-
// QEvt attributes is already done in QF_newX_()
49-
me-&gt;philoId = id;
50-
}
46+
<code>me-&gt;philoId = id;
5147
return me;</code>
5248
</operation>
5349
</class>
@@ -141,7 +137,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)-&gt;philoId != me-&gt;id);</action>
141137
</state>
142138
<!--${AOs::Philo::SM::hungry}-->
143139
<state name="hungry">
144-
<entry>#ifdef QEVT_DYN_CTOR
140+
<entry>#ifdef QEVT_PAR_INIT
145141
TableEvt const *pe = Q_NEW(TableEvt, HUNGRY_SIG, me-&gt;id);
146142
#else
147143
TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
@@ -178,7 +174,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)-&gt;philoId != me-&gt;id);</action>
178174
<entry>QTimeEvt_armX(&amp;me-&gt;timeEvt, eat_time(), 0U);</entry>
179175
<exit>(void)QTimeEvt_disarm(&amp;me-&gt;timeEvt);
180176

181-
#ifdef QEVT_DYN_CTOR
177+
#ifdef QEVT_PAR_INIT
182178
TableEvt const *pe = Q_NEW(TableEvt, DONE_SIG, me-&gt;id);
183179
#else
184180
TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);
@@ -265,7 +261,7 @@ for (uint8_t n = 0U; n &lt; N_PHILO; ++n) {
265261
{
266262
me-&gt;fork[left(n)] = USED;
267263
me-&gt;fork[n] = USED;
268-
#ifdef QEVT_DYN_CTOR
264+
#ifdef QEVT_PAR_INIT
269265
TableEvt const *pe = Q_NEW(TableEvt, EAT_SIG, n);
270266
#else
271267
TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
@@ -290,7 +286,7 @@ uint8_t m = left(n);</action>
290286
<guard brief="both free">(me-&gt;fork[m] == FREE) &amp;&amp; (me-&gt;fork[n] == FREE)</guard>
291287
<action>me-&gt;fork[m] = USED;
292288
me-&gt;fork[n] = USED;
293-
#ifdef QEVT_DYN_CTOR
289+
#ifdef QEVT_PAR_INIT
294290
TableEvt const *pe = Q_NEW(TableEvt, EAT_SIG, n);
295291
#else
296292
TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
@@ -335,7 +331,7 @@ if (me-&gt;isHungry[m] &amp;&amp; (me-&gt;fork[m] == FREE)) {
335331
me-&gt;fork[n] = USED;
336332
me-&gt;fork[m] = USED;
337333
me-&gt;isHungry[m] = false;
338-
#ifdef QEVT_DYN_CTOR
334+
#ifdef QEVT_PAR_INIT
339335
TableEvt const *pe = Q_NEW(TableEvt, EAT_SIG, m);
340336
#else
341337
TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);
@@ -350,7 +346,7 @@ if (me-&gt;isHungry[m] &amp;&amp; (me-&gt;fork[n] == FREE)) {
350346
me-&gt;fork[m] = USED;
351347
me-&gt;fork[n] = USED;
352348
me-&gt;isHungry[m] = false;
353-
#ifdef QEVT_DYN_CTOR
349+
#ifdef QEVT_PAR_INIT
354350
TableEvt const *pe = Q_NEW(TableEvt, EAT_SIG, m);
355351
#else
356352
TableEvt *pe = Q_NEW(TableEvt, EAT_SIG);

arm-cm/dpp_efm32-slstk3401a/philo.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp.qm
44
// File: ${.::philo.c}
55
//
6-
// This code has been generated by QM 6.1.1 <www.state-machine.com/qm>.
6+
// This code has been generated by QM 6.1.2 <www.state-machine.com/qm>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -79,7 +79,6 @@ static inline QTimeEvtCtr eat_time(void) {
7979
#error qpc version 7.3.0 or higher required
8080
#endif
8181
//$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82-
8382
//$define${Shared::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
8483

8584
//${Shared::Philo_ctor} ......................................................
@@ -172,7 +171,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) {
172171
switch (e->sig) {
173172
//${AOs::Philo::SM::hungry}
174173
case Q_ENTRY_SIG: {
175-
#ifdef QEVT_DYN_CTOR
174+
#ifdef QEVT_PAR_INIT
176175
TableEvt const *pe = Q_NEW(TableEvt, HUNGRY_SIG, me->id);
177176
#else
178177
TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
@@ -222,7 +221,7 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) {
222221
case Q_EXIT_SIG: {
223222
(void)QTimeEvt_disarm(&me->timeEvt);
224223

225-
#ifdef QEVT_DYN_CTOR
224+
#ifdef QEVT_PAR_INIT
226225
TableEvt const *pe = Q_NEW(TableEvt, DONE_SIG, me->id);
227226
#else
228227
TableEvt *pe = Q_NEW(TableEvt, DONE_SIG);

arm-cm/dpp_efm32-slstk3401a/qk/bsp.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EFM32-SLSTK3401A board, QK kernel
3-
// Last updated for version 7.3.2
4-
// Last updated on 2023-12-13
3+
// Last updated for version 7.4.0
4+
// Last updated on 2024-06-06
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -91,7 +91,6 @@ Q_NORETURN Q_onError(char const * const module, int_t const id) {
9191
for (;;) {
9292
}
9393
#endif
94-
9594
NVIC_SystemReset();
9695
}
9796
//............................................................................
@@ -140,7 +139,7 @@ void SysTick_Handler(void) {
140139
#ifdef Q_SPY
141140
tmp = SysTick->CTRL; // clear CTRL_COUNTFLAG
142141
QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
143-
#endif
142+
#endif // Q_SPY
144143

145144
QK_ISR_EXIT(); // inform QK about exiting an ISR
146145
}
@@ -151,7 +150,7 @@ void GPIO_EVEN_IRQHandler(void) { // for testing, NOTE03
151150
QK_ISR_ENTRY(); // inform QK about entering an ISR
152151

153152
// for testing...
154-
#ifdef QEVT_DYN_CTOR
153+
#ifdef QEVT_PAR_INIT
155154
QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG, QEVT_DYNAMIC),
156155
&l_GPIO_EVEN_IRQHandler);
157156
#else
@@ -496,7 +495,7 @@ void QS_onFlush(void) {
496495
if (b != QS_EOD) {
497496
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
498497
}
499-
l_USART0->TXDATA = (uint8_t)b;
498+
l_USART0->TXDATA = b;
500499
}
501500
else {
502501
break;

arm-cm/dpp_efm32-slstk3401a/qp_config.h

Lines changed: 179 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// QP configuration file example
3-
// Last updated for version: 7.3.0
4-
// Last updated on: 2023-09-07
3+
// Last updated for version: 7.4.0
4+
// Last updated on: 2024-06-06
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -32,12 +32,184 @@
3232
#ifndef QP_CONFIG_H_
3333
#define QP_CONFIG_H_
3434

35-
// NOTE:
36-
// The QP configuration takes effect only when the macro QP_CONFIG
37-
// is defined on the command-line to the compiler for all QP source files.
35+
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
3836

39-
// use event constructors for dynamic events
40-
#define QEVT_DYN_CTOR
37+
// <n>NOTE: Requires command-line macro: QP_CONFIG
38+
// <i>This qp_config.h header file is activated only when the macro
39+
// <i>QP_CONFIG is defined on the command-line to the compiler
40+
// <n>-------------------------------------------
41+
42+
// <o>QP API compatibility version (QP_API_VERSION)
43+
// <0=> 0 (Maximum compatibility)
44+
// <580=>580 (QP 5.8.0 or newer)
45+
// <660=>660 (QP 6.6.0 or newer)
46+
// <691=>691 (QP 6.9.1 or newer)
47+
// <700=>700 (QP 7.0.0 or newer)
48+
// <9999=>9999 (Latest only)
49+
// <i>QP API backwards compatibility with the QP/C API version.
50+
// <i>Lower QP_API_VERSION values enable backwards compatibility
51+
// <i>with lower (older) QP API versions.
52+
// <i>For example, QP_API_VERSION==691 will enable the compatibility
53+
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
54+
// <i>QP_API_VERSION==0 enables the maximum currently supported
55+
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
56+
// <i>that no backwards compatibility layer should be enabled.
57+
// <i>Default: 0 (All supported)
58+
#define QP_API_VERSION 0
59+
60+
//..........................................................................
61+
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
62+
// <i>The QP FuSa Subsystem consists of the following facilities:
63+
// <i>- Software assertions as a recommended technique
64+
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
65+
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
66+
// <i> * Duplicate Inverse Storage for critical variables
67+
// <i> * Memory Markers for critical objects (e.g., events)
68+
// <i> * Hard-limits for all loops
69+
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
70+
71+
// <c3>Disable QP FuSa in development
72+
// <i>Disable assertions and other self monitoring features
73+
// <i>in development build configurations (NDEBUG undefined).
74+
// <i>VIOLATES functional safety standards. NOT recommended !!!
75+
//#ifndef NDEBUG
76+
//#define Q_UNSAFE
77+
//#endif
78+
// </c>
79+
80+
// <c3>Disable QP FuSa in production release
81+
// <i>Disable assertions and other self monitoring features
82+
// <i>in the release build configurations (NDEBUG defined).
83+
// <i>VIOLATES functional safety standards. NOT recommended !!!
84+
//#ifdef NDEBUG
85+
//#define Q_UNSAFE
86+
//#endif
87+
// </c>
88+
89+
// </h>
90+
91+
//..........................................................................
92+
// <h>QEP Event Processor
93+
// <i>Events and state machines.
94+
95+
// <o>Event signal size (Q_SIGNAL_SIZE)
96+
// <1U=>1
97+
// <2U=>2 (default)
98+
// <4U=>4
99+
// <i>Size of the QEvt signal for QEP/QF [bytes]
100+
// <i>Default: 2
101+
#define Q_SIGNAL_SIZE 2U
102+
103+
// </h>
104+
105+
//..........................................................................
106+
// <h>QF Framework
107+
// <i>Active Object framework
108+
109+
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
110+
// <i>Maximum # Active Objects in the system <1..64>
111+
// <i>Default: 32
112+
#define QF_MAX_ACTIVE 32U
113+
114+
// <o>Maximum # event pools (QF_MAX_EPOOL)
115+
// <0=>0 no event pools
116+
// <1=>1 <2=>2 <3=>3 (default) <4=>4 <5=>5
117+
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
118+
// <12=>12 <13=>13 <14=>14 <15=>15
119+
// <i>Maximum # Event Pools <1..15>
120+
// <i>Default: 3
121+
#define QF_MAX_EPOOL 3U
122+
123+
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
124+
// <0=>0 no time events
125+
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
126+
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
127+
// <12=>12 <13=>13 <14=>14 <15=>15
128+
// <i>Maximum # clock tick rates for time events <1..15>
129+
// <i>Default: 1
130+
#define QF_MAX_TICK_RATE 1U
131+
132+
// <c1>Event parameter initialization (QEVT_PAR_INIT)
133+
// <i>Resource Acquisition Is Initialization (RAII) for dynamic events
134+
#define QEVT_PAR_INIT
135+
// </c>
136+
137+
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
138+
// <i>Enable Active Object stop API (Not recommended)
139+
//#define QACTIVE_CAN_STOP
140+
// </c>
141+
142+
// <o>Event size (QF_EVENT_SIZ_SIZE)
143+
// <1U=>1
144+
// <2U=>2 (default)
145+
// <4U=>4
146+
// <i>Size of the dynamic events for QF [bytes]
147+
// <i>Default: 2 (64K bytes maximum event size)
148+
#define QF_EVENT_SIZ_SIZE 2U
149+
150+
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
151+
// <1U=>1
152+
// <2U=>2
153+
// <4U=>4 (default)
154+
// <i>Size of the QTimeEvt counter [bytes]
155+
// <i>Default: 4 (2^32 dynamic range)
156+
#define QF_TIMEEVT_CTR_SIZE 4U
157+
158+
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
159+
// <1U=>1 (default)
160+
// <2U=>2
161+
// <4U=>4
162+
// <i>Size of event queue counter [bytes]
163+
// <i>Default: 1 (255 events maximum in a queue)
164+
#define QF_EQUEUE_CTR_SIZE 1U
165+
166+
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
167+
// <1U=>1
168+
// <2U=>2 (default)
169+
// <4U=>4
170+
// <i>Size of memory pool counter [bytes]
171+
// <i>Default: 2 (64K blocks maximum in a pool)
172+
#define QF_MPOOL_CTR_SIZE 2U
173+
174+
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
175+
// <1U=>1
176+
// <2U=>2 (default)
177+
// <4U=>4
178+
// <i>Size of memory pool block [bytes]
179+
// <i>Default: 2 (64K bytes maximum block size)
180+
#define QF_MPOOL_SIZ_SIZE 2U
181+
182+
// </h>
183+
184+
//..........................................................................
185+
// <h>QS Software Tracing
186+
// <i>Target-resident component of QP/Spy software tracing system
187+
// <i>(tracing instrumentation and command-input).
188+
189+
// <n>NOTE: Requires command-line macro: Q_SPY
190+
// <i>The QS software tracing instrumentation is activated only when
191+
// <i>the macro Q_SPY is defined on the command-line to the compiler.
192+
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
193+
194+
// <o>QS timestamp size (QS_TIME_SIZE)
195+
// <1U=>1
196+
// <2U=>2
197+
// <4U=>4 (default)
198+
// <i>Size of the timestamp in QS [bytes]
199+
// <i>Default: 4 (2^32 dynamic range)
200+
#define QS_TIME_SIZE 4U
201+
202+
// <o>QS buffer counter size (QS_CTR_SIZE)
203+
// <1U=>1
204+
// <2U=>2 (default)
205+
// <4U=>4
206+
// <i>Size of the counter in the internal QS buffer [bytes]
207+
// <i>Default: 2 (64K bytes in QS buffer)
208+
#define QS_CTR_SIZE 2U
209+
210+
// </h>
211+
212+
//------------- <<< end of configuration section >>> -----------------------
41213

42214
// for QK kernel:
43215
// use the FPUEH_IRQHandler() with IRQ number 33

0 commit comments

Comments
 (0)