MMS 2023-11-02 12:59:50 -04:00
parent c4713d1b48
commit f33182acf2
280 changed files with 29163 additions and 13853 deletions

@ -1 +1 @@
Subproject commit de077b869b8980d124d9df3e5f7327500e28f178
Subproject commit 90b36151b30c5e4b1cf8fa2ab7862568a75806e9

19
LICENSES/License.txt Normal file
View File

@ -0,0 +1,19 @@
Quantum Leaps Dual-Licensing:
The QP/C Real-Time Embedded Framework is dually-licensed under
the following two alternatives:
1. Open source GNU General Public License (GPL)
version 3, or alternatively,
2. One of the closed source Quantum Leaps commercial licenses.
The terms of the open source GNU General Public License version 3
can be found at: https://www.gnu.org/licenses/gpl-3.0
The terms of the closed source Quantum Leaps commercial licenses
can be found at: https://www.state-machine.com/licensing
Redistributions in source code must retain the top-level comment blocks
in all files. Plagiarizing this software to sidestep the license
obligations is illegal.

View File

@ -1,293 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="1.7.27" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.27/schema/PACK.xsd">
<vendor>QuantumLeaps</vendor>
<name>qpc</name>
<description>QP/C Real-Time Embedded Framework</description>
<url>https://github.com/QuantumLeaps/qpc/releases/download/v7.3.0/</url>
<supportContact>info@state-machine.com.com</supportContact>
<repository type="git">https://github.com/QuantumLeaps/qpc.git</repository>
<changeLogs>
<changelog id="all" default="true" name="https://www.state-machine.com/history.html#qpc_7_3_0"/>
</changeLogs>
<license>LICENSES/License.txt</license>
<licenseSets>
<licenseSet id="all" default="true" gating="true">
<license name="LICENSES/GPL-3.0-or-later.txt" title="General Public License version 3"/>
<license name="LICENSES/LicenseRef-QL-commercial.txt" title="Quantum Leaps Commercial Licenses"/>
</licenseSet>
</licenseSets>
<releases>
<release version="7.3.0" date="2023-09-12" url="https://github.com/QuantumLeaps/qpc/releases/download/v7.3.0/QuantumLeaps.qpc.7.3.0.pack" tag="v7.3.0">QP/C 7.3.0. See release notes at https://www.state-machine.com/history.html#qpc_7_3_0</release>
</releases>
<keywords>
<keyword>Quantum Leaps</keyword>
<keyword>QP/C</keyword>
<keyword>qpc</keyword>
<keyword>Miro Samek</keyword>
<keyword>FSM</keyword>
<keyword>HSM</keyword>
<keyword>UML</keyword>
<keyword>safety critical</keyword>
<keyword>state machine</keyword>
<keyword>hierarchical state machine</keyword>
<keyword>Active Object</keyword>
<keyword>Real-Time Embedded Framework</keyword>
<keyword>Actor Framework</keyword>
<keyword>IEC 61508</keyword>
</keywords>
<conditions>
<!-- compilers -->
<condition id="ARMCC">
<accept Tcompiler="ARMCC"/>
</condition>
<condition id="GCC">
<require Tcompiler="GCC"/>
</condition>
<condition id="IAR">
<require Tcompiler="IAR"/>
</condition>
<!-- core-M -->
<condition id="CoreM">
<description>Cortex-M processor based device</description>
<accept Dcore="Cortex-M0"/>
<accept Dcore="Cortex-M0+"/>
<accept Dcore="SC000"/>
<accept Dcore="Cortex-M3"/>
<accept Dcore="SC300"/>
<accept Dcore="Cortex-M4"/>
<accept Dcore="Cortex-M7"/>
<accept Dcore="Cortex-M23"/>
<accept Dcore="Cortex-M33"/>
<accept Dcore="Cortex-M55"/>
<accept Dcore="Cortex-M85"/>
</condition>
<!-- core-R -->
<condition id="CoreR">
<description>Cortex-R processor based device</description>
<accept Dcore="Cortex-R4"/>
</condition>
<condition id="CoreM_ARMCC">
<description>Cortex-M processor based device for the ARM Compiler6</description>
<require condition="CoreM"/>
<require condition="ARMCC"/>
</condition>
<condition id="CoreM_GCC">
<description>Cortex-M processor based device for the GNU-ARM</description>
<require condition="CoreM"/>
<require condition="GCC"/>
</condition>
<condition id="CoreM_IAR">
<description>Cortex-M processor based device for the IAR-ARM</description>
<require condition="CoreM"/>
<require condition="IAR"/>
</condition>
<!--
<condition id="CoreR_ARMCC">
<description>Cortex-R processor based device for the ARM Compiler6</description>
<require condition="CoreR"/>
<require condition="ARMCC"/>
</condition>
-->
<condition id="CoreR_GCC">
<description>Cortex-R processor based device for the GNU-ARM</description>
<require condition="CoreR"/>
<require condition="GCC"/>
</condition>
<condition id="CoreR_IAR">
<description>Cortex-R processor based device for the IAR-ARM</description>
<require condition="CoreR"/>
<require condition="IAR"/>
</condition>
</conditions>
<components>
<bundle Cclass="RTEF" Cbundle="Quantum Leaps QP/C" Cversion="7.3.0">
<description>QP/C Real-Time Embedded Framework</description>
<doc>https://www.state-machine.com/</doc>
<component Cgroup="Event Processor" Cvariant="qep">
<description>Events and QHsm state machine strategy</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/srs_sm.html"/>
<file category="include" name="include/"/>
<file category="source" name="src/qf/qep_hsm.c"/>
<file category="source" name="src/qf/qep_msm.c"/>
</files>
</component>
<component Cgroup="Framework" Cvariant="qf">
<description>Active-Object Framework</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/srs_ao.html"/>
<file category="source" name="src/qf/qf_act.c"/>
<file category="source" name="src/qf/qf_defer.c"/>
<file category="source" name="src/qf/qf_dyn.c"/>
<file category="source" name="src/qf/qf_mem.c"/>
<file category="source" name="src/qf/qf_ps.c"/>
<file category="source" name="src/qf/qf_qact.c"/>
<file category="source" name="src/qf/qf_qeq.c"/>
<file category="source" name="src/qf/qf_qmact.c"/>
<file category="source" name="src/qf/qf_time.c"/>
</files>
</component>
<component Cgroup="Software tracing" Cvariant="qs">
<description>Software tracing (target-resident component)</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/srs_qs.html"/>
<file category="source" name="src/qs/qs.c"/>
<file category="source" name="src/qs/qs_64bit.c"/>
<file category="source" name="src/qs/qs_fp.c"/>
<file category="source" name="src/qs/qs_rx.c"/>
<file category="source" name="src/qs/qstamp.c"/>
<file category="source" name="src/qs/qutest.c"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="qv">
<description>Cooperative run-to-completion kernel</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/srs_qv.html"/>
<file category="source" name="src/qf/qf_actq.c"/>
<file category="source" name="src/qv/qv.c"/>
<file category="header" condition="CoreM" attr="config" version="7.3.0" name="ports/arm-cm/qv/config/qp_config.h"/>
<file category="include" condition="CoreM_ARMCC" name="ports/arm-cm/qv/armclang/"/>
<file category="source" condition="CoreM_ARMCC" name="ports/arm-cm/qv/armclang/qv_port.c"/>
<file category="include" condition="CoreM_GCC" name="ports/arm-cm/qv/gnu/"/>
<file category="source" condition="CoreM_GCC" name="ports/arm-cm/qv/gnu/qv_port.c"/>
<file category="include" condition="CoreM_IAR" name="ports/arm-cm/qv/iar/"/>
<file category="source" condition="CoreM_IAR" name="ports/arm-cm/qv/iar/qv_port.c"/>
<!--
<file category="include" condition="CoreR_ARMCC" name="ports/arm-cr/qv/armclang/"/>
-->
<file category="header " condition="CoreR" attr="config" version="7.3.0" name="ports/arm-cr/qv/config/qp_config.h"/>
<file category="include" condition="CoreR_GCC" name="ports/arm-cr/qv/gnu/"/>
<file category="include" condition="CoreR_IAR" name="ports/arm-cr/qv/iar/"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="qk" isDefaultVariant="true">
<description>Preemptive non-blocking kernel</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/srs_qk.html"/>
<file category="source" name="src/qf/qf_actq.c"/>
<file category="source" name="src/qk/qk.c"/>
<file category="header" condition="CoreM" attr="config" version="7.3.0" name="ports/arm-cm/qk/config/qp_config.h"/>
<file category="include" condition="CoreM_ARMCC" name="ports/arm-cm/qk/armclang/"/>
<file category="source" condition="CoreM_ARMCC" name="ports/arm-cm/qk/armclang/qk_port.c"/>
<file category="include" condition="CoreM_GCC" name="ports/arm-cm/qk/gnu/"/>
<file category="source" condition="CoreM_GCC" name="ports/arm-cm/qk/gnu/qk_port.c"/>
<file category="include" condition="CoreM_IAR" name="ports/arm-cm/qk/iar/"/>
<file category="source" condition="CoreM_IAR" name="ports/arm-cm/qk/iar/qk_port.c"/>
<!--
<file category="include" condition="CoreR_ARMCC" name="ports/arm-cr/qk/armclang/"/>
-->
<file category="header " condition="CoreR" attr="config" version="7.3.0" name="ports/arm-cr/qk/config/qp_config.h"/>
<file category="include" condition="CoreR_GCC" name="ports/arm-cr/qk/gnu/"/>
<file category="include" condition="CoreR_IAR" name="ports/arm-cr/qk/iar/"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="qxk" condition="CoreM">
<description>Preemptive blocking/non-blocking kernel</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/srs_qxk.html"/>
<file category="source" name="src/qf/qf_actq.c"/>
<file category="source" name="src/qxk/qxk.c"/>
<file category="source" name="src/qxk/qxk_mutex.c"/>
<file category="source" name="src/qxk/qxk_sema.c"/>
<file category="source" name="src/qxk/qxk_xthr.c"/>
<file category="header" condition="CoreM" attr="config" version="7.3.0" name="ports/arm-cm/qxk/config/qp_config.h"/>
<file category="include" condition="CoreM_ARMCC" name="ports/arm-cm/qxk/armclang/"/>
<file category="source" condition="CoreM_ARMCC" name="ports/arm-cm/qxk/armclang/qxk_port.c"/>
<file category="include" condition="CoreM_GCC" name="ports/arm-cm/qxk/gnu/"/>
<file category="source" condition="CoreM_GCC" name="ports/arm-cm/qxk/gnu/qxk_port.c"/>
<file category="include" condition="CoreM_IAR" name="ports/arm-cm/qxk/iar/"/>
<file category="source" condition="CoreM_IAR" name="ports/arm-cm/qxk/iar/qxk_port.c"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="third-party embOS">
<description>QP/C port to SEGGER embOS RTOS</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/embos.html"/>
<file category="header" attr="config" version="7.3.0" name="ports/config/qp_config.h"/>
<file category="include" name="ports/embos/"/>
<file category="source" name="ports/embos/qf_port.c"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="third-party FreeRTOS">
<description>QP/C port to Amazon FreeRTOS</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/freertos.html"/>
<file category="header" attr="config" version="7.3.0" name="ports/config/qp_config.h"/>
<file category="include" name="ports/freertos/"/>
<file category="source" name="ports/freertos/qf_port.c"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="third-party ThreadX">
<description>QP/C port to Azure RTOS (ThreadX)</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/threadx.html"/>
<file category="header" attr="config" version="7.3.0" name="ports/config/qp_config.h"/>
<file category="include" name="ports/threadx/"/>
<file category="source" name="ports/threadx/qf_port.c"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="third-party uC-OS2">
<description>QP/C port to Micrium uC-OS2 RTOS</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/uc-os2.html"/>
<file category="header" attr="config" version="7.3.0" name="ports/config/qp_config.h"/>
<file category="include" name="ports/uc-os2/"/>
<file category="source" name="ports/uc-os2/qf_port.c"/>
</files>
</component>
<component Cgroup="Real-Time Kernel" Cvariant="third-party Zephyr">
<description>QP/C port to Zephyr RTOS</description>
<files>
<file category="doc" name="https://www.state-machine.com/qpc/zephyr.html"/>
<file category="header" attr="config" version="7.3.0" name="ports/config/qp_config.h"/>
<file category="include" name="zephyr/"/>
<file category="source" name="zephyr/qf_port.c"/>
</files>
</component>
</bundle>
</components>
</package>

View File

@ -1,53 +0,0 @@
> **NOTE**
This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers.
# Blinky-Button on NUCLEO-L053R8
This example implements the "Blinky-Button" application on the STM32 NUCLEO-L053R8 board (ARM Cortex-M0+). The example demonstrates various preemption scenarios (after pressing the User Button) in the preemptive **QK kernel**. The example requires a *logic analyzer*.
<p align="center">
<img src="./stm32-nucleo-l053r8.jpg"/><br>
<b>STM32 NUCLEO-L053R8</b>
</p>
## Features Demonstrated
<p align="center">
<img src="./blinky-button_trace.png"/><br>
<b>Logic analyzer trace after pressing the button</b>
</p>
- preemptive run-to-completion QK kernel
+ with ARM-KEIL toolchain
## Build Configurations
- Debug
- Release
- Spy - NOT provided
# Code Organization
```
examples\arm-cm\blinky_button_nucleo-l053r8
|
+---qk // preemptive QK kernel
| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG)
| | bb-qk.uvprojx // uVision project
|
```
# Builing the example
### ARM/KEIL MDK
- Open the provided KEIL uVision project (`bb-qk.uvprojx`)
in Keil uVision IDE. Build/Debug/Download to the board from the IDE.
# Connecting a Logic Analyzer
The NUCLEO-L053R8 needs to be conntected to a logic analyzer as shown in the following picture:
<p align="center">
<img src="./blinky-button_conn.png"/><br>
<b>Connecting the NUCLEO-L053R8 to a logic analyzer</b>
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

View File

@ -1,103 +0,0 @@
//============================================================================
// QP/C Example
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C API
#include "bsp.h" // Board Support Package interface
#include "blinky_button.h" // application shared interface
Q_DEFINE_THIS_MODULE("blinky1") // for DBC assertions in this module
//............................................................................
typedef struct { // Blinky task
QActive super; // inherit QActive
QTimeEvt te; // time event for generating TIMEOUT events
uint16_t toggles; // number of toggles to perform for TIMEOUT event
} Blinky1;
static void Blinky1_ctor(Blinky1 * const me);
static QState Blinky1_initial(Blinky1 * const me, QEvt const * const ie);
static QState Blinky1_active(Blinky1 * const me, QEvt const * const e);
//............................................................................
static Blinky1 Blinky1_inst; // the Blinky instance
QActive * const AO_Blinky1 = &Blinky1_inst.super; // opaque AO pointer
void Blinky1_instantiate(void) {
Blinky1_ctor(&Blinky1_inst);
}
//............................................................................
static void Blinky1_ctor(Blinky1 * const me) {
QActive_ctor(
&me->super,
Q_STATE_CAST(&Blinky1_initial));
QTimeEvt_ctorX(&me->te, &me->super, TIMEOUT_SIG, 0U);
}
//............................................................................
static QState Blinky1_initial(Blinky1 * const me, QEvt const * const e) {
// the initial event must be provided and must be WORKLOAD_SIG
Q_REQUIRE_ID(300,
(e != (QEvt const *)0) && (e->sig == BLINKY_WORK_SIG));
QTimeEvt_armX(&me->te,
Q_EVT_CAST(BlinkyWorkEvt)->ticks,
Q_EVT_CAST(BlinkyWorkEvt)->ticks);
me->toggles = Q_EVT_CAST(BlinkyWorkEvt)->toggles;
return Q_TRAN(&Blinky1_active);
}
//............................................................................
static QState Blinky1_active(Blinky1 * const me, QEvt const * const e) {
QState status_;
switch (e->sig) {
case TIMEOUT_SIG: {
for (uint16_t i = me->toggles; i > 0U; --i) {
BSP_d5on();
BSP_d5off();
}
status_ = Q_HANDLED();
break;
}
case BLINKY_WORK_SIG: {
BSP_d5on();
QTimeEvt_disarm(&me->te);
QTimeEvt_armX(&me->te,
Q_EVT_CAST(BlinkyWorkEvt)->ticks,
Q_EVT_CAST(BlinkyWorkEvt)->ticks);
me->toggles = Q_EVT_CAST(BlinkyWorkEvt)->toggles;
status_ = Q_HANDLED();
BSP_d5off();
break;
}
default: {
status_ = Q_SUPER(&QHsm_top);
break;
}
}
return status_;
}

View File

@ -1,103 +0,0 @@
//============================================================================
// QP/C Example
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C API
#include "bsp.h" // Board Support Package interface
#include "blinky_button.h" // application shared interface
Q_DEFINE_THIS_MODULE("blinky3") // for DBC assertions in this module
//............................................................................
typedef struct { // Blinky3 task
QActive super; // inherit QActive
QTimeEvt te; // time event for generating TIMEOUT events
uint16_t toggles; // number of toggles to perform for TIMEOUT event
} Blinky3;
static void Blinky3_ctor(Blinky3 * const me);
static QState Blinky3_initial(Blinky3 * const me, QEvt const * const ie);
static QState Blinky3_active(Blinky3 * const me, QEvt const * const e);
//............................................................................
static Blinky3 Blinky3_inst; // the Blinky3 instance
QActive * const AO_Blinky3 = &Blinky3_inst.super; // opaque AO pointer
void Blinky3_instantiate(void) {
Blinky3_ctor(&Blinky3_inst);
}
//............................................................................
static void Blinky3_ctor(Blinky3 * const me) {
QActive_ctor(
&me->super,
Q_STATE_CAST(&Blinky3_initial));
QTimeEvt_ctorX(&me->te, &me->super, TIMEOUT_SIG, 0U);
}
//............................................................................
static QState Blinky3_initial(Blinky3 * const me, QEvt const * const e) {
// the initial event must be provided and must be WORKLOAD_SIG
Q_REQUIRE_ID(300,
(e != (QEvt const *)0) && (e->sig == BLINKY_WORK_SIG));
QTimeEvt_armX(&me->te,
Q_EVT_CAST(BlinkyWorkEvt)->ticks,
Q_EVT_CAST(BlinkyWorkEvt)->ticks);
me->toggles = Q_EVT_CAST(BlinkyWorkEvt)->toggles;
return Q_TRAN(&Blinky3_active);
}
//............................................................................
static QState Blinky3_active(Blinky3 * const me, QEvt const * const e) {
QState status_;
switch (e->sig) {
case TIMEOUT_SIG: {
for (uint16_t i = me->toggles; i > 0U; --i) {
BSP_d2on();
BSP_d2off();
}
status_ = Q_HANDLED();
break;
}
case BLINKY_WORK_SIG: {
BSP_d2on();
QTimeEvt_disarm(&me->te);
QTimeEvt_armX(&me->te,
Q_EVT_CAST(BlinkyWorkEvt)->ticks,
Q_EVT_CAST(BlinkyWorkEvt)->ticks);
me->toggles = Q_EVT_CAST(BlinkyWorkEvt)->toggles;
status_ = Q_HANDLED();
BSP_d2off();
break;
}
default: {
status_ = Q_SUPER(&QHsm_top);
break;
}
}
return status_;
}

View File

@ -1,123 +0,0 @@
//============================================================================
// QP/C Example
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C API
#include "bsp.h" // Board Support Package interface
#include "blinky_button.h" // application shared interface
Q_DEFINE_THIS_MODULE("button2a") // for DBC assertions in this module
//............................................................................
typedef struct { // Button2a task
QActive super; // inherit QActive
// add internal variables for this AO...
} Button2a;
static void Button2a_ctor(Button2a * const me);
static QState Button2a_initial(Button2a * const me, QEvt const * const ie);
static QState Button2a_active(Button2a * const me, QEvt const * const e);
//............................................................................
static Button2a Button2a_inst; // the Button2a instance
QActive * const AO_Button2a = &Button2a_inst.super; // opaque AO pointer
void Button2a_instantiate(void) {
Button2a_ctor(&Button2a_inst);
}
//............................................................................
static void Button2a_ctor(Button2a * const me) {
QActive_ctor(
&me->super,
Q_STATE_CAST(&Button2a_initial));
}
//............................................................................
static QState Button2a_initial(Button2a * const me, QEvt const * const ie) {
(void)me;
(void)ie;
return Q_TRAN(&Button2a_active);
}
//............................................................................
static QState Button2a_active(Button2a * const me, QEvt const * const e) {
(void)me;
QState status_;
switch (e->sig) {
case BUTTON_PRESSED_SIG: {
BSP_d4on();
// Button2a --> Blinky1
QACTIVE_POST(AO_Blinky1, BSP_getWorkEvtBlinky1(1U), me);
BSP_d4off();
for (uint16_t i = Q_EVT_CAST(ButtonWorkEvt)->toggles;
i > 0U; --i)
{
BSP_d4on();
BSP_d4off();
}
status_ = Q_HANDLED();
break;
}
case FORWARD_PRESSED_SIG: {
BSP_d4on();
// immutable event can be forwarded to another Task
QACTIVE_POST(AO_Button2b, e, me); // Button2a --> Button2b
status_ = Q_HANDLED();
BSP_d4off();
break;
}
case BUTTON_RELEASED_SIG: {
BSP_d4on();
// Button2a --> Blinky1
QACTIVE_POST(AO_Blinky1, BSP_getWorkEvtBlinky1(0U), me);
BSP_d4off();
for (uint16_t i = Q_EVT_CAST(ButtonWorkEvt)->toggles;
i > 0U; --i)
{
BSP_d4on();
BSP_d4off();
}
status_ = Q_HANDLED();
break;
}
case FORWARD_RELEASED_SIG: {
BSP_d4on();
// immutable event can be forwarded to another Task
QACTIVE_POST(AO_Button2b, e, me); // Button2a --> Button2b
status_ = Q_HANDLED();
BSP_d4off();
break;
}
default: {
status_ = Q_SUPER(&QHsm_top);
break;
}
}
return status_;
}

View File

@ -1,107 +0,0 @@
//============================================================================
// QP/C Example
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C API
#include "bsp.h" // Board Support Package interface
#include "blinky_button.h" // application shared interface
Q_DEFINE_THIS_MODULE("button2b") // for DBC assertions in this module
//............................................................................
typedef struct { // Button2b task
QActive super; // inherit QActive
// add internal variables for this AO...
} Button2b;
static void Button2b_ctor(Button2b * const me);
static QState Button2b_initial(Button2b * const me, QEvt const * const e);
static QState Button2b_active(Button2b * const me, QEvt const * const e);
//............................................................................
static Button2b Button2b_inst; // the Button2b instance
QActive * const AO_Button2b = &Button2b_inst.super; // opaque AO pointer
void Button2b_instantiate(void) {
Button2b_ctor(&Button2b_inst);
}
//............................................................................
static void Button2b_ctor(Button2b * const me) {
QActive_ctor(
&me->super,
Q_STATE_CAST(&Button2b_initial));
}
//............................................................................
static QState Button2b_initial(Button2b * const me, QEvt const * const ie) {
(void)me;
(void)ie;
return Q_TRAN(&Button2b_active);
}
//............................................................................
static QState Button2b_active(Button2b * const me, QEvt const * const e) {
(void)me;
QState status_;
switch (e->sig) {
case FORWARD_PRESSED_SIG: {
BSP_d3on();
// Button2b --> Blinky3
QACTIVE_POST(AO_Blinky3, BSP_getWorkEvtBlinky3(1U), me);
BSP_d3off();
for (uint16_t i = Q_EVT_CAST(ButtonWorkEvt)->toggles;
i > 0U; --i)
{
BSP_d3on();
BSP_d3off();
}
status_ = Q_HANDLED();
break;
}
case FORWARD_RELEASED_SIG: {
BSP_d3on();
// Button2b --> Blinky3
QACTIVE_POST(AO_Blinky3, BSP_getWorkEvtBlinky3(0U), me);
BSP_d3off();
for (uint16_t i = Q_EVT_CAST(ButtonWorkEvt)->toggles;
i > 0U; --i)
{
BSP_d3on();
BSP_d3off();
}
status_ = Q_HANDLED();
break;
}
default: {
status_ = Q_SUPER(&QHsm_top);
break;
}
}
return status_;
}

View File

@ -1,88 +0,0 @@
//============================================================================
// QP/C Example
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C API
#include "bsp.h" // Board Support Package interface
#include "blinky_button.h" // application shared interface
Q_DEFINE_THIS_MODULE("main")
//............................................................................
int main() {
QF_init(); // initialize the QF framework
BSP_init(); // initialize the Board Support Package
// instantiate and start QP/C active objects...
Blinky1_instantiate();
static QEvt const *blinky1QSto[10]; // Event queue storage
QACTIVE_START(
AO_Blinky1, // AO pointer to start
Q_PRIO(1U, 1U), // QF-prio/pre-thre.
blinky1QSto, // storage for the AO's queue
Q_DIM(blinky1QSto), // queue length
(void *)0, // stack storage (not used)
0U, // size of the stack [bytes]
BSP_getWorkEvtBlinky1(0U)); // initialization event
Button2a_instantiate();
static QEvt const *button2aQSto[8]; // Event queue storage
QACTIVE_START(
AO_Button2a, // AO pointer to start
Q_PRIO(2U, 3U), // QF-prio/pre-thre.
button2aQSto, // storage for the AO's queue
Q_DIM(button2aQSto), // queue length
(void *)0, // stack storage (not used)
0U, // size of the stack [bytes]
(QEvt const *)0); // initialization event -- not used
Button2b_instantiate();
static QEvt const *button2bQSto[8]; // Event queue storage
QACTIVE_START(
AO_Button2b, // AO pointer to start
Q_PRIO(3U, 3U), // QF-prio/pre-thre.
button2bQSto, // storage for the AO's queue
Q_DIM(button2bQSto), // queue length
(void *)0, // stack storage (not used)
0U, // size of the stack [bytes]
(QEvt const *)0); // initialization event -- not used
Blinky3_instantiate();
static QEvt const *blinky3QSto[8]; // Event queue storage
QACTIVE_START(
AO_Blinky3, // AO pointer to start
Q_PRIO(4U, 4U), // QF-prio/pre-thre.
blinky3QSto, // storage for the AO's queue
Q_DIM(blinky3QSto), // queue length
(void *)0, // stack storage (not used)
0U, // size of the stack [bytes]
BSP_getWorkEvtBlinky3(0U)); // initialization event
return QF_run(); // run the QF application
// NOTE: in embedded systems QF_run() should not return
}

View File

@ -1,139 +0,0 @@
[General]
decode_signals=0
generated_signals=0
views=1
meta_objs=0
[D0]
name=Button
enabled=true
color=4279638298
conversion_type=0
conv_options=0
[D1]
name=SysTick
enabled=true
color=4287582722
conversion_type=0
conv_options=0
[D2]
name=Blinky3
enabled=true
color=4291559424
conversion_type=0
conv_options=0
[D3]
name=Button2b
enabled=true
color=4294277376
conversion_type=0
conv_options=0
[D4]
name=Button2a
enabled=true
color=4293776384
conversion_type=0
conv_options=0
[D5]
name=Blinky1
enabled=true
color=4285780502
conversion_type=0
conv_options=0
[D6]
name=Idle0
enabled=true
color=4281623972
conversion_type=0
conv_options=0
[D7]
name=D7
enabled=true
color=4285878395
conversion_type=0
conv_options=0
[view0]
scale=3.7605294825511427e-5
v_offset=-3
splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0^\0\0\x4\x65\x1\0\0\0\x1\x1\0\0\0\x1\0)
segment_display_mode=1
offset=22 serialization::archive 14 0 0 0 0 0 0 0 0 0 0 0 0 0 6
zero_offset=22 serialization::archive 14 0 0 0 0 0 0 0 0 0 0 0 0 0 6
D0\trace_height=40
D1\trace_height=40
D2\trace_height=40
D3\trace_height=40
D4\trace_height=40
D5\trace_height=40
D6\trace_height=40
D7\trace_height=40
Button\trace_height=40
SysTick\trace_height=40
Blinky3\trace_height=40
Button2b\trace_height=40
Button2a\trace_height=40
Blinky1\trace_height=40
Idle0\trace_height=40
[meta_obj0]
type=selection
assoc_view=0
start_time=22 serialization::archive 14 0 0 0 0 1944566 17002629 27007454 29442577 582965 36027668 -8 0 0 6
end_time=22 serialization::archive 14 0 0 0 0 2901329 24335378 30189438 36680136 88293285 53794622 -8 0 0 6
[Button]
name=Button
enabled=true
color=4279638298
conversion_type=0
conv_options=0
[SysTick]
name=SysTick
enabled=true
color=4287582722
conversion_type=0
conv_options=0
[Blinky3]
name=Blinky3
enabled=true
color=4291559424
conversion_type=0
conv_options=0
[Button2b]
name=Button2b
enabled=true
color=4294277376
conversion_type=0
conv_options=0
[Button2a]
name=Button2a
enabled=true
color=4293776384
conversion_type=0
conv_options=0
[Blinky1]
name=Blinky1
enabled=true
color=4285780502
conversion_type=0
conv_options=0
[Idle0]
name=Idle0
enabled=true
color=4281623972
conversion_type=0
conv_options=0

View File

@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -816,6 +817,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1446,6 +1448,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -1,50 +0,0 @@
About this Example
==================
This example demonstrates how to use the uVision IDE together with
the MDK-ARM toolchain.
uVision Project File
====================
The MDK-ARM uVision project file provided with this example uses
relative paths to the QP framework location (includes, port, and
libraries. These relative paths must be modified when the project
is moved to different relative location.
Adjusting Stack and Heap Sizes
==============================
The stack and heap sizes are determined in this project by the
command-line options for the ARM assembler (see the Asm tab in
the "Options for Target" dialog box in uVision). Specifically,
you should define symbols: Stack_Size=xxx Heap_Size=yyy, where
xxx represents a numerical value of stack size and yyy the
numerical value of the heap size (for most embedded projects
yyy should be 0, as the using the heap is not recommended).
Startup Code
============
The startup code for the TM4C123GH6PM MCU used in this project is
located in the "3rd_party" folder in the following location:
3rd_party\efm32pg1b\arm\startup_efm32pg1b.s
The file startup_efm32pg1b.s provides a template of the recommended
startup for QP applications and should be easily customizable for other
ARM Cortex-M microcontrollers.
The startup file typically does not need to be modified or adapted for
applications. It provides only weak definitions of all exception and
interrupt handlers, as well as the assert_failed() function.
The weak function assert_failed() defined in this file might be re-defined
in the application to customize it for the application-specific error-
handling policy.
***
NOTE: The function assert_failed() typically should NOT use the stack,
because stack might be corrupted by the time this function is called.
Also, assert_failed() is intended to handle catastrophic errors and
should NOT return.
***

View File

@ -157,41 +157,25 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>157</LineNumber>
<LineNumber>169</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>5844</Address>
<Address>3624</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\..\src\qv\qv.c</Filename>
<Filename>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qv\../../../../../src/qv/qv.c\157</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>424</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>9240</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qv\../bsp.c\424</Expression>
<Expression>\\dpp_qv\../../../../../ports/arm-cm/qv/armclang/qv_port.c\169</Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<SubType>8</SubType>
<ItemText>0x00001F14</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
@ -541,7 +525,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>/</Name>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>

View File

@ -10,13 +10,13 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>EFM32PG1B200F256GM48</Device>
<Vendor>Silicon Labs</Vendor>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0</PackID>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.3.0</PackID>
<PackURL>https://www.silabs.com/documents/public/cmsis-packs/</PackURL>
<Cpu>IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -313,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -646,7 +647,7 @@
<TargetCommonOption>
<Device>EFM32PG1B200F256GM48</Device>
<Vendor>Silicon Labs</Vendor>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0</PackID>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.3.0</PackID>
<PackURL>https://www.silabs.com/documents/public/cmsis-packs/</PackURL>
<Cpu>IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -816,6 +817,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1270,13 +1272,13 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>EFM32PG1B200F256GM48</Device>
<Vendor>Silicon Labs</Vendor>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0</PackID>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.3.0</PackID>
<PackURL>https://www.silabs.com/documents/public/cmsis-packs/</PackURL>
<Cpu>IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -1446,6 +1448,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -90,9 +90,9 @@ Q_NORETURN Q_onError(char const * const module, int_t const id) {
// for debugging, hang on in an endless loop...
for (;;) {
}
#endif
#else
NVIC_SystemReset();
#endif
}
//............................................................................
void assert_failed(char const * const module, int_t const id); // prototype

View File

@ -10,13 +10,13 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>EFM32PG1B200F256GM48</Device>
<Vendor>Silicon Labs</Vendor>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0</PackID>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.3.0</PackID>
<PackURL>https://www.silabs.com/documents/public/cmsis-packs/</PackURL>
<Cpu>IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -313,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>0</OneElfS>
@ -671,7 +672,7 @@
<TargetCommonOption>
<Device>EFM32PG1B200F256GM48</Device>
<Vendor>Silicon Labs</Vendor>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0</PackID>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.3.0</PackID>
<PackURL>https://www.silabs.com/documents/public/cmsis-packs/</PackURL>
<Cpu>IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -841,6 +842,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1320,13 +1322,13 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>EFM32PG1B200F256GM48</Device>
<Vendor>Silicon Labs</Vendor>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0</PackID>
<PackID>SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.3.0</PackID>
<PackURL>https://www.silabs.com/documents/public/cmsis-packs/</PackURL>
<Cpu>IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
@ -1496,6 +1498,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1623,7 +1626,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -640,7 +641,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -816,6 +817,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -962,7 +964,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1446,6 +1448,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -1,7 +1,7 @@
//============================================================================
// QP configuration file example
// QP configuration file (QXK on ARM Cortex-M)
// Last updated for version: 7.3.0
// Last updated on: 2023-09-07
// Last updated on: 2023-10-30
//
// Q u a n t u m L e a P s
// ------------------------
@ -32,28 +32,240 @@
#ifndef QP_CONFIG_H_
#define QP_CONFIG_H_
// NOTE:
// The QP configuration takes effect only when the macro QP_CONFIG
// is defined on the command-line to the compiler for all QP source files.
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// use event constructors for dynamic events
#define QEVT_DYN_CTOR
// <n>NOTE: Requires command-line macro: QP_CONFIG
// <i>This qp_config.h header file is activated only when the macro
// <i>QP_CONFIG is defined on the command-line to the compiler
// <n>-------------------------------------------
// for QK kernel:
// use the QEI1_IRQHandler() with IRQ number 38
// for the QK return-from-preemption handler
#define QK_USE_IRQ_NUM 38
#define QK_USE_IRQ_HANDLER QEI1_IRQHandler
// <o>QP API compatibility version (QP_API_VERSION)
// <0=> 0 (Maximum compatibility)
// <580=>580 (QP 5.8.0 or newer)
// <660=>660 (QP 6.6.0 or newer)
// <691=>691 (QP 6.9.1 or newer)
// <700=>700 (QP 7.0.0 or newer)
// <9999=>9999 (Latest only)
// <i>QP API backwards compatibility with the QP/C API version.
// <i>Lower QP_API_VERSION values enable backwards compatibility
// <i>with lower (older) QP API versions.
// <i>For example, QP_API_VERSION==691 will enable the compatibility
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
// <i>QP_API_VERSION==0 enables the maximum currently supported
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
// <i>that no backwards compatibility layer should be enabled.
// <i>Default: 0 (All supported)
#define QP_API_VERSION 0
// for QXK kernel:
// use the QEI1_IRQHandler() with IRQ number 38
// for the QXK return-from-preemption handler
#define QXK_USE_IRQ_NUM 38
#define QXK_USE_IRQ_HANDLER QEI1_IRQHandler
//..........................................................................
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
// <i>The QP FuSa Subsystem consists of the following facilities:
// <i>- Software assertions as a recommended technique
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
// <i> * Duplicate Inverse Storage for critical variables
// <i> * Memory Markers for critical objects (e.g., events)
// <i> * Hard-limits for all loops
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
#ifdef Q_SPY
// for the Spy build configuration, enable the context-switch callback
#define QF_ON_CONTEXT_SW
#endif
// <c3>Disable QP FuSa in development
// <i>Disable assertions and other self monitoring features
// <i>in development build configurations (NDEBUG undefined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifndef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// <c3>Disable QP FuSa in production release
// <i>Disable assertions and other self monitoring features
// <i>in the release build configurations (NDEBUG defined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifdef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// </h>
//..........................................................................
// <h>QEP Event Processor
// <i>Events and state machines.
// <o>Event signal size (Q_SIGNAL_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the QEvt signal for QEP/QF [bytes]
// <i>Default: 2
#define Q_SIGNAL_SIZE 2U
// </h>
//..........................................................................
// <h>QF Framework
// <i>Active Object framework
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
// <i>Maximum # Active Objects in the system <1..64>
// <i>Default: 32
#define QF_MAX_ACTIVE 32U
// <o>Maximum # event pools (QF_MAX_EPOOL)
// <0=>0 no event pools
// <1=>1 <2=>2 <3=>3 (deafult) <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # Event Pools <1..15>
// <i>Default: 3
#define QF_MAX_EPOOL 3U
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
// <0=>0 no time events
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # clock tick rates for time events <1..15>
// <i>Default: 1
#define QF_MAX_TICK_RATE 1U
// <c1>Dynamic Event Constructor (QEVT_DYN_CTOR)
// <i>Dynamic Event Constructor (RAII)
//#define QEVT_DYN_CTOR
// </c>
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
// <i>Enable Active Object stop API (Not recommended)
//#define QACTIVE_CAN_STOP
// </c>
// <o>Event size (QF_EVENT_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the dynamic events for QF [bytes]
// <i>Default: 2 (64K bytes maximum event size)
#define QF_EVENT_SIZ_SIZE 2U
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the QTimeEvt counter [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QF_TIMEEVT_CTR_SIZE 4U
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
// <1U=>1 (default)
// <2U=>2
// <4U=>4
// <i>Size of event queue counter [bytes]
// <i>Default: 1 (255 events maximum in a queue)
#define QF_EQUEUE_CTR_SIZE 2U
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool counter [bytes]
// <i>Default: 2 (64K blocks maximum in a pool)
#define QF_MPOOL_CTR_SIZE 2U
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool block [bytes]
// <i>Default: 2 (64K bytes maximum block size)
#define QF_MPOOL_SIZ_SIZE 2U
// </h>
//..........................................................................
// <h>QS Software Tracing
// <i>Target-resident component of QP/Spy software tracing system
// <i>(tracing instrumenation and command-input).
// <n>NOTE: Requires command-line macro: Q_SPY
// <i>The QS software tracing instrumenation is activated only when
// <i>the macro Q_SPY is defined on the command-line to the compiler.
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
// <o>QS timestamp size (QS_TIME_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the timestamp in QS [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QS_TIME_SIZE 4U
// <o>Object pointer size (QS_OBJ_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of object pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_OBJ_PTR_SIZE 4U
// <o>Function pointer size (QS_FUN_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of function pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_FUN_PTR_SIZE 4U
// <o>QS buffer counter size (QS_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the counter in the internal QS buffer [bytes]
// <i>Default: 2 (64K bytes in QS buffer)
#define QS_CTR_SIZE 2U
// </h>
//..........................................................................
// <h>QXK Preemptive Dual-Mode Kernel
// <i>Preemptive non-blocking/blocking RTOS kernel.
// <h>Context switch callback (QF_ON_CONTEXT_SW)
// <c2>Context switch callback WITHOUT QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is undefined.
//#ifndef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// <c2>Context switch callback WITH QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is defined.
//#ifdef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// </h>
// <c2>MPU memory isolation (QF_MEM_ISOLATE)
// <i>Enable memory isolation (requires MPU)
// <i>NOTE: implies QF_ON_CONTEXT_SW.
//#define QF_MEM_ISOLATE
// </c>
// <c4>Use IRQ handler for QXK return-from-preemption
// <i>Enable this option only if the NMI handler is used in the project.
// <i>If enabled, provide the otherwise unused IRQ number (QXK_USE_IRQ_NUM)
// <i>and the corresponding IRQ handler name (QXK_USE_IRQ_HANDLER)
// <i>in the "Text Editor" mode.
//#define QXK_USE_IRQ_NUM 31
//#define QXK_USE_IRQ_HANDLER Reserved31_IRQHandler
// </c>
// </h>
//------------- <<< end of configuration section >>> -----------------------
#endif // QP_CONFIG_H_

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -640,7 +641,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -816,6 +817,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -962,7 +964,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1446,6 +1448,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -705,6 +705,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\qp_config.h</PathWithFileName>
<FilenameWithoutPath>qp_config.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -715,7 +727,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -727,7 +739,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileNumber>11</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -739,7 +751,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>11</FileNumber>
<FileNumber>12</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -751,7 +763,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>12</FileNumber>
<FileNumber>13</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -763,7 +775,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>13</FileNumber>
<FileNumber>14</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -775,7 +787,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>14</FileNumber>
<FileNumber>15</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -787,7 +799,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>15</FileNumber>
<FileNumber>16</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -807,7 +819,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>16</FileNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -819,7 +831,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>17</FileNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -831,7 +843,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>18</FileNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -843,7 +855,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>19</FileNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -855,7 +867,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>20</FileNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -867,7 +879,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>21</FileNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -879,7 +891,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>22</FileNumber>
<FileNumber>23</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -891,7 +903,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>23</FileNumber>
<FileNumber>24</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -903,7 +915,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>24</FileNumber>
<FileNumber>25</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -915,7 +927,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>25</FileNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -927,7 +939,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>26</FileNumber>
<FileNumber>27</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -939,7 +951,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>27</FileNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -951,7 +963,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>28</FileNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -963,7 +975,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>29</FileNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -975,7 +987,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>30</FileNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -987,7 +999,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>31</FileNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1007,7 +1019,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>32</FileNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1027,7 +1039,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>34</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1039,7 +1051,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>34</FileNumber>
<FileNumber>35</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1051,7 +1063,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>35</FileNumber>
<FileNumber>36</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1063,7 +1075,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>36</FileNumber>
<FileNumber>37</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1075,7 +1087,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>37</FileNumber>
<FileNumber>38</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -332,7 +333,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -423,6 +424,11 @@
<FileType>1</FileType>
<FilePath>..\xthread2.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -665,7 +671,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -841,6 +847,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1078,6 +1085,11 @@
<FileType>1</FileType>
<FilePath>..\xthread2.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1320,7 +1332,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1496,6 +1508,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1733,6 +1746,11 @@
<FileType>1</FileType>
<FilePath>..\xthread2.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -640,7 +641,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -816,6 +817,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -962,7 +964,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1446,6 +1448,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -318,10 +318,6 @@
<pMon>BIN\lmidk-agdi.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -523,10 +519,6 @@
<pMon>BIN\lmidk-agdi.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -640,7 +641,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -816,6 +817,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -962,7 +964,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1446,6 +1448,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -117,6 +117,10 @@
<pMon>BIN\lmidk-agdi.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -130,7 +134,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=3231,468,3708,783,1)</Name>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=3231,468,3708,783,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -149,7 +153,7 @@
<Type>0</Type>
<LineNumber>319</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>1108</Address>
<Address>1112</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -165,7 +169,7 @@
<Type>0</Type>
<LineNumber>304</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>1084</Address>
<Address>1088</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -738,6 +742,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\qp_config.h</PathWithFileName>
<FilenameWithoutPath>qp_config.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -748,7 +764,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileNumber>10</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -760,7 +776,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -772,7 +788,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>11</FileNumber>
<FileNumber>12</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -784,7 +800,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>12</FileNumber>
<FileNumber>13</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -796,7 +812,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>13</FileNumber>
<FileNumber>14</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -808,7 +824,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>14</FileNumber>
<FileNumber>15</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -820,7 +836,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>15</FileNumber>
<FileNumber>16</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -840,7 +856,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>16</FileNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -852,7 +868,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>17</FileNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -864,7 +880,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>18</FileNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -876,7 +892,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>19</FileNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -888,7 +904,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>20</FileNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -900,7 +916,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>21</FileNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -912,7 +928,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>22</FileNumber>
<FileNumber>23</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -924,7 +940,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>23</FileNumber>
<FileNumber>24</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -936,7 +952,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>24</FileNumber>
<FileNumber>25</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -948,7 +964,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>25</FileNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -960,7 +976,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>26</FileNumber>
<FileNumber>27</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -972,7 +988,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>27</FileNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -984,7 +1000,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>28</FileNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -996,7 +1012,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>29</FileNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1008,7 +1024,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>30</FileNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1020,7 +1036,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>31</FileNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1040,7 +1056,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>32</FileNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1060,7 +1076,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>34</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1072,7 +1088,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>34</FileNumber>
<FileNumber>35</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1084,7 +1100,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>35</FileNumber>
<FileNumber>36</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1096,7 +1112,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>36</FileNumber>
<FileNumber>37</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1108,7 +1124,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>37</FileNumber>
<FileNumber>38</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -423,6 +424,11 @@
<FileType>1</FileType>
<FilePath>..\..\main.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -665,7 +671,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -841,6 +847,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -987,7 +994,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1078,6 +1085,11 @@
<FileType>1</FileType>
<FilePath>..\..\main.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1320,7 +1332,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1496,6 +1508,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1623,7 +1636,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -1733,6 +1746,11 @@
<FileType>1</FileType>
<FilePath>..\..\main.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -79,13 +79,13 @@ typedef struct {
//============================================================================
// Error handler and ISRs...
Q_NORETURN Q_onError(char const *module, int_t const id) {
// NOTE: this implementation of the assertion handler is intended only
Q_NORETURN Q_onError(char const * const module, int_t const id) {
// NOTE: this implementation of the error handler is intended only
// for debugging and MUST be changed for deployment of the application
// (assuming that you ship your production code with assertions enabled).
Q_UNUSED_PAR(module);
Q_UNUSED_PAR(id);
QS_ASSERTION(module, id, (uint32_t)10000U);
QS_ASSERTION(module, id, 10000U);
#ifndef NDEBUG
// light up all LEDs
@ -93,9 +93,11 @@ Q_NORETURN Q_onError(char const *module, int_t const id) {
// for debugging, hang on in an endless loop...
for (;;) {
}
#endif
#else
NVIC_SystemReset();
for (;;) { // explicitly "no-return"
}
#endif
}
//............................................................................
void assert_failed(char const * const module, int_t const id); // prototype
@ -103,7 +105,8 @@ void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}
//............................................................................
// ISRs used in the application ==============================================
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QXK_ISR_ENTRY(); // inform QXK about entering an ISR
@ -146,7 +149,7 @@ void SysTick_Handler(void) {
QXK_ISR_EXIT(); // inform QXK about exiting an ISR
}
//............................................................................
// interrupt handler for testing preemptions in QXK
// interrupt handler for testing preemptions
void GPIOPortA_IRQHandler(void); // prototype
void GPIOPortA_IRQHandler(void) {
QXK_ISR_ENTRY(); // inform QXK about entering an ISR
@ -176,6 +179,7 @@ void UART0_IRQHandler(void) {
uint8_t b = (uint8_t)UART0->DR;
QS_rxPut(b);
}
QXK_ARM_ERRATUM_838869();
}
#endif // Q_SPY
@ -232,7 +236,7 @@ void QF_onContextSw(QActive *prev, QActive *next) {
// Table AO...................................................................
// size of Table instance, as power-of-2
#define TABLE_SIZE_POW2 ((uint32_t)6U)
#define TABLE_SIZE_POW2 ((uint32_t)7U)
__attribute__((aligned((1U << TABLE_SIZE_POW2))))
static uint8_t Table_sto[1U << TABLE_SIZE_POW2];
@ -264,7 +268,7 @@ static MPU_Region const MPU_Table[3] = {
// Philo AOs..................................................................
// size of Philo instance, as power-of-2
#define PHILO_SIZE_POW2 ((uint32_t)6U)
#define PHILO_SIZE_POW2 ((uint32_t)7U)
__attribute__((aligned((1U << PHILO_SIZE_POW2))))
static uint8_t Philo_sto[N_PHILO][1U << PHILO_SIZE_POW2];
@ -383,7 +387,7 @@ static MPU_Region const MPU_Philo[N_PHILO][3] = {
// XThread1 thread............................................................
#define XTHREAD1_SIZE_POW2 ((uint32_t)10U) // XThread1 instance + stack
#define XTHREAD1_STACK_SIZE ((uint32_t)896U) // Thread1 stack size
#define XTHREAD1_STACK_SIZE ((uint32_t)880U) // Thread1 stack size
__attribute__((aligned((1U << XTHREAD1_SIZE_POW2))))
uint8_t XThread1_sto[1U << XTHREAD1_SIZE_POW2];
@ -415,7 +419,7 @@ static MPU_Region const MPU_XThread1[3] = {
// XThread2 thread............................................................
#define XTHREAD2_SIZE_POW2 ((uint32_t)10U) // XThread2 instance + stack
#define XTHREAD2_STACK_SIZE ((uint32_t)896U) // Thread2 stack size
#define XTHREAD2_STACK_SIZE ((uint32_t)880U) // Thread2 stack size
__attribute__((aligned((1U << XTHREAD2_SIZE_POW2))))
uint8_t XThread2_sto[1U << XTHREAD2_SIZE_POW2];

View File

@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -806,6 +807,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1426,6 +1428,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -7,7 +7,7 @@
# ------------------------
# Modern Embedded Software
#
# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
# Copyright (C) 2005 Quantum Leaps, LLC. <state-machine.com>
#
# This program is open source software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
@ -134,8 +134,7 @@ LIBS :=
# defines
DEFINES := -DSTM32C031xx \
-DQF_ON_CONTEXT_SW \
-DQK_USE_IRQ_NUM=31 \
-DQK_USE_IRQ_HANDLER=Reserved31_IRQHandler
$(DEF)
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]

View File

@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -152,34 +152,50 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>128</LineNumber>
<LineNumber>199</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218056</Address>
<Address>134221468</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\..\3rd_party\nucleo-c031c6\arm\startup_stm32c031xx.s</Filename>
<Filename>..\..\..\..\..\src\qv\qv.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qv\../../../../../3rd_party/nucleo-c031c6/arm/startup_stm32c031xx.s\128</Expression>
<Expression>\\dpp_qv\../../../../../src/qv/qv.c\199</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>41</LineNumber>
<LineNumber>75</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134228148</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>C:\qp-dev\qpc\examples\arm-cm\dpp_nucleo-c031c6\qv\main.c</Filename>
<Filename>..\..\..\..\..\src\qv\qv.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qv\../main.c\41</Expression>
<Expression>\\dpp_qv\../../../../../src/qv/qv.c\75</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>205</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\..\..\..\src\qf\qf_time.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
@ -354,7 +370,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32C0x_32 -FL08000 -FS08000000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U-O206 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -369,7 +385,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -377,7 +393,40 @@
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>375</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134223070</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qv\../bsp.c\375</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>0</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134223068</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename></Filename>
<ExecCommand></ExecCommand>
<Expression>0x080014DC</Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
@ -438,7 +487,7 @@
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>1</EnableFlashSeq>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
@ -965,30 +1014,6 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\armclang\qep_port.h</PathWithFileName>
<FilenameWithoutPath>qep_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>25</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\armclang\qf_port.h</PathWithFileName>
<FilenameWithoutPath>qf_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>26</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\armclang\qs_port.h</PathWithFileName>
<FilenameWithoutPath>qs_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
@ -996,7 +1021,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>27</FileNumber>
<FileNumber>25</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1006,18 +1031,6 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>28</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.h</PathWithFileName>
<FilenameWithoutPath>qv_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -1028,7 +1041,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>29</FileNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1040,7 +1053,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>30</FileNumber>
<FileNumber>27</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1052,7 +1065,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>31</FileNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1064,7 +1077,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>32</FileNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1076,7 +1089,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -82,7 +82,7 @@
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\dbg\dpp-qv.bin .\dbg\dpp-qv.axf</UserProg1Name>
<UserProg1Name>fromelf --bin --output=$H@P.bin $H@P.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -313,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -513,16 +514,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -533,11 +524,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.c</FilePath>
</File>
<File>
<FileName>qv_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -645,7 +631,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -688,7 +674,7 @@
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>0</DebugInformation>
<DebugInformation>1</DebugInformation>
<BrowseInformation>0</BrowseInformation>
<ListingPath>.\rel\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
@ -717,7 +703,7 @@
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\rel\dpp-qv.bin .\rel\dpp-qv.axf</UserProg1Name>
<UserProg1Name>fromelf --bin --output=$H@P.bin $H@P.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@ -821,6 +807,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1148,16 +1135,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1168,11 +1145,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.c</FilePath>
</File>
<File>
<FileName>qv_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1280,7 +1252,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1352,7 +1324,7 @@
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\spy\dpp-qv.bin .\spy\dpp-qv.axf</UserProg1Name>
<UserProg1Name>fromelf --bin --output=$H@P.bin $H@P.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@ -1456,6 +1428,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1783,16 +1756,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1803,11 +1766,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.c</FilePath>
</File>
<File>
<FileName>qv_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qv\armclang\qv_port.h</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -89,11 +89,20 @@ Q_NORETURN Q_onError(char const * const module, int_t const id) {
NVIC_SystemReset();
}
//............................................................................
// assertion failure handler for the STM32 library, including the startup code
void assert_failed(char const * const module, int_t const id); // prototype
void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}
//............................................................................
#ifdef __UVISION_VERSION
// dummy initialization of the ctors (not used in C)
void _init(void);
void _init(void) {
}
#endif // __UVISION_VERSION
// ISRs used in the application ============================================
void SysTick_Handler(void); // prototype
@ -193,10 +202,6 @@ void BSP_init(void) {
__ISB();
__DSB();
// NOTE: SystemInit() has been already called from the startup code
// but SystemCoreClock needs to be updated
SystemCoreClockUpdate();
// enable GPIOA clock port for the LED LD4
RCC->IOPENR |= (1U << 0U);
@ -330,6 +335,7 @@ void BSP_terminate(int16_t result) {
// QF callbacks...
void QF_onStartup(void) {
// set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
// assign all priority bits for preemption-prio. and none to sub-prio.
@ -352,6 +358,7 @@ void QF_onStartup(void) {
//............................................................................
void QF_onCleanup(void) {
}
//............................................................................
void QV_onIdle(void) { // CATION: called with interrupts DISABLED, see NOTE0
@ -377,20 +384,7 @@ void QV_onIdle(void) { // CATION: called with interrupts DISABLED, see NOTE0
// Put the CPU and peripherals to the low-power mode.
// you might need to customize the clock management for your application,
// see the datasheet for your particular Cortex-M MCU.
//
// !!!CAUTION!!!
// QV_CPU_SLEEP() contains the WFI instruction, which stops the CPU
// clock, which unfortunately disables the JTAG port, so the ST-Link
// debugger can no longer connect to the board. For that reason, the call
// to QV_CPU_SLEEP() has to be used with CAUTION.
//
// NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
// reset the board, then connect with ST-Link Utilities and erase the part.
// The trick with BOOT(0) is it gets the part to run the System Loader
// instead of your broken code. When done disconnect BOOT0, and start over.
//
//QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
QF_INT_ENABLE(); // for now, just enable interrupts
QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
#else
QF_INT_ENABLE(); // just enable interrupts
#endif

View File

@ -1,13 +1,13 @@
##############################################################################
# Product: Makefile for QP/C on NUCLEO-L053R8, uC-OS2 kernel, GNU-ARM
# Last Updated for Version: 7.0.1
# Date of the Last Update: 2022-05-23
# Product: Makefile for QP/C on NUCLEO-C031C6, QV kernel, GNU-ARM
# Last Updated for Version: 7.3.0
# Date of the Last Update: 2023-05-26
#
# Q u a n t u m L e a P s
# ------------------------
# Modern Embedded Software
#
# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
# Copyright (C) 2005 Quantum Leaps, LLC. <state-machine.com>
#
# This program is open source software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
@ -45,13 +45,12 @@
# NOTE:
# To use this Makefile on Windows, you will need the GNU make utility, which
# is included in the Qtools collection for Windows, see:
# https://sourceforge.net/projects/qpc/files/QTools/
#
# https://github.com/QuantumLeaps/qtools
#-----------------------------------------------------------------------------
# project name
#
PROJECT := dpp
PROJECT := dpp-qv
#-----------------------------------------------------------------------------
# project directories
@ -63,37 +62,33 @@ QPC := ../../../../..
endif
# QP port used in this project
QP_PORT_DIR := $(QPC)/ports/uc-os2
QP_PORT_DIR := $(QPC)/ports/arm-cm/qv/gnu
# list of all source directories used by this project
VPATH = \
.. \
../.. \
$(QPC)/src/qf \
$(QPC)/src/qv \
$(QPC)/src/qs \
$(QP_PORT_DIR) \
$(QPC)/3rd_party/uC-OS2/Source \
$(QPC)/3rd_party/uC-OS2/Ports/ARM-Cortex-M/ARMv6-M \
$(QPC)/3rd_party/uC-OS2/Ports/ARM-Cortex-M/ARMv6-M/GNU \
$(QPC)/3rd_party/nucleo-l053r8 \
$(QPC)/3rd_party/nucleo-l053r8/gnu
$(QPC)/3rd_party/nucleo-c031c6 \
$(QPC)/3rd_party/nucleo-c031c6/gnu
# list of all include directories needed by this project
INCLUDES = \
-I.. \
-I../.. \
-I$(QPC)/include \
-I$(QP_PORT_DIR) \
-I$(QPC)/3rd_party/uC-OS2/Source \
-I$(QPC)/3rd_party/uC-OS2/Ports/ARM-Cortex-M/ARMv6-M/GNU \
-I$(QPC)/3rd_party/CMSIS/Include \
-I$(QPC)/3rd_party/nucleo-l053r8
-I$(QPC)/3rd_party/nucleo-c031c6
#-----------------------------------------------------------------------------
# files
#
# assembler source files
ASM_SRCS := \
os_cpu_a.s
ASM_SRCS :=
# C source files
C_SRCS := \
@ -101,8 +96,8 @@ C_SRCS := \
main.c \
philo.c \
table.c \
system_stm32l0xx.c \
startup_stm32l053xx.c
system_stm32c0xx.c \
startup_stm32c031xx.c
# C++ source files
CPP_SRCS :=
@ -114,6 +109,7 @@ QP_SRCS := \
qep_hsm.c \
qep_msm.c \
qf_act.c \
qf_actq.c \
qf_defer.c \
qf_dyn.c \
qf_mem.c \
@ -122,21 +118,10 @@ QP_SRCS := \
qf_qeq.c \
qf_qmact.c \
qf_time.c \
qf_port.c
qv.c \
qv_port.c
RTOS_SRCS := \
os_core.c \
os_flag.c \
os_mbox.c \
os_mem.c \
os_mutex.c \
os_q.c \
os_sem.c \
os_task.c \
os_time.c \
os_tmr.c \
os_dbg.c \
os_cpu_c.c
QP_ASMS :=
QS_SRCS := \
qs.c \
@ -147,7 +132,8 @@ LIB_DIRS :=
LIBS :=
# defines
DEFINES :=
DEFINES := -DSTM32C031xx \
-DQF_ON_CONTEXT_SW
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]
@ -177,12 +163,11 @@ AS := $(GNU_ARM)/bin/arm-none-eabi-as
LINK := $(GNU_ARM)/bin/arm-none-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy
##############################################################################
# Typically, you should not need to change anything below this line
# Typically you should not need to change anything below this line
# basic utilities (included in Qtools for Windows), see:
# http://sourceforge.net/projects/qpc/files/Qtools
# basic utilities (included in QTools for Windows), see:
# https://www.state-machine.com/qtools
MKDIR := mkdir
RM := rm
@ -193,7 +178,7 @@ RM := rm
# combine all the soruces...
C_SRCS += $(QP_SRCS)
C_SRCS += $(RTOS_SRCS)
ASM_SRCS += $(QP_ASMS)
ifeq (rel, $(CONF)) # Release configuration ..................................
@ -246,7 +231,6 @@ LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \
-specs=nosys.specs -specs=nano.specs \
-Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
@ -268,8 +252,14 @@ endif
# rules
#
all: $(TARGET_BIN)
#all: $(TARGET_ELF)
.PHONY : run norun flash
ifeq ($(MAKECMDGOALS),norun)
all : $(TARGET_BIN)
norun : all
else
all : $(TARGET_BIN) run
endif
$(TARGET_BIN): $(TARGET_ELF)
$(BIN) -O binary $< $@
@ -293,6 +283,8 @@ $(BIN_DIR)/%.o : %.c
$(BIN_DIR)/%.o : %.cpp
$(CPP) $(CPPFLAGS) $< -o $@
.PHONY : clean show
# include dependency files only if our goal depends on their existence
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),show)
@ -301,7 +293,6 @@ ifneq ($(MAKECMDGOALS),clean)
endif
.PHONY : clean
clean:
-$(RM) $(BIN_DIR)/*.o \
$(BIN_DIR)/*.d \

View File

@ -0,0 +1,262 @@
//============================================================================
// QP configuration file (QV on ARM Cortex-M)
// Last updated for version: 7.3.0
// Last updated on: 2023-10-30
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
#ifndef QP_CONFIG_H_
#define QP_CONFIG_H_
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// <n>NOTE: Requires command-line macro: QP_CONFIG
// <i>This qp_config.h header file is activated only when the macro
// <i>QP_CONFIG is defined on the command-line to the compiler
// <n>-------------------------------------------
// <o>QP API compatibility version (QP_API_VERSION)
// <0=> 0 (Maximum compatibility)
// <580=>580 (QP 5.8.0 or newer)
// <660=>660 (QP 6.6.0 or newer)
// <691=>691 (QP 6.9.1 or newer)
// <700=>700 (QP 7.0.0 or newer)
// <9999=>9999 (Latest only)
// <i>QP API backwards compatibility with the QP/C API version.
// <i>Lower QP_API_VERSION values enable backwards compatibility
// <i>with lower (older) QP API versions.
// <i>For example, QP_API_VERSION==691 will enable the compatibility
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
// <i>QP_API_VERSION==0 enables the maximum currently supported
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
// <i>that no backwards compatibility layer should be enabled.
// <i>Default: 0 (All supported)
#define QP_API_VERSION 0
//..........................................................................
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
// <i>The QP FuSa Subsystem consists of the following facilities:
// <i>- Software assertions as a recommended technique
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
// <i> * Duplicate Inverse Storage for critical variables
// <i> * Memory Markers for critical objects (e.g., events)
// <i> * Hard-limits for all loops
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
// <c3>Disable QP FuSa in development
// <i>Disable assertions and other self monitoring features
// <i>in development build configurations (NDEBUG undefined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifndef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// <c3>Disable QP FuSa in production release
// <i>Disable assertions and other self monitoring features
// <i>in the release build configurations (NDEBUG defined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifdef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// </h>
//..........................................................................
// <h>QEP Event Processor
// <i>Events and state machines.
// <o>Event signal size (Q_SIGNAL_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the QEvt signal for QEP/QF [bytes]
// <i>Default: 2
#define Q_SIGNAL_SIZE 2U
// </h>
//..........................................................................
// <h>QF Framework
// <i>Active Object framework
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
// <i>Maximum # Active Objects in the system <1..64>
// <i>Default: 32
#define QF_MAX_ACTIVE 32U
// <o>Maximum # event pools (QF_MAX_EPOOL)
// <0=>0 no event pools
// <1=>1 <2=>2 <3=>3 (deafult) <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # Event Pools <1..15>
// <i>Default: 3
#define QF_MAX_EPOOL 3U
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
// <0=>0 no time events
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # clock tick rates for time events <1..15>
// <i>Default: 1
#define QF_MAX_TICK_RATE 1U
// <c1>Dynamic Event Constructor (QEVT_DYN_CTOR)
// <i>Dynamic Event Constructor (RAII)
//#define QEVT_DYN_CTOR
// </c>
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
// <i>Enable Active Object stop API (Not recommended)
//#define QACTIVE_CAN_STOP
// </c>
// <o>Event size (QF_EVENT_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the dynamic events for QF [bytes]
// <i>Default: 2 (64K bytes maximum event size)
#define QF_EVENT_SIZ_SIZE 2U
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the QTimeEvt counter [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QF_TIMEEVT_CTR_SIZE 4U
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
// <1U=>1 (default)
// <2U=>2
// <4U=>4
// <i>Size of event queue counter [bytes]
// <i>Default: 1 (255 events maximum in a queue)
#define QF_EQUEUE_CTR_SIZE 1U
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool counter [bytes]
// <i>Default: 2 (64K blocks maximum in a pool)
#define QF_MPOOL_CTR_SIZE 2U
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool block [bytes]
// <i>Default: 2 (64K bytes maximum block size)
#define QF_MPOOL_SIZ_SIZE 2U
// </h>
//..........................................................................
// <h>QS Software Tracing
// <i>Target-resident component of QP/Spy software tracing system
// <i>(tracing instrumenation and command-input).
// <n>NOTE: Requires command-line macro: Q_SPY
// <i>The QS software tracing instrumenation is activated only when
// <i>the macro Q_SPY is defined on the command-line to the compiler.
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
// <o>QS timestamp size (QS_TIME_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the timestamp in QS [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QS_TIME_SIZE 4U
// <o>Object pointer size (QS_OBJ_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of object pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_OBJ_PTR_SIZE 4U
// <o>Function pointer size (QS_FUN_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of function pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_FUN_PTR_SIZE 4U
// <o>QS buffer counter size (QS_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the counter in the internal QS buffer [bytes]
// <i>Default: 2 (64K bytes in QS buffer)
#define QS_CTR_SIZE 2U
// </h>
//..........................................................................
// <h>QV Cooperative Kernel
// <i>Cooperative run-to-completion kernel.
// <h>Context switch callback (QF_ON_CONTEXT_SW)
// <c2>Context switch callback WITHOUT QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is undefined.
//#ifndef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// <c2>Context switch callback WITH QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is defined.
//#ifdef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// </h>
// <c2>MPU memory isolation (QF_MEM_ISOLATE)
// <i>Enable memory isolation (requires MPU)
// <i>NOTE: implies QF_ON_CONTEXT_SW.
//#define QF_MEM_ISOLATE
// </c>
// </h>
//------------- <<< end of configuration section >>> -----------------------
#endif // QP_CONFIG_H_

View File

@ -0,0 +1,262 @@
//============================================================================
// QP configuration file (QV on ARM Cortex-M)
// Last updated for version: 7.3.0
// Last updated on: 2023-10-30
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
#ifndef QP_CONFIG_H_
#define QP_CONFIG_H_
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// <n>NOTE: Requires command-line macro: QP_CONFIG
// <i>This qp_config.h header file is activated only when the macro
// <i>QP_CONFIG is defined on the command-line to the compiler
// <n>-------------------------------------------
// <o>QP API compatibility version (QP_API_VERSION)
// <0=> 0 (Maximum compatibility)
// <580=>580 (QP 5.8.0 or newer)
// <660=>660 (QP 6.6.0 or newer)
// <691=>691 (QP 6.9.1 or newer)
// <700=>700 (QP 7.0.0 or newer)
// <9999=>9999 (Latest only)
// <i>QP API backwards compatibility with the QP/C API version.
// <i>Lower QP_API_VERSION values enable backwards compatibility
// <i>with lower (older) QP API versions.
// <i>For example, QP_API_VERSION==691 will enable the compatibility
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
// <i>QP_API_VERSION==0 enables the maximum currently supported
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
// <i>that no backwards compatibility layer should be enabled.
// <i>Default: 0 (All supported)
#define QP_API_VERSION 0
//..........................................................................
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
// <i>The QP FuSa Subsystem consists of the following facilities:
// <i>- Software assertions as a recommended technique
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
// <i> * Duplicate Inverse Storage for critical variables
// <i> * Memory Markers for critical objects (e.g., events)
// <i> * Hard-limits for all loops
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
// <c3>Disable QP FuSa in development
// <i>Disable assertions and other self monitoring features
// <i>in development build configurations (NDEBUG undefined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifndef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// <c3>Disable QP FuSa in production release
// <i>Disable assertions and other self monitoring features
// <i>in the release build configurations (NDEBUG defined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifdef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// </h>
//..........................................................................
// <h>QEP Event Processor
// <i>Events and state machines.
// <o>Event signal size (Q_SIGNAL_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the QEvt signal for QEP/QF [bytes]
// <i>Default: 2
#define Q_SIGNAL_SIZE 2U
// </h>
//..........................................................................
// <h>QF Framework
// <i>Active Object framework
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
// <i>Maximum # Active Objects in the system <1..64>
// <i>Default: 32
#define QF_MAX_ACTIVE 32U
// <o>Maximum # event pools (QF_MAX_EPOOL)
// <0=>0 no event pools
// <1=>1 <2=>2 <3=>3 (deafult) <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # Event Pools <1..15>
// <i>Default: 3
#define QF_MAX_EPOOL 3U
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
// <0=>0 no time events
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # clock tick rates for time events <1..15>
// <i>Default: 1
#define QF_MAX_TICK_RATE 1U
// <c1>Dynamic Event Constructor (QEVT_DYN_CTOR)
// <i>Dynamic Event Constructor (RAII)
//#define QEVT_DYN_CTOR
// </c>
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
// <i>Enable Active Object stop API (Not recommended)
//#define QACTIVE_CAN_STOP
// </c>
// <o>Event size (QF_EVENT_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the dynamic events for QF [bytes]
// <i>Default: 2 (64K bytes maximum event size)
#define QF_EVENT_SIZ_SIZE 2U
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the QTimeEvt counter [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QF_TIMEEVT_CTR_SIZE 4U
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
// <1U=>1 (default)
// <2U=>2
// <4U=>4
// <i>Size of event queue counter [bytes]
// <i>Default: 1 (255 events maximum in a queue)
#define QF_EQUEUE_CTR_SIZE 1U
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool counter [bytes]
// <i>Default: 2 (64K blocks maximum in a pool)
#define QF_MPOOL_CTR_SIZE 2U
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool block [bytes]
// <i>Default: 2 (64K bytes maximum block size)
#define QF_MPOOL_SIZ_SIZE 2U
// </h>
//..........................................................................
// <h>QS Software Tracing
// <i>Target-resident component of QP/Spy software tracing system
// <i>(tracing instrumenation and command-input).
// <n>NOTE: Requires command-line macro: Q_SPY
// <i>The QS software tracing instrumenation is activated only when
// <i>the macro Q_SPY is defined on the command-line to the compiler.
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
// <o>QS timestamp size (QS_TIME_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the timestamp in QS [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QS_TIME_SIZE 4U
// <o>Object pointer size (QS_OBJ_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of object pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_OBJ_PTR_SIZE 4U
// <o>Function pointer size (QS_FUN_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of function pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_FUN_PTR_SIZE 4U
// <o>QS buffer counter size (QS_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the counter in the internal QS buffer [bytes]
// <i>Default: 2 (64K bytes in QS buffer)
#define QS_CTR_SIZE 2U
// </h>
//..........................................................................
// <h>QV Cooperative Kernel
// <i>Cooperative run-to-completion kernel.
// <h>Context switch callback (QF_ON_CONTEXT_SW)
// <c2>Context switch callback WITHOUT QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is undefined.
//#ifndef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// <c2>Context switch callback WITH QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is defined.
//#ifdef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// </h>
// <c2>MPU memory isolation (QF_MEM_ISOLATE)
// <i>Enable memory isolation (requires MPU)
// <i>NOTE: implies QF_ON_CONTEXT_SW.
//#define QF_MEM_ISOLATE
// </c>
// </h>
//------------- <<< end of configuration section >>> -----------------------
#endif // QP_CONFIG_H_

View File

@ -0,0 +1,21 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'dpp-qv'
* Target: 'dpp-dbg'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "stm32c0xx.h"
#endif /* RTE_COMPONENTS_H */

View File

@ -0,0 +1,21 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'dpp-qv'
* Target: 'dpp-rel'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "stm32c0xx.h"
#endif /* RTE_COMPONENTS_H */

View File

@ -0,0 +1,21 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'dpp-qv'
* Target: 'dpp-spy'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "stm32c0xx.h"
#endif /* RTE_COMPONENTS_H */

View File

@ -1,43 +1,39 @@
/*****************************************************************************
* Product: Linker script for for STM32L053R8, GNU-ARM linker
* Last Updated for Version: 5.9.8
* Date of the Last Update: 2017-09-13
* Linker script for for STM32C031C6, GNU-ARM linker
*
* Q u a n t u m L e a P s
* ---------------------------
* innovating embedded systems
* Q u a n t u m L e a P s
* ------------------------
* Modern Embedded Software
*
* Copyright (C) Quantum Leaps, LLC. All rights reserved.
* Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
*
* This program is open source software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
*
* Alternatively, this program may be distributed and modified under the
* terms of Quantum Leaps commercial licenses, which expressly supersede
* the GNU General Public License and are specifically designed for
* licensees interested in retaining the proprietary status of their code.
* This software is dual-licensed under the terms of the open source GNU
* General Public License version 3 (or any later version), or alternatively,
* under the terms of one of the closed source Quantum Leaps commercial
* licenses.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* The terms of the open source GNU General Public License version 3
* can be found at: <www.gnu.org/licenses/gpl-3.0>
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* The terms of the closed source Quantum Leaps commercial licenses
* can be found at: <www.state-machine.com/licensing>
*
* Redistributions in source code must retain this top-level comment block.
* Plagiarizing this software to sidestep the license obligations is illegal.
*
* Contact information:
* https://state-machine.com
* mailto:info@state-machine.com
* <www.state-machine.com/licensing>
* <info@state-machine.com>
*****************************************************************************/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(Reset_Handler) /* entry Point */
MEMORY { /* memory map of STM32L053R8 */
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
MEMORY { /* memory map of STM32C031C6 */
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 32K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 12K
}
/* The size of the stack used by the application. NOTE: you need to adjust */

View File

@ -0,0 +1,716 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x3</ToolsetNumber>
<ToolsetName>ARM-GNU</ToolsetName>
<TargetOption>
<CLKARM>12000000</CLKARM>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\dbg\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U-O206 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32 -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Target>
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x3</ToolsetNumber>
<ToolsetName>ARM-GNU</ToolsetName>
<TargetOption>
<CLKARM>12000000</CLKARM>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\rel\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32 -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>1</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Target>
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x3</ToolsetNumber>
<ToolsetName>ARM-GNU</ToolsetName>
<TargetOption>
<CLKARM>12000000</CLKARM>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\spy\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32 -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<SystemViewers>
<Entry>
<Name>System Viewer\GPIOA</Name>
<WinId>35904</WinId>
</Entry>
<Entry>
<Name>System Viewer\USART2</Name>
<WinId>35905</WinId>
</Entry>
</SystemViewers>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Group>
<GroupName>Source Code</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\bsp.c</PathWithFileName>
<FilenameWithoutPath>bsp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp.h</PathWithFileName>
<FilenameWithoutPath>bsp.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\dpp.h</PathWithFileName>
<FilenameWithoutPath>dpp.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\philo.c</PathWithFileName>
<FilenameWithoutPath>philo.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\table.c</PathWithFileName>
<FilenameWithoutPath>table.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>nucleo-c031c6</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\stm32c0xx.h</PathWithFileName>
<FilenameWithoutPath>stm32c0xx.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\stm32c031xx.h</PathWithFileName>
<FilenameWithoutPath>stm32c031xx.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\system_stm32c0xx.c</PathWithFileName>
<FilenameWithoutPath>system_stm32c0xx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\gnu\startup_stm32c031xx.c</PathWithFileName>
<FilenameWithoutPath>startup_stm32c031xx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::RTEF</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,984 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x3</ToolsetNumber>
<ToolsetName>ARM-GNU</ToolsetName>
<TargetOption>
<CLKARM>12000000</CLKARM>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\dbg\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U-O206 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32 -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Target>
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x3</ToolsetNumber>
<ToolsetName>ARM-GNU</ToolsetName>
<TargetOption>
<CLKARM>12000000</CLKARM>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\rel\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32 -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>1</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Target>
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x3</ToolsetNumber>
<ToolsetName>ARM-GNU</ToolsetName>
<TargetOption>
<CLKARM>12000000</CLKARM>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\spy\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32 -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<SystemViewers>
<Entry>
<Name>System Viewer\GPIOA</Name>
<WinId>35904</WinId>
</Entry>
<Entry>
<Name>System Viewer\USART2</Name>
<WinId>35905</WinId>
</Entry>
</SystemViewers>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Group>
<GroupName>Source Code</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\bsp.c</PathWithFileName>
<FilenameWithoutPath>bsp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp.h</PathWithFileName>
<FilenameWithoutPath>bsp.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\dpp.h</PathWithFileName>
<FilenameWithoutPath>dpp.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\philo.c</PathWithFileName>
<FilenameWithoutPath>philo.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\table.c</PathWithFileName>
<FilenameWithoutPath>table.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>nucleo-c031c6</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\stm32c0xx.h</PathWithFileName>
<FilenameWithoutPath>stm32c0xx.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\stm32c031xx.h</PathWithFileName>
<FilenameWithoutPath>stm32c031xx.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\system_stm32c0xx.c</PathWithFileName>
<FilenameWithoutPath>system_stm32c0xx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\gnu\startup_stm32c031xx.c</PathWithFileName>
<FilenameWithoutPath>startup_stm32c031xx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>QP</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qep_hsm.c</PathWithFileName>
<FilenameWithoutPath>qep_hsm.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qep_msm.c</PathWithFileName>
<FilenameWithoutPath>qep_msm.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_act.c</PathWithFileName>
<FilenameWithoutPath>qf_act.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>14</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_actq.c</PathWithFileName>
<FilenameWithoutPath>qf_actq.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_defer.c</PathWithFileName>
<FilenameWithoutPath>qf_defer.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_dyn.c</PathWithFileName>
<FilenameWithoutPath>qf_dyn.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_mem.c</PathWithFileName>
<FilenameWithoutPath>qf_mem.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_ps.c</PathWithFileName>
<FilenameWithoutPath>qf_ps.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_qact.c</PathWithFileName>
<FilenameWithoutPath>qf_qact.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_qeq.c</PathWithFileName>
<FilenameWithoutPath>qf_qeq.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_qmact.c</PathWithFileName>
<FilenameWithoutPath>qf_qmact.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qf\qf_time.c</PathWithFileName>
<FilenameWithoutPath>qf_time.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>23</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qv\qv.c</PathWithFileName>
<FilenameWithoutPath>qv.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>QP_port</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>24</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\gnu\qp_port.h</PathWithFileName>
<FilenameWithoutPath>qp_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>25</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\gnu\qs_port.h</PathWithFileName>
<FilenameWithoutPath>qs_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qv\gnu\qv_port.c</PathWithFileName>
<FilenameWithoutPath>qv_port.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>QS</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>27</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qs\qs.c</PathWithFileName>
<FilenameWithoutPath>qs.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qs\qs_64bit.c</PathWithFileName>
<FilenameWithoutPath>qs_64bit.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qs\qs_fp.c</PathWithFileName>
<FilenameWithoutPath>qs_fp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qs\qs_rx.c</PathWithFileName>
<FilenameWithoutPath>qs_rx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\src\qs\qstamp.c</PathWithFileName>
<FilenameWithoutPath>qstamp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,271 @@
//============================================================================
// QP configuration file (QK on ARM Cortex-M)
// Last updated for version: 7.3.0
// Last updated on: 2023-10-30
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
#ifndef QP_CONFIG_H_
#define QP_CONFIG_H_
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// <n>NOTE: Requires command-line macro: QP_CONFIG
// <i>This qp_config.h header file is activated only when the macro
// <i>QP_CONFIG is defined on the command-line to the compiler
// <n>-------------------------------------------
// <o>QP API compatibility version (QP_API_VERSION)
// <0=> 0 (Maximum compatibility)
// <580=>580 (QP 5.8.0 or newer)
// <660=>660 (QP 6.6.0 or newer)
// <691=>691 (QP 6.9.1 or newer)
// <700=>700 (QP 7.0.0 or newer)
// <9999=>9999 (Latest only)
// <i>QP API backwards compatibility with the QP/C API version.
// <i>Lower QP_API_VERSION values enable backwards compatibility
// <i>with lower (older) QP API versions.
// <i>For example, QP_API_VERSION==691 will enable the compatibility
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
// <i>QP_API_VERSION==0 enables the maximum currently supported
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
// <i>that no backwards compatibility layer should be enabled.
// <i>Default: 0 (All supported)
#define QP_API_VERSION 0
//..........................................................................
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
// <i>The QP FuSa Subsystem consists of the following facilities:
// <i>- Software assertions as a recommended technique
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
// <i> * Duplicate Inverse Storage for critical variables
// <i> * Memory Markers for critical objects (e.g., events)
// <i> * Hard-limits for all loops
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
// <c3>Disable QP FuSa in development
// <i>Disable assertions and other self monitoring features
// <i>in development build configurations (NDEBUG undefined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifndef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// <c3>Disable QP FuSa in production release
// <i>Disable assertions and other self monitoring features
// <i>in the release build configurations (NDEBUG defined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifdef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// </h>
//..........................................................................
// <h>QEP Event Processor
// <i>Events and state machines.
// <o>Event signal size (Q_SIGNAL_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the QEvt signal for QEP/QF [bytes]
// <i>Default: 2
#define Q_SIGNAL_SIZE 2U
// </h>
//..........................................................................
// <h>QF Framework
// <i>Active Object framework
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
// <i>Maximum # Active Objects in the system <1..64>
// <i>Default: 32
#define QF_MAX_ACTIVE 32U
// <o>Maximum # event pools (QF_MAX_EPOOL)
// <0=>0 no event pools
// <1=>1 <2=>2 <3=>3 (deafult) <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # Event Pools <1..15>
// <i>Default: 3
#define QF_MAX_EPOOL 3U
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
// <0=>0 no time events
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # clock tick rates for time events <1..15>
// <i>Default: 1
#define QF_MAX_TICK_RATE 1U
// <c1>Dynamic Event Constructor (QEVT_DYN_CTOR)
// <i>Dynamic Event Constructor (RAII)
//#define QEVT_DYN_CTOR
// </c>
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
// <i>Enable Active Object stop API (Not recommended)
//#define QACTIVE_CAN_STOP
// </c>
// <o>Event size (QF_EVENT_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the dynamic events for QF [bytes]
// <i>Default: 2 (64K bytes maximum event size)
#define QF_EVENT_SIZ_SIZE 2U
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the QTimeEvt counter [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QF_TIMEEVT_CTR_SIZE 4U
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
// <1U=>1 (default)
// <2U=>2
// <4U=>4
// <i>Size of event queue counter [bytes]
// <i>Default: 1 (255 events maximum in a queue)
#define QF_EQUEUE_CTR_SIZE 1U
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool counter [bytes]
// <i>Default: 2 (64K blocks maximum in a pool)
#define QF_MPOOL_CTR_SIZE 2U
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool block [bytes]
// <i>Default: 2 (64K bytes maximum block size)
#define QF_MPOOL_SIZ_SIZE 2U
// </h>
//..........................................................................
// <h>QS Software Tracing
// <i>Target-resident component of QP/Spy software tracing system
// <i>(tracing instrumenation and command-input).
// <n>NOTE: Requires command-line macro: Q_SPY
// <i>The QS software tracing instrumenation is activated only when
// <i>the macro Q_SPY is defined on the command-line to the compiler.
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
// <o>QS timestamp size (QS_TIME_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the timestamp in QS [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QS_TIME_SIZE 4U
// <o>Object pointer size (QS_OBJ_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of object pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_OBJ_PTR_SIZE 4U
// <o>Function pointer size (QS_FUN_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of function pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_FUN_PTR_SIZE 4U
// <o>QS buffer counter size (QS_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the counter in the internal QS buffer [bytes]
// <i>Default: 2 (64K bytes in QS buffer)
#define QS_CTR_SIZE 2U
// </h>
//..........................................................................
// <h>QK Preemptive Non-Blocking Kernel
// <i>Preemptive non-blocking/blocking RTOS kernel.
// <h>Context switch callback (QF_ON_CONTEXT_SW)
// <c2>Context switch callback WITHOUT QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is undefined.
//#ifndef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// <c2>Context switch callback WITH QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is defined.
#ifdef Q_SPY
#define QF_ON_CONTEXT_SW
#endif
// </c>
// </h>
// <c2>MPU memory isolation (QF_MEM_ISOLATE)
// <i>Enable memory isolation (requires MPU)
// <i>NOTE: implies QF_ON_CONTEXT_SW.
//#define QF_MEM_ISOLATE
// </c>
// <c4>Use IRQ handler for QK return-from-preemption
// <i>Enable this option only if the NMI handler is used in the project.
// <i>If enabled, provide the otherwise unused IRQ number (QK_USE_IRQ_NUM)
// <i>and the corresponding IRQ handler name (QK_USE_IRQ_HANDLER)
// <i>in the "Text Editor" mode.
//#define QK_USE_IRQ_NUM 31
//#define QK_USE_IRQ_HANDLER Reserved31_IRQHandler
// </c>
// </h>
//------------- <<< end of configuration section >>> -----------------------
#endif // QP_CONFIG_H_

View File

@ -0,0 +1,271 @@
//============================================================================
// QP configuration file (QK on ARM Cortex-M)
// Last updated for version: 7.3.0
// Last updated on: 2023-10-30
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
#ifndef QP_CONFIG_H_
#define QP_CONFIG_H_
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// <n>NOTE: Requires command-line macro: QP_CONFIG
// <i>This qp_config.h header file is activated only when the macro
// <i>QP_CONFIG is defined on the command-line to the compiler
// <n>-------------------------------------------
// <o>QP API compatibility version (QP_API_VERSION)
// <0=> 0 (Maximum compatibility)
// <580=>580 (QP 5.8.0 or newer)
// <660=>660 (QP 6.6.0 or newer)
// <691=>691 (QP 6.9.1 or newer)
// <700=>700 (QP 7.0.0 or newer)
// <9999=>9999 (Latest only)
// <i>QP API backwards compatibility with the QP/C API version.
// <i>Lower QP_API_VERSION values enable backwards compatibility
// <i>with lower (older) QP API versions.
// <i>For example, QP_API_VERSION==691 will enable the compatibility
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
// <i>QP_API_VERSION==0 enables the maximum currently supported
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
// <i>that no backwards compatibility layer should be enabled.
// <i>Default: 0 (All supported)
#define QP_API_VERSION 0
//..........................................................................
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
// <i>The QP FuSa Subsystem consists of the following facilities:
// <i>- Software assertions as a recommended technique
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
// <i> * Duplicate Inverse Storage for critical variables
// <i> * Memory Markers for critical objects (e.g., events)
// <i> * Hard-limits for all loops
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
// <c3>Disable QP FuSa in development
// <i>Disable assertions and other self monitoring features
// <i>in development build configurations (NDEBUG undefined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifndef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// <c3>Disable QP FuSa in production release
// <i>Disable assertions and other self monitoring features
// <i>in the release build configurations (NDEBUG defined).
// <i>VIOLATES functional safety standards. NOT recommended !!!
//#ifdef NDEBUG
//#define Q_UNSAFE
//#endif
// </c>
// </h>
//..........................................................................
// <h>QEP Event Processor
// <i>Events and state machines.
// <o>Event signal size (Q_SIGNAL_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the QEvt signal for QEP/QF [bytes]
// <i>Default: 2
#define Q_SIGNAL_SIZE 2U
// </h>
//..........................................................................
// <h>QF Framework
// <i>Active Object framework
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
// <i>Maximum # Active Objects in the system <1..64>
// <i>Default: 32
#define QF_MAX_ACTIVE 32U
// <o>Maximum # event pools (QF_MAX_EPOOL)
// <0=>0 no event pools
// <1=>1 <2=>2 <3=>3 (deafult) <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # Event Pools <1..15>
// <i>Default: 3
#define QF_MAX_EPOOL 3U
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
// <0=>0 no time events
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
// <12=>12 <13=>13 <14=>14 <15=>15
// <i>Maximum # clock tick rates for time events <1..15>
// <i>Default: 1
#define QF_MAX_TICK_RATE 1U
// <c1>Dynamic Event Constructor (QEVT_DYN_CTOR)
// <i>Dynamic Event Constructor (RAII)
//#define QEVT_DYN_CTOR
// </c>
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
// <i>Enable Active Object stop API (Not recommended)
//#define QACTIVE_CAN_STOP
// </c>
// <o>Event size (QF_EVENT_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the dynamic events for QF [bytes]
// <i>Default: 2 (64K bytes maximum event size)
#define QF_EVENT_SIZ_SIZE 2U
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the QTimeEvt counter [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QF_TIMEEVT_CTR_SIZE 4U
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
// <1U=>1 (default)
// <2U=>2
// <4U=>4
// <i>Size of event queue counter [bytes]
// <i>Default: 1 (255 events maximum in a queue)
#define QF_EQUEUE_CTR_SIZE 1U
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool counter [bytes]
// <i>Default: 2 (64K blocks maximum in a pool)
#define QF_MPOOL_CTR_SIZE 2U
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of memory pool block [bytes]
// <i>Default: 2 (64K bytes maximum block size)
#define QF_MPOOL_SIZ_SIZE 2U
// </h>
//..........................................................................
// <h>QS Software Tracing
// <i>Target-resident component of QP/Spy software tracing system
// <i>(tracing instrumenation and command-input).
// <n>NOTE: Requires command-line macro: Q_SPY
// <i>The QS software tracing instrumenation is activated only when
// <i>the macro Q_SPY is defined on the command-line to the compiler.
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
// <o>QS timestamp size (QS_TIME_SIZE)
// <1U=>1
// <2U=>2
// <4U=>4 (default)
// <i>Size of the timestamp in QS [bytes]
// <i>Default: 4 (2^32 dynamic range)
#define QS_TIME_SIZE 4U
// <o>Object pointer size (QS_OBJ_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of object pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_OBJ_PTR_SIZE 4U
// <o>Function pointer size (QS_FUN_PTR_SIZE)
// <2U=>2
// <4U=>4 (default)
// <8U=>8
// <i>Size of function pointer for QS [bytes]
// <i>Default: 4 (4G address space)
#define QS_FUN_PTR_SIZE 4U
// <o>QS buffer counter size (QS_CTR_SIZE)
// <1U=>1
// <2U=>2 (default)
// <4U=>4
// <i>Size of the counter in the internal QS buffer [bytes]
// <i>Default: 2 (64K bytes in QS buffer)
#define QS_CTR_SIZE 2U
// </h>
//..........................................................................
// <h>QK Preemptive Non-Blocking Kernel
// <i>Preemptive non-blocking/blocking RTOS kernel.
// <h>Context switch callback (QF_ON_CONTEXT_SW)
// <c2>Context switch callback WITHOUT QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is undefined.
//#ifndef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// <c2>Context switch callback WITH QS
// <i>Enable context switch callback QF_onContextSw()
// <i>When Q_SPY is defined.
//#ifdef Q_SPY
//#define QF_ON_CONTEXT_SW
//#endif
// </c>
// </h>
// <c2>MPU memory isolation (QF_MEM_ISOLATE)
// <i>Enable memory isolation (requires MPU)
// <i>NOTE: implies QF_ON_CONTEXT_SW.
//#define QF_MEM_ISOLATE
// </c>
// <c4>Use IRQ handler for QK return-from-preemption
// <i>Enable this option only if the NMI handler is used in the project.
// <i>If enabled, provide the otherwise unused IRQ number (QK_USE_IRQ_NUM)
// <i>and the corresponding IRQ handler name (QK_USE_IRQ_HANDLER)
// <i>in the "Text Editor" mode.
//#define QK_USE_IRQ_NUM 31
//#define QK_USE_IRQ_HANDLER Reserved31_IRQHandler
// </c>
// </h>
//------------- <<< end of configuration section >>> -----------------------
#endif // QP_CONFIG_H_

View File

@ -0,0 +1,27 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'dpp-qxk'
* Target: 'dpp-dbg'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "stm32c0xx.h"
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Event Processor:qep:7.3.0 */
#define RTE_RTEF_QPC_QEP /* QP/C QEP */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Framework:qf:7.3.0 */
#define RTE_RTEF_QPC_QF /* QP/C QF */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Real-Time Kernel:qxk:7.3.0 */
#define RTE_RTEF_QPC_QXK /* QP/C QXK kernel */
#endif /* RTE_COMPONENTS_H */

View File

@ -0,0 +1,27 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'dpp-qxk'
* Target: 'dpp-rel'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "stm32c0xx.h"
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Event Processor:qep:7.3.0 */
#define RTE_RTEF_QPC_QEP /* QP/C QEP */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Framework:qf:7.3.0 */
#define RTE_RTEF_QPC_QF /* QP/C QF */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Real-Time Kernel:qxk:7.3.0 */
#define RTE_RTEF_QPC_QXK /* QP/C QXK kernel */
#endif /* RTE_COMPONENTS_H */

View File

@ -0,0 +1,29 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'dpp-qxk'
* Target: 'dpp-spy'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "stm32c0xx.h"
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Event Processor:qep:7.3.0 */
#define RTE_RTEF_QPC_QEP /* QP/C QEP */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Framework:qf:7.3.0 */
#define RTE_RTEF_QPC_QF /* QP/C QF */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Real-Time Kernel:qxk:7.3.0 */
#define RTE_RTEF_QPC_QXK /* QP/C QXK kernel */
/* QuantumLeaps.Quantum Leaps QP/C::RTEF:Software tracing:qs:7.3.0 */
#define RTE_RTEF_QPC_QS /* QP/C QS */
#endif /* RTE_COMPONENTS_H */

View File

@ -0,0 +1,23 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
;
; Adapted by Quantum Leaps:
; moved STACK as the first section in RW_STACK
; *************************************************************
LR_IROM1 0x08000000 0x00008000 { ; load region size_region
ER_IROM1 0x08000000 0x00008000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_STACK 0x20000000 {
* (STACK, +First)
}
RW_IRAM1 +0 (0x00003000 - 2048) {
.ANY (+RW +ZI)
}
}

View File

@ -0,0 +1,792 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\dbg\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>0</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>-U -O206 -S8 -C0 -P00 -N00("") -D00(00000000) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Target>
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\rel\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>0</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32C0x_32 -FL08000 -FS08000000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32C0x_32 -FL08000 -FS08000000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>1</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Target>
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\spy\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>0</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32C0x_32 -FL08000 -FS08000000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U-O206 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x400</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Group>
<GroupName>Source Code</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\bsp.c</PathWithFileName>
<FilenameWithoutPath>bsp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp.h</PathWithFileName>
<FilenameWithoutPath>bsp.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\dpp.h</PathWithFileName>
<FilenameWithoutPath>dpp.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\philo.c</PathWithFileName>
<FilenameWithoutPath>philo.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\table.c</PathWithFileName>
<FilenameWithoutPath>table.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\dpp-qxk.sct</PathWithFileName>
<FilenameWithoutPath>dpp-qxk.sct</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\xthread1.c</PathWithFileName>
<FilenameWithoutPath>xthread1.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\xthread2.c</PathWithFileName>
<FilenameWithoutPath>xthread2.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>nucleo-c031c6</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\stm32c0xx.h</PathWithFileName>
<FilenameWithoutPath>stm32c0xx.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\stm32c031xx.h</PathWithFileName>
<FilenameWithoutPath>stm32c031xx.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\system_stm32c0xx.c</PathWithFileName>
<FilenameWithoutPath>system_stm32c0xx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\3rd_party\nucleo-c031c6\arm\startup_stm32c031xx.s</PathWithFileName>
<FilenameWithoutPath>startup_stm32c031xx.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::RTEF</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>

File diff suppressed because it is too large Load Diff

View File

@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -148,7 +148,36 @@
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>70</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231756</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qxk\../bsp.c\70</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>QXK_priv_</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>QActive_registry_</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
@ -517,7 +546,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U-O206 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U-O206 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -540,7 +569,24 @@
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>76</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134241682</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qxk\../bsp.c\76</Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
@ -994,30 +1040,6 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</PathWithFileName>
<FilenameWithoutPath>qep_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>31</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</PathWithFileName>
<FilenameWithoutPath>qf_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>32</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qs_port.h</PathWithFileName>
<FilenameWithoutPath>qs_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
@ -1025,7 +1047,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1035,18 +1057,6 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>34</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</PathWithFileName>
<FilenameWithoutPath>qxk_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -1057,7 +1067,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>35</FileNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1069,7 +1079,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>36</FileNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1081,7 +1091,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>37</FileNumber>
<FileNumber>34</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1093,7 +1103,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>38</FileNumber>
<FileNumber>35</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1105,7 +1115,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>39</FileNumber>
<FileNumber>36</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -543,16 +544,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -563,11 +554,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
</File>
<File>
<FileName>qxk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -851,6 +837,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1208,16 +1195,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1228,11 +1205,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
</File>
<File>
<FileName>qxk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1340,7 +1312,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1516,6 +1488,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1873,16 +1846,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1893,11 +1856,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
</File>
<File>
<FileName>qxk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -140,7 +140,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=3145,367,3620,681,1)(1009=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1012=3145,367,3620,681,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -699,6 +699,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\qp_config.h</PathWithFileName>
<FilenameWithoutPath>qp_config.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -709,7 +721,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber>
<FileNumber>9</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -721,7 +733,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileNumber>10</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -733,7 +745,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -745,7 +757,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>11</FileNumber>
<FileNumber>12</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -765,7 +777,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>12</FileNumber>
<FileNumber>13</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -777,7 +789,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>13</FileNumber>
<FileNumber>14</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -789,7 +801,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>14</FileNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -801,7 +813,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>15</FileNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -813,7 +825,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>16</FileNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -825,7 +837,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>17</FileNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -837,7 +849,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>18</FileNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -849,7 +861,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>19</FileNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -861,7 +873,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>20</FileNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -873,7 +885,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>21</FileNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -885,7 +897,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>22</FileNumber>
<FileNumber>23</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -897,7 +909,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>23</FileNumber>
<FileNumber>24</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -909,7 +921,7 @@
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>24</FileNumber>
<FileNumber>25</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -929,7 +941,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>25</FileNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -949,7 +961,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>26</FileNumber>
<FileNumber>27</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -961,7 +973,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>27</FileNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -973,7 +985,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>28</FileNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -985,7 +997,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>29</FileNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -997,7 +1009,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>30</FileNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -418,6 +419,11 @@
<FileType>1</FileType>
<FilePath>..\..\main.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -630,7 +636,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -806,6 +812,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -952,7 +959,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1038,6 +1045,11 @@
<FileType>1</FileType>
<FilePath>..\..\main.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1250,7 +1262,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1426,6 +1438,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1658,6 +1671,11 @@
<FileType>1</FileType>
<FilePath>..\..\main.c</FilePath>
</File>
<File>
<FileName>qp_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\qp_config.h</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -85,9 +85,11 @@ Q_NORETURN Q_onError(char const *module, int_t const id) {
// for debugging, hang on in an endless loop...
for (;;) {
}
#endif
#else
NVIC_SystemReset();
for (;;) { // explicitly "no-return"
}
#endif
}
//............................................................................
void assert_failed(char const * const module, int_t const id); // prototype
@ -96,6 +98,7 @@ void assert_failed(char const * const module, int_t const id) {
}
// ISRs used in the application ==========================================
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
@ -143,7 +146,7 @@ void SysTick_Handler(void) {
QK_ISR_EXIT(); // inform QK about exiting an ISR
}
//............................................................................
// interrupt handler for testing preemptions in QK
// interrupt handler for testing preemptions
void EXTI0_1_IRQHandler(void); // prototype
void EXTI0_1_IRQHandler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
@ -575,7 +578,7 @@ void BSP_start(void) {
void BSP_displayPhilStat(uint8_t n, char const *stat) {
Q_UNUSED_PAR(n);
if (stat[0] == 'h') {
if (stat[0] == 'e') {
GPIOA->BSRR = (1U << LD4_PIN); // turn LED on
}
else {
@ -640,10 +643,11 @@ void QF_onStartup(void) {
SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
// assign all priority bits for preemption-prio. and none to sub-prio.
// NOTE: this might have been changed by STM32Cube.
NVIC_SetPriorityGrouping(0U);
// set priorities of ALL ISRs used in the system, see NOTE1
NVIC_SetPriority(USART2_IRQn, 0); // kernel UNAWARE interrupt
NVIC_SetPriority(USART2_IRQn, 0U); // kernel UNAWARE interrupt
NVIC_SetPriority(EXTI0_1_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U);
// ...
@ -678,7 +682,7 @@ void QK_onIdle(void) {
QF_INT_DISABLE();
QF_MEM_SYS();
if ((USART2->ISR & (1U << 7U)) != 0U) { // is TXE empty?
if ((USART2->ISR & (1U << 7U)) != 0U) { // is TXE empty?
uint16_t b = QS_getByte();
if (b != QS_EOD) { // not End-Of-Data?
USART2->TDR = b; // put into the DR register

View File

@ -132,9 +132,9 @@ LIB_DIRS :=
LIBS :=
# defines
DEFINES := \
DEFINES := -DSTM32C031xx \
-DQP_CONFIG \
-DSTM32C031xx
$(DEF)
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]

View File

@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -630,7 +631,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -806,6 +807,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -936,7 +938,7 @@
<Optim>6</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>0</OneElfS>
<OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
@ -952,7 +954,7 @@
<v6LangP>3</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1250,7 +1252,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1426,6 +1428,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U066BFF505153848667095842 -O206 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -149,11 +149,18 @@
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>QXK_priv_</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x20000200</ItemText>
<ItemText>0x200007C0</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
@ -994,30 +1001,6 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</PathWithFileName>
<FilenameWithoutPath>qep_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>31</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</PathWithFileName>
<FilenameWithoutPath>qf_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>32</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qs_port.h</PathWithFileName>
<FilenameWithoutPath>qs_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
@ -1025,7 +1008,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1035,18 +1018,6 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>34</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</PathWithFileName>
<FilenameWithoutPath>qxk_port.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -1057,7 +1028,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>35</FileNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1069,7 +1040,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>36</FileNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1081,7 +1052,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>37</FileNumber>
<FileNumber>34</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -1093,7 +1064,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>38</FileNumber>
<FileNumber>35</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -70,7 +70,7 @@
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>cmd /c "del .\dbg\qstamp.o"</UserProg1Name>
<UserProg2Name></UserProg2Name>
@ -80,7 +80,7 @@
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\dbg\dpp-qxk.bin .\dbg\dpp-qxk.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -313,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -337,7 +338,7 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define>QP_CONFIG</Define>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-c031c6</IncludePath>
</VariousControls>
@ -543,16 +544,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -563,11 +554,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
</File>
<File>
<FileName>qxk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -670,7 +656,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -846,6 +832,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1203,16 +1190,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1223,11 +1200,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
</File>
<File>
<FileName>qxk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1506,6 +1478,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1863,16 +1836,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1883,11 +1846,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
</File>
<File>
<FileName>qxk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.h</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QXK kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-08-28
// Last updated for version 7.3.1
// Last updated on 2023-12-03
//
// Q u a n t u m L e a P s
// ------------------------
@ -71,8 +71,8 @@ typedef struct {
//============================================================================
// Error handler and ISRs...
Q_NORETURN Q_onError(char const *module, int_t const id) {
// NOTE: this implementation of the assertion handler is intended only
Q_NORETURN Q_onError(char const * const module, int_t const id) {
// NOTE: this implementation of the error handler is intended only
// for debugging and MUST be changed for deployment of the application
// (assuming that you ship your production code with assertions enabled).
Q_UNUSED_PAR(module);
@ -85,9 +85,11 @@ Q_NORETURN Q_onError(char const *module, int_t const id) {
// for debugging, hang on in an endless loop...
for (;;) {
}
#endif
#else
NVIC_SystemReset();
for (;;) { // explicitly "no-return"
}
#endif
}
//............................................................................
void assert_failed(char const * const module, int_t const id); // prototype
@ -95,7 +97,8 @@ void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}
// ISRs used in the application ==========================================
// ISRs used in the application ==============================================
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QXK_ISR_ENTRY(); // inform QXK about entering an ISR
@ -143,7 +146,7 @@ void SysTick_Handler(void) {
QXK_ISR_EXIT(); // inform QXK about exiting an ISR
}
//............................................................................
// interrupt handler for testing preemptions in QXK
// interrupt handler for testing preemptions
void EXTI0_1_IRQHandler(void); // prototype
void EXTI0_1_IRQHandler(void) {
QXK_ISR_ENTRY(); // inform QXK about entering an ISR
@ -227,7 +230,7 @@ void QF_onContextSw(QActive *prev, QActive *next) {
// Table AO...................................................................
// size of Table instance, as power-of-2
#define TABLE_SIZE_POW2 ((uint32_t)6U)
#define TABLE_SIZE_POW2 ((uint32_t)7U)
__attribute__((aligned((1U << TABLE_SIZE_POW2))))
static uint8_t Table_sto[1U << TABLE_SIZE_POW2];
@ -257,9 +260,9 @@ static MPU_Region const MPU_Table[3] = {
};
#endif
// Philo AOs................................................................
// Philo AOs..................................................................
// size of Philo instance, as power-of-2
#define PHILO_SIZE_POW2 ((uint32_t)6U)
#define PHILO_SIZE_POW2 ((uint32_t)7U)
__attribute__((aligned((1U << PHILO_SIZE_POW2))))
static uint8_t Philo_sto[N_PHILO][1U << PHILO_SIZE_POW2];
@ -377,8 +380,8 @@ static MPU_Region const MPU_Philo[N_PHILO][3] = {
#endif
// XThread1 thread............................................................
#define XTHREAD1_SIZE_POW2 ((uint32_t)9U) // XThread1 instance + stack
#define XTHREAD1_STACK_SIZE ((uint32_t)448U) // Thread1 stack size
#define XTHREAD1_SIZE_POW2 ((uint32_t)10U) // XThread1 instance + stack
#define XTHREAD1_STACK_SIZE ((uint32_t)400U) // XThread1 stack size
__attribute__((aligned((1U << XTHREAD1_SIZE_POW2))))
uint8_t XThread1_sto[1U << XTHREAD1_SIZE_POW2];
@ -409,8 +412,8 @@ static MPU_Region const MPU_XThread1[3] = {
#endif
// XThread2 thread............................................................
#define XTHREAD2_SIZE_POW2 ((uint32_t)9U) // XThread2 instance + stack
#define XTHREAD2_STACK_SIZE ((uint32_t)448U) // Thread2 stack size
#define XTHREAD2_SIZE_POW2 ((uint32_t)10U) // XThread2 instance + stack
#define XTHREAD2_STACK_SIZE ((uint32_t)400U) // XThread2 stack size
__attribute__((aligned((1U << XTHREAD2_SIZE_POW2))))
uint8_t XThread2_sto[1U << XTHREAD2_SIZE_POW2];
@ -440,7 +443,7 @@ static MPU_Region const MPU_XThread2[3] = {
};
#endif
// Shared Event-pools......................................................
// Shared Event-pools.........................................................
#define EPOOLS_SIZE_POW2 ((uint32_t)8U)
__attribute__((aligned((1U << EPOOLS_SIZE_POW2))))

View File

@ -1,8 +1,8 @@
About this Example
==================
This example can be built from the command prompt with the provided
Makefile. The example can also be imported as a Makefile-based
project into Eclipse-based IDEs.
This example can be built in two different ways:
- from the command prompt with the provided Makefile.
- from the Atollic TRUEStudio-ST32 with the provided project.
The Makefile
@ -32,11 +32,29 @@ As described in the comment for this symbol, the GNU-ARM toolset is taken
from: http://gnutoolchains.com/arm-eabi
It is highly recommened to use the same GNU-ARM distribution, especially
for ARM Cortex-M4F projects, due to the support for the hardware FPU
for ARM Cortex-M projects, due to the support for the hardware FPU
(float-abi=hard).
***
Selecting QXK Exception
=======================
The QXK kernel needs a dedicated exception to return to the thread
context after preemption. The default is to use the NMI exception
for that purpose. However, in case NMI is needed for some other
purpose, the QXK port allows you to select a any, otherwise unused
IRQ for that purpose. To choose a given IRQ, you need to define
the macros QXK_USE_IRQ_NUM and QXK_USE_IRQ_HANDLER. These macros can
be provided on the command-line to the compiler.
For example, (see the vector table), you can define the QXK IRQ
as follows:
QXK_USE_IRQ_HANDLER=Reserved31_IRQHandler
QXK_USE_IRQ_NUM=31
Adjusting Stack and Heap Sizes
==============================
The stack and heap sizes are determined in this project by the GCC linker
script (.ld file), which provides a template of the recommended GCC linker
@ -45,37 +63,25 @@ script for QP applications.
Startup Code
============
The startup code for the STM32L0xx MCU used in this project is
The startup code for the STM32C0xx MCU used in this project is
located in the "3rd_party" folder in the following location:
3rd_party\nucleo-l053r8\gnu\startup_stm32l053xx.c
3rd_party\nucleo-c031c6\gnu\startup_stm32c031xx.c
The file startup_stm32l053xx.c provides a template of the recommended
The file startup_stm32c031xx.c provides a template of the recommended
startup for QP applications and should be easily customizable for other
ARM Cortex-M microcontrollers.
The startup file typically does not need to be modified or adapted for
applications. It provides only weak definitions of all exception and
interrupt handlers, as well as the assert_failed() function.
The weak function assert_failed() defined in this file might be re-defined
in the application to customize it for the application-specific error-
handling policy.
***
NOTE: The function assert_failed() typically should NOT use the stack,
because stack might be corrupted by the time this function is called.
Also, assert_failed() is intended to handle catastrophic errors and
should NOT return.
***
applications. It calls the assert_failed() function, which must be
defined in the application to customize it for the application-specific
error-handling policy.
Adjusting the CPU Clock Speed
=============================
The current setting is to run at 2MHz from the MSI (internal oscillator),
but the CPU clock speed can be modified by editing the file
system_stm32l1xx.c. Ther file system_stm32l0xx.c.pll provides an example
of clock setting using the PLL driven from the MSE.
The current setting is to run at 12MHz from the MSI (internal oscillator),
but the CPU clock speed can be modified.
***
NOTE:

View File

@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -467,7 +467,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -517,7 +517,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U0675FF504955857567065746 -O8399 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM)</Name>
<Name>-U0675FF504955857567065746 -O8399 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -532,7 +532,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=3008,635,3458,1192,1)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=2104,292,2581,607,0)</Name>
<Name>(1010=3008,635,3458,1192,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=2104,292,2581,607,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -544,20 +544,59 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>81</LineNumber>
<LineNumber>73</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134233186</Address>
<Address>134243960</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c</Filename>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qk\../../../../../ports/arm-cm/qk/armclang/qk_port.c\81</Expression>
<Expression>\\dpp_qk\../bsp.c\73</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>408</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134227038</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\..\src\qk\qk.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qk\../../../../../src/qk/qk.c\408</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>82</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134230908</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\..\..\src\qk\qk.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qk\../../../../../src/qk/qk.c\82</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>QK_priv_</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>

View File

@ -16,8 +16,8 @@
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -186,6 +186,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -681,8 +682,8 @@
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -851,6 +852,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1340,14 +1342,14 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -1516,6 +1518,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1643,7 +1646,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-22
// Last updated for version 7.3.1
// Last updated on 2023-11-29
//
// Q u a n t u m L e a P s
// ------------------------
@ -96,35 +96,24 @@ void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}
// ISRs used in the application ============================================
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
QK_ISR_ENTRY(); // inform QK about entering an ISR
uint32_t tmp;
#ifdef Q_SPY
{
tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
}
#endif
QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); // time events for rate 0
// Perform the debouncing of buttons. The algorithm for debouncing
// adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
// and Michael Barr, page 71.
//
// state of the button debouncing
static struct {
uint32_t depressed;
uint32_t previous;
} buttons = { 0U, 0U };
uint32_t current = BSP_PB_GetState(BUTTON_USER); // read the User button
tmp = buttons.depressed; // save the depressed buttons
uint32_t tmp = buttons.depressed; // save the depressed buttons
buttons.depressed |= (buttons.previous & current); // set depressed
buttons.depressed &= (buttons.previous | current); // clear released
buttons.previous = current; // update the history
@ -142,6 +131,11 @@ void SysTick_Handler(void) {
}
}
#ifdef Q_SPY
tmp = SysTick->CTRL; // clear SysTick_CTRL_COUNTFLAG
QS_tickTime_ += QS_tickPeriod_; // account for the clock rollover
#endif
QK_ISR_EXIT(); // inform QK about exiting an ISR
}
@ -176,67 +170,24 @@ void QF_onContextSw(QActive *prev, QActive *next) {
}
#endif // QF_ON_CONTEXT_SW
//............................................................................
// MPU setup for STM32H743ZI MCU
static void STM32H743ZI_MPU_setup(void) {
// The following MPU configuration contains just a generic ROM
// region (with read-only access) and NULL-pointer protection region.
// Otherwise, the MPU will fall back on the background region (PRIVDEFENA).
//
static struct {
uint32_t rbar;
uint32_t rasr;
} const mpu_setup[] = {
{ // region #0: Flash: base=0x0000'0000, size=512M=2^(28+1)
0x00000000U // base address
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 0U), // region #0
(28U << MPU_RASR_SIZE_Pos) // 2^(18+1) region
| (0x6U << MPU_RASR_AP_Pos) // PA:ro/UA:ro
| (1U << MPU_RASR_C_Pos) // C=1
| MPU_RASR_ENABLE_Msk // region enable
},
{ // region #7: NULL-pointer: base=0x000'0000, size=128M=2^(26+1)
// NOTE: this region extends to 0x080'0000, which is where
// the ROM is re-mapped by STM32
//
0x00000000U // base address
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 7U), // region #7
(26U << MPU_RASR_SIZE_Pos) // 2^(26+1)=128M region
| (0x0U << MPU_RASR_AP_Pos) // PA:na/UA:na
| (1U << MPU_RASR_XN_Pos) // XN=1
| MPU_RASR_ENABLE_Msk // region enable
},
};
// enable the MemManage_Handler for MPU exception
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
__DSB();
MPU->CTRL = 0U; // disable the MPU
for (uint_fast8_t n = 0U; n < Q_DIM(mpu_setup); ++n) {
MPU->RBAR = mpu_setup[n].rbar;
MPU->RASR = mpu_setup[n].rasr;
}
MPU->CTRL = MPU_CTRL_ENABLE_Msk // enable the MPU
| MPU_CTRL_PRIVDEFENA_Msk; // enable background region
__ISB();
__DSB();
}
//============================================================================
// BSP functions...
void BSP_init(void) {
// setup the MPU...
STM32H743ZI_MPU_setup();
// Configure the MPU to prevent NULL-pointer dereferencing ...
MPU->RBAR = 0x0U // base address (NULL)
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 7U); // region #7
MPU->RASR = (7U << MPU_RASR_SIZE_Pos) // 2^(7+1) region
| (0x0U << MPU_RASR_AP_Pos) // no-access region
| MPU_RASR_ENABLE_Msk; // region enable
MPU->CTRL = MPU_CTRL_PRIVDEFENA_Msk // enable background region
| MPU_CTRL_ENABLE_Msk; // enable the MPU
__ISB();
__DSB();
// NOTE: SystemInit() has been already called from the startup code
// but SystemCoreClock needs to be updated
SystemCoreClockUpdate();
// enable the MemManage_Handler for MPU exception
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
SCB_EnableICache(); // Enable I-Cache
SCB_EnableDCache(); // Enable D-Cache
@ -254,8 +205,7 @@ void BSP_init(void) {
// Configure the User Button in GPIO Mode
BSP_PB_Init(BUTTON_USER, BUTTON_MODE_GPIO);
//...
BSP_randomSeed(1234U);
BSP_randomSeed(1234U); // seed the random number generator
// initialize the QS software tracing...
if (!QS_INIT((void *)0)) {
@ -272,7 +222,9 @@ void BSP_init(void) {
// setup the QS filters...
QS_GLB_FILTER(QS_ALL_RECORDS); // all records
QS_GLB_FILTER(-QS_QF_TICK); // exclude the clock tick
QS_GLB_FILTER(-QS_QF_TICK); // exclude
QS_GLB_FILTER(-QS_SCHED_LOCK); // exclude
QS_GLB_FILTER(-QS_SCHED_UNLOCK); // exclude
}
//............................................................................
void BSP_start(void) {
@ -304,14 +256,16 @@ void BSP_start(void) {
static QEvt const *tableQueueSto[N_PHILO];
Table_ctor();
QACTIVE_START(AO_Table,
N_PHILO + 7U, // QP prio. of the AO
tableQueueSto, // event queue storage
Q_DIM(tableQueueSto), // queue length [events]
(void *)0, 0U, // no stack storage
(void *)0); // no initialization param
N_PHILO + 7U, // QP prio. of the AO
tableQueueSto, // event queue storage
Q_DIM(tableQueueSto), // queue length [events]
(void *)0, 0U, // no stack storage
(void *)0); // no initialization param
}
//............................................................................
void BSP_displayPhilStat(uint8_t n, char const *stat) {
Q_UNUSED_PAR(n);
if (stat[0] == 'e') {
BSP_LED_On(LED1);
}
@ -361,7 +315,7 @@ uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
}
//............................................................................
void BSP_terminate(int16_t result) {
(void)result;
Q_UNUSED_PAR(result);
}
//............................................................................
void BSP_ledOn(void) {
@ -375,17 +329,17 @@ void BSP_ledOff(void) {
//============================================================================
// QF callbacks...
void QF_onStartup(void) {
// assign all priority bits for preemption-prio. and none to sub-prio.
// NOTE: this might have been changed by STM32Cube.
//
NVIC_SetPriorityGrouping(0U);
// set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
// assign all priority bits for preemption-prio. and none to sub-prio.
// NOTE: this might have been changed by STM32Cube.
NVIC_SetPriorityGrouping(0U);
// set priorities of ALL ISRs used in the system, see NOTE1
NVIC_SetPriority(USART3_IRQn, 0U); // kernel unaware interrupt
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI);
NVIC_SetPriority(USART3_IRQn, 0U); // kernel UNAWARE interrupt
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
// ...
// enable IRQs...
@ -404,17 +358,20 @@ void QK_onIdle(void) {
BSP_LED_Off(LED3);
QF_INT_ENABLE();
// exercise scheduler lock from idle thread
QSchedStatus lockStat = QK_schedLock(1U); // 1U prio. ceiling
// Some floating point code is to exercise the VFP...
double volatile x = 1.73205;
x = x * 1.73205;
QK_schedUnlock(lockStat);
#ifdef Q_SPY
QF_INT_DISABLE();
QS_rxParse(); // parse all the received bytes
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
if ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) != 0U) { // TXE empty?
QF_INT_DISABLE();
uint16_t b = QS_getByte();
@ -424,23 +381,11 @@ void QK_onIdle(void) {
l_uartHandle.Instance->TDR = b; // put into TDR
}
}
QF_INT_ENABLE();
#elif defined NDEBUG
// Put the CPU and peripherals to the low-power mode.
// you might need to customize the clock management for your application,
// see the datasheet for your particular Cortex-M MCU.
//
// !!!CAUTION!!!
// The WFI instruction stops the CPU clock, which unfortunately disables
// the JTAG port, so the ST-Link debugger can no longer connect to the
// board. For that reason, the call to __WFI() has to be used with CAUTION.
//
// NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
// reset the board, then connect with ST-Link Utilities and erase the part.
// The trick with BOOT(0) is it gets the part to run the System Loader
// instead of your broken code. When done disconnect BOOT0, and start over.
//
//__WFI(); // Wait-For-Interrupt
__WFI(); // Wait-For-Interrupt
#endif
}
@ -467,7 +412,7 @@ uint8_t QS_onStartup(void const *arg) {
l_uartHandle.Init.Mode = UART_MODE_TX_RX;
l_uartHandle.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&l_uartHandle) != HAL_OK) {
return 0U; // return failure
return 0U; // failure
}
// Set UART to receive 1 byte at a time via interrupt
@ -482,7 +427,7 @@ uint8_t QS_onStartup(void const *arg) {
void QS_onCleanup(void) {
}
//............................................................................
QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set?
return QS_tickTime_ - (QSTimeCtr)SysTick->VAL;
}
@ -517,7 +462,7 @@ void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{
@ -544,14 +489,14 @@ void QS_onCommand(uint8_t cmdId,
// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
// level (i.e., with the numerical values of priorities less than
// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
// Such "QF-unaware" ISRs cannot call any QF services. In particular they
// Such "QF-unaware" ISRs cannot call ANY QF services. In particular they
// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
// by which a "QF-unaware" ISR can communicate with the QF framework is by
// triggering a "QF-aware" ISR, which can post/publish events.
//
// NOTE2:
// The User LED is used to visualize the idle loop activity. The brightness
// of the LED is proportional to the frequency of invcations of the idle loop.
// of the LED is proportional to the frequency of the idle loop.
// Please note that the LED is toggled with interrupts locked, so no interrupt
// execution time contributes to the brightness of the User LED.
//

View File

@ -16,8 +16,8 @@
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -186,6 +186,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -681,8 +682,8 @@
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -851,6 +852,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1340,14 +1342,14 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -1516,6 +1518,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1643,7 +1646,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-22
// Last updated for version 7.3.1
// Last updated on 2023-11-30
//
// Q u a n t u m L e a P s
// ------------------------
@ -170,67 +170,24 @@ void QF_onContextSw(QActive *prev, QActive *next) {
}
#endif // QF_ON_CONTEXT_SW
//............................................................................
// MPU setup for STM32H743ZI MCU
static void STM32H743ZI_MPU_setup(void) {
// The following MPU configuration contains just a generic ROM
// region (with read-only access) and NULL-pointer protection region.
// Otherwise, the MPU will fall back on the background region (PRIVDEFENA).
//
static struct {
uint32_t rbar;
uint32_t rasr;
} const mpu_setup[] = {
{ // region #0: Flash: base=0x0000'0000, size=512M=2^(28+1)
0x00000000U // base address
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 0U), // region #0
(28U << MPU_RASR_SIZE_Pos) // 2^(18+1) region
| (0x6U << MPU_RASR_AP_Pos) // PA:ro/UA:ro
| (1U << MPU_RASR_C_Pos) // C=1
| MPU_RASR_ENABLE_Msk // region enable
},
{ // region #7: NULL-pointer: base=0x000'0000, size=128M=2^(26+1)
// NOTE: this region extends to 0x080'0000, which is where
// the ROM is re-mapped by STM32
//
0x00000000U // base address
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 7U), // region #7
(26U << MPU_RASR_SIZE_Pos) // 2^(26+1)=128M region
| (0x0U << MPU_RASR_AP_Pos) // PA:na/UA:na
| (1U << MPU_RASR_XN_Pos) // XN=1
| MPU_RASR_ENABLE_Msk // region enable
},
};
// enable the MemManage_Handler for MPU exception
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
__DSB();
MPU->CTRL = 0U; // disable the MPU
for (uint_fast8_t n = 0U; n < Q_DIM(mpu_setup); ++n) {
MPU->RBAR = mpu_setup[n].rbar;
MPU->RASR = mpu_setup[n].rasr;
}
MPU->CTRL = MPU_CTRL_ENABLE_Msk // enable the MPU
| MPU_CTRL_PRIVDEFENA_Msk; // enable background region
__ISB();
__DSB();
}
//============================================================================
// BSP functions...
void BSP_init(void) {
// setup the MPU...
STM32H743ZI_MPU_setup();
// Configure the MPU to prevent NULL-pointer dereferencing ...
MPU->RBAR = 0x0U // base address (NULL)
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 7U); // region #7
MPU->RASR = (7U << MPU_RASR_SIZE_Pos) // 2^(7+1) region
| (0x0U << MPU_RASR_AP_Pos) // no-access region
| MPU_RASR_ENABLE_Msk; // region enable
MPU->CTRL = MPU_CTRL_PRIVDEFENA_Msk // enable background region
| MPU_CTRL_ENABLE_Msk; // enable the MPU
__ISB();
__DSB();
// NOTE: SystemInit() has been already called from the startup code
// but SystemCoreClock needs to be updated
SystemCoreClockUpdate();
// enable the MemManage_Handler for MPU exception
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
SCB_EnableICache(); // Enable I-Cache
SCB_EnableDCache(); // Enable D-Cache
@ -340,7 +297,8 @@ uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
double volatile x = 3.1415926;
x = x + 2.7182818;
// "Super-Duper" Linear Congruential Generator (LCG)
// NOTE: scheduler locking not needed in the QV kernel
// LCG(2^32, 3*7*11*13*23, 0, seed)
//
uint32_t rnd = l_rndSeed * (3U*7U*11U*13U*23U);
@ -349,10 +307,6 @@ uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
return (rnd >> 8U);
}
//............................................................................
void BSP_terminate(int16_t result) {
(void)result;
}
//............................................................................
void BSP_ledOn(void) {
BSP_LED_On(LED1);
}
@ -360,11 +314,16 @@ void BSP_ledOn(void) {
void BSP_ledOff(void) {
BSP_LED_Off(LED1);
}
//............................................................................
void BSP_terminate(int16_t result) {
(void)result;
}
//============================================================================
// QF callbacks...
void QF_onStartup(void) {
// set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
// assign all priority bits for preemption-prio. and none to sub-prio.
@ -372,8 +331,8 @@ void QF_onStartup(void) {
NVIC_SetPriorityGrouping(0U);
// set priorities of ALL ISRs used in the system, see NOTE1
NVIC_SetPriority(USART3_IRQn, 0U); // kernel unaware interrupt
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
NVIC_SetPriority(USART3_IRQn, 0U); // kernel UNAWARE interrupt
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
// ...
// enable IRQs...
@ -389,17 +348,17 @@ void QV_onIdle(void) { // CATION: called with interrupts DISABLED, NOTE0
// toggle the User LED on and then off, see NOTE2
BSP_LED_On (LED3);
BSP_LED_Off(LED3);
QF_INT_ENABLE();
// Some floating point code is to exercise the VFP...
QF_INT_ENABLE();
double volatile x = 1.73205;
x = x * 1.73205;
QF_INT_DISABLE();
#ifdef Q_SPY
QF_INT_DISABLE();
// interrupts still disabled
QS_rxParse(); // parse all the received bytes
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
if ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) != 0U) { // TXE empty?
QF_INT_DISABLE();
@ -414,19 +373,7 @@ void QV_onIdle(void) { // CATION: called with interrupts DISABLED, NOTE0
// Put the CPU and peripherals to the low-power mode.
// you might need to customize the clock management for your application,
// see the datasheet for your particular Cortex-M MCU.
//
// !!!CAUTION!!!
// The WFI instruction stops the CPU clock, which unfortunately disables
// the JTAG port, so the ST-Link debugger can no longer connect to the
// board. For that reason, the call to __WFI() has to be used with CAUTION.
//
// NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
// reset the board, then connect with ST-Link Utilities and erase the part.
// The trick with BOOT(0) is it gets the part to run the System Loader
// instead of your broken code. When done disconnect BOOT0, and start over.
//
//__WFI(); // Wait-For-Interrupt
QF_INT_ENABLE(); // for now, just enable interrupts
QV_CPU_SLEEP(); // atomically go to sleep and enable interrupts
#else
QF_INT_ENABLE(); // just enable interrupts
#endif
@ -455,7 +402,7 @@ uint8_t QS_onStartup(void const *arg) {
l_uartHandle.Init.Mode = UART_MODE_TX_RX;
l_uartHandle.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&l_uartHandle) != HAL_OK) {
return 0U; // return failure
return 0U; // failure
}
// Set UART to receive 1 byte at a time via interrupt
@ -532,14 +479,14 @@ void QS_onCommand(uint8_t cmdId,
//
// Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e.,
// with the numerical values of priorities equal or higher than
// QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY
// macros or any other QF services. These ISRs are "QF-aware".
// QF_AWARE_ISR_CMSIS_PRI) are allowed to call any QF services. These ISRs
// are "QF-aware".
//
// Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority
// level (i.e., with the numerical values of priorities less than
// QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel.
// Such "QF-unaware" ISRs cannot call any QF services. In particular they
// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism
// Such "QF-unaware" ISRs cannot call ANY QF/QV services. In particular they
// can NOT call the macros QV_ISR_ENTRY/QV_ISR_ENTRY. The only mechanism
// by which a "QF-unaware" ISR can communicate with the QF framework is by
// triggering a "QF-aware" ISR, which can post/publish events.
//

View File

@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -125,7 +125,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U0675FF504955857567065746 -O8399 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM)</Name>
<Name>-U0675FF504955857567065746 -O8399 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -148,7 +148,24 @@
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>73</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134236080</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\dpp_qxk\../bsp.c\73</Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
@ -271,7 +288,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -481,7 +498,7 @@
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>0</tGomain>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
@ -544,6 +561,22 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>73</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\bsp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>327</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134242960</Address>

View File

@ -10,14 +10,14 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -186,6 +186,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -313,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -711,8 +712,8 @@
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -881,6 +882,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1027,7 +1029,7 @@
<v6LangP>3</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>1</v6Lto>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
@ -1400,14 +1402,14 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32H743ZITx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32H7xx_DFP.3.0.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32H7xx_DFP.3.1.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -1576,6 +1578,7 @@
<RvdsVP>3</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1703,7 +1706,7 @@
</ArmAdsMisc>
<Cads>
<interw>0</interw>
<Optim>1</Optim>
<Optim>7</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -2021,7 +2024,7 @@
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>2</wLevel>
<wLevel>3</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.1
// Last updated on 2023-11-29
//
// Q u a n t u m L e a P s
// ------------------------
@ -96,7 +96,6 @@ void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}
// ISRs used in the application ============================================
void SysTick_Handler(void); // prototype
@ -190,10 +189,6 @@ void BSP_init(void) {
// enable the MemManage_Handler for MPU exception
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
// NOTE: SystemInit() has been already called from the startup code
// but SystemCoreClock needs to be updated
SystemCoreClockUpdate();
SCB_EnableICache(); // Enable I-Cache
SCB_EnableDCache(); // Enable D-Cache
@ -227,7 +222,9 @@ void BSP_init(void) {
// setup the QS filters...
QS_GLB_FILTER(QS_ALL_RECORDS); // all records
QS_GLB_FILTER(-QS_QF_TICK); // exclude the clock tick
QS_GLB_FILTER(-QS_QF_TICK); // exclude
QS_GLB_FILTER(-QS_SCHED_LOCK); // exclude
QS_GLB_FILTER(-QS_SCHED_UNLOCK); // exclude
}
//............................................................................
void BSP_start(void) {
@ -333,7 +330,7 @@ uint32_t BSP_random(void) { // a very cheap pseudo-random-number generator
}
//............................................................................
void BSP_terminate(int16_t result) {
(void)result;
Q_UNUSED_PAR(result);
}
//............................................................................
void BSP_ledOn(void) {
@ -352,6 +349,7 @@ void QF_onStartup(void) {
NVIC_SetPriorityGrouping(0U);
// set up the SysTick timer to fire at BSP_TICKS_PER_SEC rate
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SEC);
// set priorities of ALL ISRs used in the system, see NOTE1
@ -375,10 +373,15 @@ void QXK_onIdle(void) {
BSP_LED_Off(LED3);
QF_INT_ENABLE();
// exercise scheduler lock from idle thread
QSchedStatus lockStat = QXK_schedLock(1U); // 1U prio. ceiling
// Some floating point code is to exercise the VFP...
double volatile x = 1.73205;
x = x * 1.73205;
QXK_schedUnlock(lockStat);
#ifdef Q_SPY
QF_INT_DISABLE();
QS_rxParse(); // parse all the received bytes

View File

@ -81,7 +81,7 @@ static inline TableEvt * TableEvt_ctor(TableEvt * const me,
{
if (me != (TableEvt *)0) {
// don't call QEvt_ctor() because the initialization of all
// QEvt attributes is already done in QF_QF_newX_()
// QEvt attributes is already done in QF_newX_()
me->philoId = id;
}
return me;

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -811,6 +812,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1436,6 +1438,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -132,10 +132,7 @@ LIB_DIRS :=
LIBS :=
# defines
DEFINES := \
-DQF_ON_CONTEXT_SW \
-DQK_USE_IRQ_HANDLER=LCD_IRQHandler \
-DQK_USE_IRQ_NUM=30
DEFINES := -DSTM32L053xx
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]

View File

@ -228,6 +228,7 @@
<name>CCDefines</name>
<state>QK_USE_IRQ_HANDLER=LCD_IRQHandler</state>
<state>QK_USE_IRQ_NUM=30</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -1307,6 +1308,7 @@
<option>
<name>CCDefines</name>
<state>NDEBUG</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -2073,7 +2075,7 @@
</option>
<option>
<name>IlinkTrustzoneImportLibraryOut</name>
<state>###Unitialized###</state>
<state>dpp-qk_import_lib.o</state>
</option>
<option>
<name>OILinkExtraOption</name>
@ -2386,6 +2388,7 @@
<option>
<name>CCDefines</name>
<state>Q_SPY</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>

View File

@ -1,7 +1,7 @@
##############################################################################
# Product: Makefile for QP/C on NUCLEO-L053R8, QV kernel, GNU-ARM
# Last Updated for Version: 7.2.0
# Date of the Last Update: 2022-12-13
# Last Updated for Version: 7.3.1
# Date of the Last Update: 2023-11-13
#
# Q u a n t u m L e a P s
# ------------------------
@ -133,7 +133,7 @@ LIB_DIRS :=
LIBS :=
# defines
DEFINES := -DQV_ON_CONTEXT_SW
DEFINES := -DSTM32L053xx
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]

View File

@ -226,7 +226,7 @@
</option>
<option>
<name>CCDefines</name>
<state></state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -1149,7 +1149,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>9.10.2.39304</state>
<state>9.32.1.54977</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
@ -1306,6 +1306,7 @@
<option>
<name>CCDefines</name>
<state>NDEBUG</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -2386,6 +2387,7 @@
<name>CCDefines</name>
<state>Q_SPY</state>
<state>QF_ON_CONTEXT_SW</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>

View File

@ -1,7 +1,7 @@
##############################################################################
# Product: Makefile for QP/C, DPP on NUCLEO-L053R8, QXK kernel, GNU-ARM
# Last Updated for Version: 7.2.0
# Date of the Last Update: 2022-12-13
# Last Updated for Version: 7.3.1
# Date of the Last Update: 2023-11-13
#
# Q u a n t u m L e a P s
# ------------------------
@ -138,10 +138,7 @@ LIB_DIRS :=
LIBS :=
# defines
DEFINES := \
-DQF_ON_CONTEXT_SW \
-DQXK_USE_IRQ_NUM=30 \
-DQXK_USE_IRQ_HANDLER=LCD_IRQHandler
DEFINES := -DSTM32L053xx
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]

View File

@ -229,6 +229,7 @@
<state>QXK_USE_IRQ_HANDLER=LCD_IRQHandler</state>
<state>QXK_USE_IRQ_NUM=30</state>
<state>QF_ON_CONTEXT_SW</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -1308,6 +1309,7 @@
<option>
<name>CCDefines</name>
<state>NDEBUG</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -2388,6 +2390,7 @@
<name>CCDefines</name>
<state>Q_SPY</state>
<state>QF_ON_CONTEXT_SW</state>
<state>STM32L053xx</state>
</option>
<option>
<name>CCPreprocFile</name>

View File

@ -294,7 +294,7 @@
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>5</nTsel>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>

View File

@ -10,7 +10,7 @@
<TargetName>dpp-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -313,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>4</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -700,7 +701,7 @@
<TargetName>dpp-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -876,6 +877,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1003,7 +1005,7 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>4</Optim>
<Optim>6</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
@ -1390,7 +1392,7 @@
<TargetName>dpp-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1566,6 +1568,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
@ -1693,7 +1696,7 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>2</Optim>
<Optim>7</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>

View File

@ -157,8 +157,9 @@ if (me-&gt;last_mine_x &gt; 0U) {
if ((me-&gt;last_mine_x + GAME_MINES_DIST_MIN &lt; GAME_TUNNEL_WIDTH)
&amp;&amp; (rnd &lt; 8U)) // place the mines only 5% of the time
{
// look for disabled mines...
uint8_t n;
for (n = 0U; n &lt; Q_DIM(me-&gt;mines); ++n) { //look for disabled mines
for (n = 0U; n &lt; Q_DIM(me-&gt;mines); ++n) {
if (me-&gt;mines[n] == (QHsm *)0) {
break;
}
@ -182,11 +183,12 @@ if ((me-&gt;last_mine_x + GAME_MINES_DIST_MIN &lt; GAME_TUNNEL_WIDTH)
- me-&gt;wall_thickness_bottom - 4U);
me-&gt;last_mine_y = (uint8_t)(me-&gt;wall_thickness_top + 2U + rnd);
ObjectPosEvt ope; // event to dispatch to the Mine
QEvt_ctor(&amp;ope.super, MINE_PLANT_SIG);
ope.x = me-&gt;last_mine_x;
ope.y = me-&gt;last_mine_y;
// direct dispatch
// event to dispatch to the Mine
ObjectPosEvt ope = {
QEVT_INITIALIZER(MINE_PLANT_SIG),
.x = me-&gt;last_mine_x,
.y = me-&gt;last_mine_y
};
QASM_DISPATCH(me-&gt;mines[n], &amp;ope.super, me-&gt;super.prio);
}
}</code>

View File

@ -49,10 +49,10 @@ typedef struct Mine1 {
// public:
uint8_t exp_ctr;
} Mine1;
extern Mine1 Mine1_inst[GAME_MINES_MAX];
// public:
static void Mine1_ctor(Mine1 * const me);
extern Mine1 Mine1_inst[GAME_MINES_MAX];
// protected:
static QState Mine1_initial(Mine1 * const me, void const * const par);

View File

@ -49,10 +49,10 @@ typedef struct Mine2 {
// public:
uint8_t exp_ctr;
} Mine2;
extern Mine2 Mine2_inst[GAME_MINES_MAX];
// public:
static void Mine2_ctor(Mine2 * const me);
extern Mine2 Mine2_inst[GAME_MINES_MAX];
// protected:
static QState Mine2_initial(Mine2 * const me, void const * const par);

View File

@ -49,10 +49,10 @@ typedef struct Missile {
// public:
} Missile;
extern Missile Missile_inst;
// public:
static void Missile_ctor(Missile * const me);
extern Missile Missile_inst;
// protected:
static QState Missile_initial(Missile * const me, void const * const par);

View File

@ -53,10 +53,10 @@ typedef struct Ship {
// public:
} Ship;
extern Ship Ship_inst;
// public:
static void Ship_ctor(Ship * const me);
extern Ship Ship_inst;
// protected:
static QState Ship_initial(Ship * const me, void const * const par);

View File

@ -57,6 +57,7 @@ typedef struct Tunnel {
// public:
} Tunnel;
extern Tunnel Tunnel_inst;
// private:
static void Tunnel_advance(Tunnel * const me);
@ -66,7 +67,6 @@ static void Tunnel_dispatchToAllMines(Tunnel * const me,
// public:
static void Tunnel_ctor(Tunnel * const me);
extern Tunnel Tunnel_inst;
// protected:
static QState Tunnel_initial(Tunnel * const me, void const * const par);
@ -160,8 +160,9 @@ static void Tunnel_plantMine(Tunnel * const me) {
if ((me->last_mine_x + GAME_MINES_DIST_MIN < GAME_TUNNEL_WIDTH)
&& (rnd < 8U)) // place the mines only 5% of the time
{
// look for disabled mines...
uint8_t n;
for (n = 0U; n < Q_DIM(me->mines); ++n) { //look for disabled mines
for (n = 0U; n < Q_DIM(me->mines); ++n) {
if (me->mines[n] == (QHsm *)0) {
break;
}
@ -185,11 +186,12 @@ static void Tunnel_plantMine(Tunnel * const me) {
- me->wall_thickness_bottom - 4U);
me->last_mine_y = (uint8_t)(me->wall_thickness_top + 2U + rnd);
ObjectPosEvt ope; // event to dispatch to the Mine
QEvt_ctor(&ope.super, MINE_PLANT_SIG);
ope.x = me->last_mine_x;
ope.y = me->last_mine_y;
// direct dispatch
// event to dispatch to the Mine
ObjectPosEvt ope = {
QEVT_INITIALIZER(MINE_PLANT_SIG),
.x = me->last_mine_x,
.y = me->last_mine_y
};
QASM_DISPATCH(me->mines[n], &ope.super, me->super.prio);
}
}

View File

@ -0,0 +1,64 @@
> **NOTE**
This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers.
# Real-Time Example on NUCLEO-L053R8
This example implements the "Periodic-Sporadic" application on the STM32 NUCLEO-L053R8 board (ARM Cortex-M0+). The example demonstrates various real-time preemption scenarios among active objects in the **QK** and **QV** kernels. The example requires a **logic analyzer**.
<p align="center">
<img src="./stm32-nucleo-l053r8.jpg"/><br>
<b>STM32 NUCLEO-L053R8</b>
</p>
<p align="center">
<img src="./real-time_trace.png"/><br>
<b>Logic analyzer trace after pressing the button (QK kernel)</b>
</p>
# Code Organization
```
examples\arm-cm\real-time_nucleo-l053r8
|
+---qk // preemptive QK kernel
| +---armclang // ARM/KEIL MDK with Compiler 6 (ARM/CLANG)
| | rt-qk.uvprojx // uVision project
|
+---qv-ms // cooperative QV kernel (multi-stage tasks)
| +---armclang // ARM/KEIL MDK with Compiler 6 (ARM/CLANG)
| | rt-qv-ms.uvprojx // uVision project
|
+---qv-tt // cooperative QV kernel (time-triggered)
| +---armclang // ARM/KEIL MDK with Compiler 6 (ARM/CLANG)
| | rt-qv-tt.uvprojx // uVision project
```
## Features Demonstrated
The example QP application consists of 2 periodic threads (Active Objects) and two sporadic, lon-running threads (Active Objects). Additionally, the Time-Triggered (TT) version has a tt-schedulier thread.
- directory `qk`: preemptive run-to-completion QK kernel
- directory `qv-ms`: cooperative run-to-completion QV kernel with multi-stage tasks
- directory `qv-tt`: cooperative run-to-completion QV kernel with time-triggered tasks
# Builing the Examples
## ARM/KEIL MDK
- Open one of the provided KEIL uVision projects (e.g., `rt-qk.uvprojx`) in Keil uVision IDE. Build/Debug/Download to the board from the IDE.
# Running the Examples
## Setting up a Logic Analyzer
The NUCLEO-L053R8 needs to be conntected to a logic analyzer as shown in the picture below.
<p align="center">
<img src="./stm32-nucleo-l053r8_conn.png"/><br>
<b>Connecting STM32 NUCLEO-L053R8 to a logic analyzer</b>
</p>
The logic analyzer needs to be configured as follwos:
- sampling rate: several MHz (e.g., 24MHz)
- trigger: Sporadic (PC.13 on the NUCLEO-L053R8), falling edge
- pre-trigger capture ratio: 20%

View File

@ -0,0 +1,92 @@
//$file${.::app.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//
// Model: real-time.qm
// File: ${.::app.h}
//
// This code has been generated by QM 5.3.0 <www.state-machine.com/qm>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This generated code is open source software: you can redistribute it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation.
//
// This code is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// NOTE:
// Alternatively, this generated code may be distributed under the terms
// of Quantum Leaps commercial licenses, which expressly supersede the GNU
// General Public License and are specifically designed for licensees
// interested in retaining the proprietary status of their code.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//
//$endhead${.::app.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#ifndef APP_H_
#define APP_H_
//$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${Shared::AppSignals} ......................................................
enum AppSignals {
PERIODIC_SPEC_SIG = Q_USER_SIG,
TIMEOUT_SIG,
SPORADIC_A_SIG,
SPORADIC_B_SIG,
REMINDER_SIG,
// ...
MAX_SIG // the last signal
};
//${Shared::PeriodicSpecEvt} .................................................
typedef struct {
// protected:
QEvt super;
// public:
uint16_t toggles;
uint8_t ticks;
} PeriodicSpecEvt;
//${Shared::SporadicSpecEvt} .................................................
typedef struct {
// protected:
QEvt super;
// public:
uint16_t toggles;
uint16_t rtc_toggles;
} SporadicSpecEvt;
//${Shared::AO_Periodic1} ....................................................
extern QActive * const AO_Periodic1;
//${Shared::Periodic1_ctor} ..................................................
void Periodic1_ctor(void);
//${Shared::AO_Periodic4} ....................................................
extern QActive * const AO_Periodic4;
//${Shared::Periodic4_ctor} ..................................................
void Periodic4_ctor(void);
//${Shared::AO_Sporadic2} ....................................................
extern QActive * const AO_Sporadic2;
//${Shared::Sporadic2_ctor} ..................................................
void Sporadic2_ctor(void);
//${Shared::AO_Sporadic3} ....................................................
extern QActive * const AO_Sporadic3;
//${Shared::Sporadic3_ctor} ..................................................
void Sporadic3_ctor(void);
//$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#endif // APP_H_

View File

@ -0,0 +1,20 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
;
; Adapted by Quantum Leaps:
; moved STACK as the first section in RW_IRAM1
; *************************************************************
LR_IROM1 0x08000000 0x00010000 { ; load region size_region
ER_IROM1 0x08000000 0x00010000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00002000 { ; RW data
*.o (STACK, +First)
.ANY (+RW +ZI)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
<Targets>
<Target>
<TargetName>bb-dbg</TargetName>
<TargetName>rt-dbg</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
@ -49,7 +49,7 @@
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\dbg\</OutputDirectory>
<OutputName>bb-qk</OutputName>
<OutputName>rt-qk</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
@ -82,7 +82,7 @@
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\dbg\bb-qk.bin .\dbg\bb-qk.axf</UserProg1Name>
<UserProg1Name>fromelf --bin --output .\dbg\rt-qk.bin .\dbg\rt-qk.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@ -339,7 +339,7 @@
<MiscControls></MiscControls>
<Define>QK_USE_IRQ_HANDLER=WWDG_IRQHandler QK_USE_IRQ_NUM=0</Define>
<Undefine></Undefine>
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8</IncludePath>
<IncludePath>..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -361,7 +361,7 @@
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
@ -370,7 +370,7 @@
<TextAddressRange>0x00000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<ScatterFile>rt-qk.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc>--entry Reset_Handler</Misc>
@ -388,45 +388,40 @@
<FileType>1</FileType>
<FilePath>..\bsp.c</FilePath>
</File>
<File>
<FileName>bsp.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\bsp.h</FilePath>
</File>
<File>
<FileName>qstamp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qstamp.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\main.c</FilePath>
</File>
<File>
<FileName>blinky_button.h</FileName>
<FileName>bsp.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\blinky_button.h</FilePath>
<FilePath>..\bsp.h</FilePath>
</File>
<File>
<FileName>blinky1.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\blinky1.c</FilePath>
<FileName>app.h</FileName>
<FileType>5</FileType>
<FilePath>..\app.h</FilePath>
</File>
<File>
<FileName>blinky3.c</FileName>
<FileName>periodic1.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\blinky3.c</FilePath>
<FilePath>..\periodic1.c</FilePath>
</File>
<File>
<FileName>button2a.c</FileName>
<FileName>periodic4.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\button2a.c</FilePath>
<FilePath>..\periodic4.c</FilePath>
</File>
<File>
<FileName>button2b.c</FileName>
<FileName>sporadic2.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\button2b.c</FilePath>
<FilePath>..\sporadic2.c</FilePath>
</File>
<File>
<FileName>sporadic3.c</FileName>
<FileType>1</FileType>
<FilePath>..\sporadic3.c</FilePath>
</File>
</Files>
</Group>
@ -533,21 +528,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -652,15 +632,20 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qs_rx.c</FilePath>
</File>
<File>
<FileName>qstamp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qstamp.c</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
<Target>
<TargetName>bb-rel</TargetName>
<TargetName>rt-rel</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6130001::V6.13.1::.\ARMCLANG</pCCUsed>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -699,7 +684,7 @@
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\rel\</OutputDirectory>
<OutputName>bb-qk</OutputName>
<OutputName>rt-qk</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
@ -732,7 +717,7 @@
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\rel\bb-qk.bin .\rel\bb-qk.axf</UserProg1Name>
<UserProg1Name>fromelf --bin --output .\rel\rt-qk.bin .\rel\rt-qk.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@ -989,7 +974,7 @@
<MiscControls></MiscControls>
<Define>NDEBUG</Define>
<Undefine></Undefine>
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8</IncludePath>
<IncludePath>..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -1011,7 +996,7 @@
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
@ -1020,7 +1005,7 @@
<TextAddressRange>0x00000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>bb-qk.sct</ScatterFile>
<ScatterFile>rt-qk.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc>--entry Reset_Handler</Misc>
@ -1038,45 +1023,40 @@
<FileType>1</FileType>
<FilePath>..\bsp.c</FilePath>
</File>
<File>
<FileName>bsp.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\bsp.h</FilePath>
</File>
<File>
<FileName>qstamp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qstamp.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\main.c</FilePath>
</File>
<File>
<FileName>blinky_button.h</FileName>
<FileName>bsp.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\blinky_button.h</FilePath>
<FilePath>..\bsp.h</FilePath>
</File>
<File>
<FileName>blinky1.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\blinky1.c</FilePath>
<FileName>app.h</FileName>
<FileType>5</FileType>
<FilePath>..\app.h</FilePath>
</File>
<File>
<FileName>blinky3.c</FileName>
<FileName>periodic1.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\blinky3.c</FilePath>
<FilePath>..\periodic1.c</FilePath>
</File>
<File>
<FileName>button2a.c</FileName>
<FileName>periodic4.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\button2a.c</FilePath>
<FilePath>..\periodic4.c</FilePath>
</File>
<File>
<FileName>button2b.c</FileName>
<FileName>sporadic2.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\button2b.c</FilePath>
<FilePath>..\sporadic2.c</FilePath>
</File>
<File>
<FileName>sporadic3.c</FileName>
<FileType>1</FileType>
<FilePath>..\sporadic3.c</FilePath>
</File>
</Files>
</Group>
@ -1183,21 +1163,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1302,12 +1267,17 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qs_rx.c</FilePath>
</File>
<File>
<FileName>qstamp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qstamp.c</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
<Target>
<TargetName>bb-spy</TargetName>
<TargetName>rt-spy</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
@ -1349,7 +1319,7 @@
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\spy\</OutputDirectory>
<OutputName>bb-qk</OutputName>
<OutputName>rt-qk</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
@ -1382,7 +1352,7 @@
<AfterMake>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin --output .\spy\bb-qk.bin .\spy\bb-qk.axf</UserProg1Name>
<UserProg1Name>fromelf --bin --output .\spy\rt-qk.bin .\spy\rt-qk.axf</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@ -1639,7 +1609,7 @@
<MiscControls></MiscControls>
<Define>Q_SPY QK_USE_IRQ_HANDLER=LCD_IRQHandler QK_USE_IRQ_NUM=30</Define>
<Undefine></Undefine>
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8</IncludePath>
<IncludePath>..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -1661,7 +1631,7 @@
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
@ -1670,7 +1640,7 @@
<TextAddressRange>0x00000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>bb-qk.sct</ScatterFile>
<ScatterFile>rt-qk.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc>--entry Reset_Handler</Misc>
@ -1688,45 +1658,40 @@
<FileType>1</FileType>
<FilePath>..\bsp.c</FilePath>
</File>
<File>
<FileName>bsp.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\bsp.h</FilePath>
</File>
<File>
<FileName>qstamp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qstamp.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\main.c</FilePath>
</File>
<File>
<FileName>blinky_button.h</FileName>
<FileName>bsp.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\blinky_button.h</FilePath>
<FilePath>..\bsp.h</FilePath>
</File>
<File>
<FileName>blinky1.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\blinky1.c</FilePath>
<FileName>app.h</FileName>
<FileType>5</FileType>
<FilePath>..\app.h</FilePath>
</File>
<File>
<FileName>blinky3.c</FileName>
<FileName>periodic1.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\blinky3.c</FilePath>
<FilePath>..\periodic1.c</FilePath>
</File>
<File>
<FileName>button2a.c</FileName>
<FileName>periodic4.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\button2a.c</FilePath>
<FilePath>..\periodic4.c</FilePath>
</File>
<File>
<FileName>button2b.c</FileName>
<FileName>sporadic2.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\button2b.c</FilePath>
<FilePath>..\sporadic2.c</FilePath>
</File>
<File>
<FileName>sporadic3.c</FileName>
<FileType>1</FileType>
<FilePath>..\sporadic3.c</FilePath>
</File>
</Files>
</Group>
@ -1833,21 +1798,6 @@
<Group>
<GroupName>QP_port</GroupName>
<Files>
<File>
<FileName>qep_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qep_port.h</FilePath>
</File>
<File>
<FileName>qf_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qf_port.h</FilePath>
</File>
<File>
<FileName>qk_port.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.h</FilePath>
</File>
<File>
<FileName>qs_port.h</FileName>
<FileType>5</FileType>
@ -1883,6 +1833,11 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qs_rx.c</FilePath>
</File>
<File>
<FileName>qstamp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\..\src\qs\qstamp.c</FilePath>
</File>
</Files>
</Group>
</Groups>

View File

@ -1,5 +1,7 @@
//============================================================================
// QP/C Example
// BSP for "real-time" Example
// Last updated for version 7.3.1
// Last updated on 2023-10-03
//
// Q u a n t u m L e a P s
// ------------------------
@ -27,26 +29,27 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C API
#include "bsp.h" // Board Support Package interface
#include "blinky_button.h" // application shared interface
#include "qpc.h" // QP/C real-time embedded framework
#include "bsp.h" // Board Support Package
#include "app.h" // Application interface
#include "stm32l0xx.h" // CMSIS-compliant header file for the MCU used
// add other drivers if necessary...
Q_DEFINE_THIS_MODULE("bsp_nucleo-l053r8") // for DBC assertions
Q_DEFINE_THIS_MODULE("bsp") // for functional-safety assertions
// Local-scope defines -----------------------------------------------------
// test pins on GPIO PA
// test pins on GPIO PA (output)
#define TST1_PIN 7U
#define TST2_PIN 6U
#define TST3_PIN 4U
#define TST4_PIN 1U
#define TST5_PIN 0U
#define TST6_PIN 5U // LED LD2-Green
#define TST6_PIN 9U
#define TST7_PIN 5U // LED LD2-Green
// buttons on GPIO PC
// button on GPIO PC (input)
#define B1_PIN 13U
#ifdef Q_SPY
@ -55,80 +58,94 @@ Q_DEFINE_THIS_MODULE("bsp_nucleo-l053r8") // for DBC assertions
#endif
// ISRs used in the application ============================================
void SysTick_Handler(void); // prototype
//============================================================================
// Error handler and ISRs...
void SysTick_Handler(void) { // system clock tick ISR
Q_NORETURN Q_onError(char const * const module, int_t const id) {
// NOTE: this implementation of the error handler is intended only
// for debugging and MUST be changed for deployment of the application
// (assuming that you ship your production code with assertions enabled).
Q_UNUSED_PAR(module);
Q_UNUSED_PAR(id);
QS_ASSERTION(module, id, 10000U); // report assertion to QS
#ifndef NDEBUG
// light up the user LED
GPIOA->BSRR = (1U << TST6_PIN);
for (;;) { // for debugging, hang on in an endless loop...
}
#else
NVIC_SystemReset();
for (;;) { // explicitly "no-return"
}
#endif
}
//............................................................................
void assert_failed(char const * const module, int_t const id); // prototype
void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}
// ISRs used in the application ==========================================
void SysTick_Handler(void); // prototype
void SysTick_Handler(void) {
BSP_d1on();
QK_ISR_ENTRY(); // inform QK about entering an ISR
QK_ISR_ENTRY(); // inform QK about entering an ISR
QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); // time events at rate 0
// process time events for rate 0
QTIMEEVT_TICK_X(0U, &l_SysTick_Handler);
// Perform the debouncing of buttons. The algorithm for debouncing
// Perform the debouncing of sporadics. The algorithm for debouncing
// adapted from the book "Embedded Systems Dictionary" by Jack Ganssle
// and Michael Barr, page 71.
//
static struct ButtonsDebouncing {
static struct {
uint32_t depressed;
uint32_t previous;
} buttons = { 0U, 0U };
uint32_t current = ~GPIOC->IDR; // read GPIO PortC
uint32_t tmp = buttons.depressed; // save the debounced depressed
buttons.depressed |= (buttons.previous & current); // set depressed
buttons.depressed &= (buttons.previous | current); // clear released
buttons.previous = current; // update the history
tmp ^= buttons.depressed; // changed debounced depressed
} sporadics = { 0U, 0U };
uint32_t current = ~GPIOC->IDR; // read Port C with state of Sporadic B1
uint32_t tmp = sporadics.depressed; // save the depressed sporadics
sporadics.depressed |= (sporadics.previous & current); // set depressed
sporadics.depressed &= (sporadics.previous | current); // clear released
sporadics.previous = current; // update the history
tmp ^= sporadics.depressed; // changed debounced depressed
current = sporadics.depressed;
if ((tmp & (1U << B1_PIN)) != 0U) { // debounced B1 state changed?
if ((buttons.depressed & (1U << B1_PIN)) != 0U) { // depressed?
// immutable button-press event
static ButtonWorkEvt const pressEvt = {
QEVT_INITIALIZER(BUTTON_PRESSED_SIG),
.toggles = 60U
if ((current & (1U << B1_PIN)) != 0U) { // is B1 depressed?
// immutable sporadic-press event
static SporadicSpecEvt const sporadicA = {
QEVT_INITIALIZER(SPORADIC_A_SIG),
.toggles = 189U,
};
// immutable forward-press event
static ButtonWorkEvt const fPressEvt = {
QEVT_INITIALIZER(FORWARD_PRESSED_SIG),
.toggles = 60U
static SporadicSpecEvt const sporadicB = {
QEVT_INITIALIZER(SPORADIC_B_SIG),
.toggles = 89U,
};
QACTIVE_POST(AO_Button2a, &fPressEvt.super, &l_SysTick_Handler);
QACTIVE_POST(AO_Button2a, &pressEvt.super, &l_SysTick_Handler);
QACTIVE_POST(AO_Sporadic2, &sporadicA.super, &l_SysTick_Handler);
QACTIVE_POST(AO_Sporadic2, &sporadicB.super, &l_SysTick_Handler);
}
else { // B1 is released
// immutable button-release event
static ButtonWorkEvt const releaseEvt = {
QEVT_INITIALIZER(BUTTON_RELEASED_SIG),
.toggles = 80U
};
// immutable forward-release event
static ButtonWorkEvt const fReleaseEvt = {
QEVT_INITIALIZER(FORWARD_RELEASED_SIG),
.toggles = 80U
};
QACTIVE_POST(AO_Button2a, &fReleaseEvt.super, &l_SysTick_Handler);
QACTIVE_POST(AO_Button2a, &releaseEvt.super, &l_SysTick_Handler);
QACTIVE_POST(AO_Periodic4, BSP_getEvtPeriodic4(0U), me);
QACTIVE_POST(AO_Periodic1, BSP_getEvtPeriodic1(0U), me);
}
}
QK_ISR_EXIT(); // inform QK about exiting an ISR
QK_ISR_EXIT(); // inform QK about exiting an ISR
BSP_d1off();
}
// BSP functions ===========================================================
void BSP_init(void) {
// Configure the MPU to prevent NULL-pointer dereferencing
// see: www.state-machine.com/null-pointer-protection-with-arm-cortex-m-mpu
//
// Configure the MPU to prevent NULL-pointer dereferencing ...
MPU->RBAR = 0x0U // base address (NULL)
| MPU_RBAR_VALID_Msk // valid region
| (MPU_RBAR_REGION_Msk & 7U); // region #7
MPU->RASR = (7U << MPU_RASR_SIZE_Pos) // 2^(7+1) region
| (0x0U << MPU_RASR_AP_Pos) // no-access region
| MPU_RASR_ENABLE_Msk; // region enable
MPU->CTRL = MPU_CTRL_PRIVDEFENA_Msk // enable background region
| MPU_CTRL_ENABLE_Msk; // enable the MPU
__ISB();
@ -140,25 +157,71 @@ void BSP_init(void) {
// set all used GPIOA pins as push-pull output, no pull-up, pull-down
GPIOA->MODER &=
~((3U << 2U*TST1_PIN) | (3U << 2U*TST2_PIN) | (3U << 2U*TST3_PIN) |
(3U << 2U*TST4_PIN) | (3U << 2U*TST5_PIN) | (3U << 2U*TST6_PIN));
(3U << 2U*TST4_PIN) | (3U << 2U*TST5_PIN) | (3U << 2U*TST6_PIN) |
(3U << 2U*TST7_PIN));
GPIOA->MODER |=
((1U << 2U*TST1_PIN) | (1U << 2U*TST2_PIN) | (1U << 2U*TST3_PIN) |
(1U << 2U*TST4_PIN) | (1U << 2U*TST5_PIN) | (1U << 2U*TST6_PIN));
(1U << 2U*TST4_PIN) | (1U << 2U*TST5_PIN) | (1U << 2U*TST6_PIN) |
(1U << 2U*TST7_PIN));
GPIOA->OTYPER &=
~((1U << TST1_PIN) | (1U << TST2_PIN) | (1U << TST3_PIN) |
(1U << TST4_PIN) | (1U << TST5_PIN) | (1U << TST6_PIN));
(1U << TST4_PIN) | (1U << TST5_PIN) | (1U << TST6_PIN) |
(1U << TST7_PIN));
GPIOA->PUPDR &=
~((3U << 2U*TST1_PIN) | (3U << 2U*TST2_PIN) | (3U << 2U*TST3_PIN) |
(3U << 2U*TST4_PIN) | (3U << 2U*TST5_PIN) | (3U << 2U*TST6_PIN));
(3U << 2U*TST4_PIN) | (3U << 2U*TST5_PIN) | (3U << 2U*TST6_PIN) |
(3U << 2U*TST7_PIN));
// enable GPIOC clock port for the Button B1
// enable GPIOC clock port for the Sporadic B1
RCC->IOPENR |= (1U << 2U);
// configure Button B1 pin on GPIOC as input, no pull-up, pull-down
// configure Sporadic B1 pin on GPIOC as input, no pull-up, pull-down
GPIOC->MODER &= ~(3U << 2U*B1_PIN);
GPIOC->PUPDR &= ~(3U << 2U*B1_PIN);
}
//............................................................................
void BSP_start(void) {
// instantiate and start QP/C active objects...
Periodic1_ctor();
static QEvt const *periodic1QSto[10]; // Event queue storage
QACTIVE_START(
AO_Periodic1, // AO pointer to start
Q_PRIO(1U, 1U), // QF-prio/pre-thre.
periodic1QSto, // storage for the AO's queue
Q_DIM(periodic1QSto), // queue length
(void *)0, 0U, // stack storage, size (not used)
BSP_getEvtPeriodic1(0U)); // initialization param
Sporadic2_ctor();
static QEvt const *sporadic2QSto[8]; // Event queue storage
QACTIVE_START(
AO_Sporadic2, // AO pointer to start
Q_PRIO(2U, 3U), // QF-prio/pre-thre.
sporadic2QSto, // storage for the AO's queue
Q_DIM(sporadic2QSto), // queue length
(void *)0, 0U, // stack storage, size (not used)
(void const *)0); // initialization param -- not used
Sporadic3_ctor();
static QEvt const *sporadic3QSto[8]; // Event queue storage
QACTIVE_START(
AO_Sporadic3, // AO pointer to start
Q_PRIO(3U, 3U), // QF-prio/pre-thre.
sporadic3QSto, // storage for the AO's queue
Q_DIM(sporadic3QSto), // queue length
(void *)0, 0U, // stack storage, size (not used)
(void const *)0); // initialization param -- not used
Periodic4_ctor();
static QEvt const *periodic4QSto[8]; // Event queue storage
QACTIVE_START(
AO_Periodic4, // AO pointer to start
Q_PRIO(4U, 4U), // QF-prio/pre-thre.
periodic4QSto, // storage for the AO's queue
Q_DIM(periodic4QSto), // queue length
(void *)0, 0U, // stack storage, size (not used)
BSP_getEvtPeriodic4(0U)); // initialization event
}
//............................................................................
void BSP_d1on(void) { GPIOA->BSRR = (1U << TST1_PIN); }
void BSP_d1off(void) { GPIOA->BSRR = (1U << (TST1_PIN + 16U)); }
@ -177,45 +240,48 @@ void BSP_d5off(void) { GPIOA->BSRR = (1U << (TST5_PIN + 16U)); }
//............................................................................
void BSP_d6on(void) { GPIOA->BSRR = (1U << TST6_PIN); } // LED2
void BSP_d6off(void) { GPIOA->BSRR = (1U << (TST6_PIN + 16U)); }
//............................................................................
void BSP_d7on(void) { GPIOA->BSRR = (1U << TST7_PIN); }
void BSP_d7off(void) { GPIOA->BSRR = (1U << (TST7_PIN + 16U)); }
//............................................................................
QEvt const *BSP_getWorkEvtBlinky1(uint8_t num) {
// immutable work events for Blinky1
static BlinkyWorkEvt const workBlinky1[] = {
QEvt const *BSP_getEvtPeriodic1(uint8_t num) {
// immutable PERIODIC_SPEC events for Periodic1
static PeriodicSpecEvt const periodicSpec1[] = {
{
QEVT_INITIALIZER(BLINKY_WORK_SIG),
QEVT_INITIALIZER(PERIODIC_SPEC_SIG),
.toggles = 40U,
.ticks = 5U,
},
{
QEVT_INITIALIZER(BLINKY_WORK_SIG),
QEVT_INITIALIZER(PERIODIC_SPEC_SIG),
.toggles = 30U,
.ticks = 7U,
}
};
Q_REQUIRE_ID(500, num < Q_DIM(workBlinky1)); // must be in range
return &workBlinky1[num].super;
Q_REQUIRE_ID(500, num < Q_DIM(periodicSpec1)); // must be in range
return &periodicSpec1[num].super;
}
//............................................................................
QEvt const *BSP_getWorkEvtBlinky3(uint8_t num) {
// immutable work events for Blinky3
static BlinkyWorkEvt const workBlinky3[] = {
QEvt const *BSP_getEvtPeriodic4(uint8_t num) {
// immutable PERIODIC_SPEC events for Periodic4
static PeriodicSpecEvt const periodicSpec4[] = {
{
QEVT_INITIALIZER(BLINKY_WORK_SIG),
QEVT_INITIALIZER(PERIODIC_SPEC_SIG),
.toggles = 20U,
.ticks = 5U,
.ticks = 2U,
},
{
QEVT_INITIALIZER(BLINKY_WORK_SIG),
QEVT_INITIALIZER(PERIODIC_SPEC_SIG),
.toggles = 10U,
.ticks = 3U,
}
.ticks = 1U,
},
};
Q_REQUIRE_ID(600, num < Q_DIM(workBlinky3)); // must be in range
return &workBlinky3[num].super;
Q_REQUIRE_ID(600, num < Q_DIM(periodicSpec4)); // must be in range
return &periodicSpec4[num].super;
}
// QF callbacks ============================================================
// QF callbacks ==============================================================
void QF_onStartup(void) {
SystemCoreClockUpdate();
@ -231,38 +297,15 @@ void QF_onCleanup(void) {
}
//............................................................................
void QK_onIdle(void) {
BSP_d6on(); // turn LED2 on
BSP_d7on(); // LED LD2
#ifdef NDEBUG
// Put the CPU and peripherals to the low-power mode.
// you might need to customize the clock management for your application,
// see the datasheet for your particular Cortex-M MCU.
//
BSP_d6off(); // turn LED2 off
BSP_d7off();
__WFI(); // Wait-For-Interrupt
BSP_d6on(); // turn LED2 on
BSP_d7on();
#endif
BSP_d6off(); // turn LED2 off
BSP_d7off();
}
//............................................................................
Q_NORETURN Q_onError(char const * const module, int_t const id) {
//
// NOTE: add here your application-specific error handling
//
Q_UNUSED_PAR(module);
Q_UNUSED_PAR(id);
QS_ASSERTION(module, id, 10000U); // report assertion to QS
#ifndef NDEBUG
for (;;) {
}
#endif
NVIC_SystemReset();
}
//............................................................................
void assert_failed(char const * const module, int_t const id); // prototype
void assert_failed(char const * const module, int_t const id) {
Q_onError(module, id);
}

View File

@ -1,5 +1,7 @@
//============================================================================
// QP/C Example
// "real-time" example to demonstrate timing in QP/C
// Last Updated for Version: 7.3.0
// Date of the Last Update: 2023-10-02
//
// Q u a n t u m L e a P s
// ------------------------
@ -33,6 +35,7 @@
#define BSP_TICKS_PER_SEC 1000U
void BSP_init(void);
void BSP_start(void);
void BSP_d1on(void);
void BSP_d1off(void);
@ -52,8 +55,11 @@ void BSP_d5off(void);
void BSP_d6on(void);
void BSP_d6off(void);
// immutable events for Blinky active objects
QEvt const *BSP_getWorkEvtBlinky1(uint8_t num);
QEvt const *BSP_getWorkEvtBlinky3(uint8_t num);
void BSP_d7on(void);
void BSP_d7off(void);
// immutable events for Periodic active objects
QEvt const *BSP_getEvtPeriodic1(uint8_t num);
QEvt const *BSP_getEvtPeriodic4(uint8_t num);
#endif // BSP_H_

View File

@ -1,7 +1,7 @@
//============================================================================
// APP example
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.1
// Last updated on 2023-10-02
//
// Q u a n t u m L e a P s
// ------------------------
@ -32,8 +32,8 @@
// <info@state-machine.com>
//============================================================================
#include "qpc.h" // QP/C real-time embedded framework
#include "dpp.h" // DPP Application interface
#include "bsp.h" // Board Support Package
#include "app.h" // Application interface
//............................................................................
int main() {

Some files were not shown because too many files have changed in this diff Show More