Skip to content

Commit 72a8700

Browse files
author
QL
committed
6.8.0
1 parent 9c6d90a commit 72a8700

Some content is hidden

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

59 files changed

+2032
-1970
lines changed

libraries/qpcpp_sam/examples/blinky/blinky.ino

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky.qm
44
// File: ${.::blinky.ino}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -109,8 +109,13 @@ void QV::onIdle(void) { // called with interrupts DISABLED
109109
#endif
110110
}
111111
//............................................................................
112-
extern "C" void Q_onAssert(char const * const module, int loc) {
113-
// implement the error-handling policy for your application!!!
112+
extern "C" Q_NORETURN Q_onAssert(char const * const module, int location) {
113+
//
114+
// NOTE: add here your application-specific error handling
115+
//
116+
(void)module;
117+
(void)location;
118+
114119
QF_INT_DISABLE(); // disable all interrupts
115120
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on
116121
for (;;) { // sit in an endless loop for now
@@ -139,8 +144,8 @@ protected:
139144
//.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140145
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
141146
//. Check for the minimum required QP version
142-
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
143-
#error qpcpp version 6.5.0 or higher required
147+
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
148+
#error qpcpp version 6.7.0 or higher required
144149
#endif
145150
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146151
//.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/examples/blinky/blinky.qm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="4.6.0" links="0">
2+
<model version="5.0.0" links="0">
33
<documentation>This is the simple Blinky example for the Arduino DUE board. The example demonstrates:
44

55
1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)
@@ -158,8 +158,13 @@ void QV::onIdle(void) { // called with interrupts DISABLED
158158
#endif
159159
}
160160
//............................................................................
161-
extern &quot;C&quot; void Q_onAssert(char const * const module, int loc) {
162-
// implement the error-handling policy for your application!!!
161+
extern &quot;C&quot; Q_NORETURN Q_onAssert(char const * const module, int location) {
162+
//
163+
// NOTE: add here your application-specific error handling
164+
//
165+
(void)module;
166+
(void)location;
167+
163168
QF_INT_DISABLE(); // disable all interrupts
164169
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on
165170
for (;;) { // sit in an endless loop for now

libraries/qpcpp_sam/examples/blinky_bsp/blinky.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::blinky.hpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/blinky_bsp/blinky_bsp.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::blinky_bsp.ino}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -62,8 +62,8 @@ protected:
6262
//.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6363
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
6464
//. Check for the minimum required QP version
65-
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
66-
#error qpcpp version 6.5.0 or higher required
65+
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
66+
#error qpcpp version 6.7.0 or higher required
6767
#endif
6868
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6969
//.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/examples/blinky_bsp/blinky_bsp.qm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="4.6.0" links="0">
2+
<model version="5.0.0" links="0">
33
<documentation>This is a little more advanced Blinky example for the Arduino DUE board. The example demonstrates:
44

55
1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)
@@ -167,8 +167,13 @@ void QV::onIdle(void) { // called with interrupts DISABLED
167167
#endif
168168
}
169169
//............................................................................
170-
extern &quot;C&quot; void Q_onAssert(char const * const module, int loc) {
171-
// implement the error-handling policy for your application!!!
170+
extern &quot;C&quot; Q_NORETURN Q_onAssert(char const * const module, int location) {
171+
//
172+
// NOTE: add here your application-specific error handling
173+
//
174+
(void)module;
175+
(void)location;
176+
172177
QF_INT_DISABLE(); // disable all interrupts
173178
BSP::ledOn(); // trun the LED on
174179
for (;;) { // sit in an endless loop for now

libraries/qpcpp_sam/examples/blinky_bsp/bsp.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::bsp.cpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -100,8 +100,13 @@ void QV::onIdle(void) { // called with interrupts DISABLED
100100
#endif
101101
}
102102
//............................................................................
103-
extern "C" void Q_onAssert(char const * const module, int loc) {
104-
// implement the error-handling policy for your application!!!
103+
extern "C" Q_NORETURN Q_onAssert(char const * const module, int location) {
104+
//
105+
// NOTE: add here your application-specific error handling
106+
//
107+
(void)module;
108+
(void)location;
109+
105110
QF_INT_DISABLE(); // disable all interrupts
106111
BSP::ledOn(); // trun the LED on
107112
for (;;) { // sit in an endless loop for now

libraries/qpcpp_sam/examples/blinky_bsp/bsp.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: blinky_bsp.qm
44
// File: ${.::bsp.hpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/bsp.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::bsp.cpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -161,8 +161,13 @@ void QV::onIdle(void) { // called with interrupts DISABLED
161161
#endif
162162
}
163163
//............................................................................
164-
extern "C" void Q_onAssert(char const * const module, int loc) {
165-
// implement the error-handling policy for your application!!!
164+
extern "C" Q_NORETURN Q_onAssert(char const * const module, int location) {
165+
//
166+
// NOTE: add here your application-specific error handling
167+
//
168+
(void)module;
169+
(void)location;
170+
166171
QF_INT_DISABLE(); // disable all interrupts
167172
BSP::ledOn(); // trun the LED on
168173
for (;;) { // sit in an endless loop for now

libraries/qpcpp_sam/examples/dpp_bsp/bsp.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::bsp.hpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/dpp.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::dpp.hpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/dpp_bsp.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::dpp_bsp.ino}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or

libraries/qpcpp_sam/examples/dpp_bsp/dpp_bsp.qm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="4.6.0" links="1">
2+
<model version="5.0.0" links="1">
33
<documentation>This is the Dining Philosopher Problem (DPP) example for the Arduino-DUE board. The example demonstrates:
44

55
1. Multiple active objects (5 Philosophers and 1 Table AO)
@@ -619,8 +619,13 @@ void QV::onIdle(void) { // called with interrupts DISABLED
619619
#endif
620620
}
621621
//............................................................................
622-
extern &quot;C&quot; void Q_onAssert(char const * const module, int loc) {
623-
// implement the error-handling policy for your application!!!
622+
extern &quot;C&quot; Q_NORETURN Q_onAssert(char const * const module, int location) {
623+
//
624+
// NOTE: add here your application-specific error handling
625+
//
626+
(void)module;
627+
(void)location;
628+
624629
QF_INT_DISABLE(); // disable all interrupts
625630
BSP::ledOn(); // trun the LED on
626631
for (;;) { // sit in an endless loop for now

libraries/qpcpp_sam/examples/dpp_bsp/philo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::philo.cpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -46,8 +46,8 @@ class Philo : public QP::QActive {
4646
// generate definition of the opaque pointer to the AO -----------------------
4747
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4848
//. Check for the minimum required QP version
49-
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
50-
#error qpcpp version 6.5.0 or higher required
49+
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
50+
#error qpcpp version 6.7.0 or higher required
5151
#endif
5252
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5353
//.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/examples/dpp_bsp/table.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Model: dpp_bsp.qm
44
// File: ${.::table.cpp}
55
//
6-
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
6+
// This code has been generated by QM 5.0.0 <www.state-machine.com/qm/>.
77
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
88
//
99
// This program is open source software: you can redistribute it and/or
@@ -47,8 +47,8 @@ class Table : public QP::QActive {
4747
// generate definition of the opaque pointer to the AO -----------------------
4848
//.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
4949
//. Check for the minimum required QP version
50-
#if (QP_VERSION < 650U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
51-
#error qpcpp version 6.5.0 or higher required
50+
#if (QP_VERSION < 670U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
51+
#error qpcpp version 6.7.0 or higher required
5252
#endif
5353
//.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5454
//.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

libraries/qpcpp_sam/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=QP-C++
2-
version=6.7.0
2+
version=6.8.0
33
author=Quantum Leaps
44
maintainer=Quantum Leaps <info@state-machine.com>
55
sentence=QP/C++ Real-Time Embedded Framework for Arduino.

libraries/qpcpp_sam/src/qassert.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
* @brief Customizable and memory-efficient assertions for embedded systems
44
* @cond
55
******************************************************************************
6-
* Last updated for version 6.6.0
7-
* Last updated on 2019-07-30
6+
* Last updated for version 6.8.0
7+
* Last updated on 2020-03-03
88
*
99
* Q u a n t u m L e a P s
1010
* ------------------------
1111
* Modern Embedded Software
1212
*
13-
* Copyright (C) 2005-2019 Quantum Leaps, LLC. All rights reserved.
13+
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
1414
*
1515
* This program is open source software: you can redistribute it and/or
1616
* modify it under the terms of the GNU General Public License as published
@@ -134,7 +134,7 @@
134134
* with the #Q_NASSERT switch.
135135
*/
136136
#define Q_ASSERT(test_) ((test_) \
137-
? (void)0 : Q_onAssert(&Q_this_module_[0], (int_t)__LINE__))
137+
? (void)0 : Q_onAssert(&Q_this_module_[0], __LINE__))
138138

139139
/*! General purpose assertion with user-specified assertion-id. */
140140
/**
@@ -153,7 +153,7 @@
153153
* disabled with the #Q_NASSERT switch.
154154
*/
155155
#define Q_ASSERT_ID(id_, test_) ((test_) \
156-
? (void)0 : Q_onAssert(&Q_this_module_[0], (int_t)(id_)))
156+
? (void)0 : Q_onAssert(&Q_this_module_[0], (id_)))
157157

158158
/*! General purpose assertion that __always__ evaluates the @p test_
159159
* expression. */
@@ -193,7 +193,7 @@
193193
* @note Does noting if assertions are disabled with the #Q_NASSERT switch.
194194
*/
195195
#define Q_ERROR() \
196-
Q_onAssert(&Q_this_module_[0], (int_t)__LINE__)
196+
Q_onAssert(&Q_this_module_[0], __LINE__)
197197

198198
/*! Assertion with user-specified assertion-id for a wrong path. */
199199
/**
@@ -209,14 +209,20 @@
209209
* @note Does noting if assertions are disabled with the #Q_NASSERT switch.
210210
*/
211211
#define Q_ERROR_ID(id_) \
212-
Q_onAssert(&Q_this_module_[0], (int_t)(id_))
212+
Q_onAssert(&Q_this_module_[0], (id_))
213213

214214
#endif /* Q_NASSERT */
215215

216+
/****************************************************************************/
216217
#ifdef __cplusplus
217218
extern "C" {
218219
#endif
219220

221+
#ifndef Q_NORETURN
222+
/*! no-return function specifier */
223+
#define Q_NORETURN void
224+
#endif /* Q_NORETURN */
225+
220226
/*! Callback function invoked in case of any assertion failure. */
221227
/**
222228
* @description
@@ -225,7 +231,7 @@
225231
*
226232
* @param[in] module name of the file/module in which the assertion failed
227233
* (constant, zero-terminated C string)
228-
* @param[in] loc location of the assertion within the module. This could
234+
* @param[in] location location of the assertion within the module. This could
229235
* be a line number or a user-specified ID-number.
230236
*
231237
* @note This callback function should _not_ return, as continuation after
@@ -245,7 +251,7 @@
245251
* #Q_ERROR, #Q_ALLEGE as well as #Q_ASSERT_ID, #Q_REQUIRE_ID, #Q_ENSURE_ID,
246252
* #Q_ERROR_ID, and #Q_ALLEGE_ID.
247253
*/
248-
void Q_onAssert(char_t const * const module, int_t location);
254+
Q_NORETURN Q_onAssert(char_t const * const module, int_t const location);
249255

250256
#ifdef __cplusplus
251257
}

0 commit comments

Comments
 (0)