Skip to content

Commit

Permalink
7.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum-leaps committed Dec 14, 2023
1 parent 40a1e5f commit edb58c9
Show file tree
Hide file tree
Showing 83 changed files with 782 additions and 917 deletions.
16 changes: 5 additions & 11 deletions examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EFM32-SLSTK3401A board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -495,33 +495,27 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
}
l_USART0->TXDATA = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void onReset() {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void onCommand(std::uint8_t cmdId, std::uint32_t param1,
std::uint32_t param2, std::uint32_t param3)
{
Expand Down
15 changes: 5 additions & 10 deletions examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EFM32-SLSTK3401A board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -486,28 +486,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
}
l_USART0->TXDATA = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void onReset() {
NVIC_SystemReset();
}
Expand Down
15 changes: 5 additions & 10 deletions examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EFM32-SLSTK3401A board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -510,28 +510,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
}
l_USART0->TXDATA = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void onReset() {
NVIC_SystemReset();
}
Expand Down
15 changes: 5 additions & 10 deletions examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -479,28 +479,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
}
UART0->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void onReset() {
NVIC_SystemReset();
}
Expand Down
14 changes: 5 additions & 9 deletions examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -466,22 +466,18 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
}
UART0->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
Expand Down
15 changes: 5 additions & 10 deletions examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-09
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -492,28 +492,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
}
UART0->DR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void onReset() {
NVIC_SystemReset();
}
Expand Down
5 changes: 5 additions & 0 deletions examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ extern QP::QXSemaphore TH_sema;
// accessible to the threads.
extern QP::QXMutex TH_mutex;

//${Shared-TH::TH_obj_dict} ..................................................
#ifdef Q_SPY
void TH_obj_dict();
#endif // def Q_SPY

} // namespace APP
//$enddecl${Shared-TH} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#endif // QXK_HPP_
Expand Down
19 changes: 11 additions & 8 deletions examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ me-&gt;setThread(mpu);</code>
<documentation>// NOTE: kernel objects can be allocated outside any memory regions
// accessible to the threads.</documentation>
</attribute>
<!--${Shared-TH::TH_obj_dict}-->
<operation name="TH_obj_dict?def Q_SPY" type="void" visibility="0x00" properties="0x00">
<code>QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(TH_XThread1-&gt;getTimeEvt());

QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(TH_XThread2-&gt;getTimeEvt());
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);</code>
</operation>
</package>
<!--${AOs}-->
<package name="AOs" stereotype="0x02" namespace="APP::">
Expand Down Expand Up @@ -522,9 +532,6 @@ m_fork[n] = FREE;</action>
<code>// downcast the generic thr pointer to the specific thread
auto me = static_cast&lt;XThread1 *&gt;(thr);

QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(TH_XThread1-&gt;getTimeEvt());

// subscribe to the EAT signal (from the application)
me-&gt;subscribe(APP::EAT_SIG);

Expand Down Expand Up @@ -568,11 +575,6 @@ for (;;) {
<code>// downcast the generic thr pointer to the specific thread
//auto me = static_cast&lt;XThread2 *&gt;(thr);

QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(TH_XThread2-&gt;getTimeEvt());
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);

// initialize the semaphore before using it
// NOTE: Here the semaphore is initialized in the highest-priority thread
// that uses it. Alternatively, the semaphore can be initialized
Expand Down Expand Up @@ -702,6 +704,7 @@ $define ${Shared-TH::TH_mutex}

$declare ${XThreads::XThread1}
$define ${Shared-TH::XThread1_ctor}
$define ${Shared-TH::TH_obj_dict}
$define ${XThreads::XThread1}</text>
</file>
<!--${qxk::xthread2.cpp}-->
Expand Down
21 changes: 5 additions & 16 deletions examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/bsp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QK kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
Expand Down Expand Up @@ -810,38 +810,27 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void onFlush() {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
std::uint16_t b = getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();

QF_INT_DISABLE();
QF_MEM_SYS();
}
UART0->DR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void onReset() {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void onCommand(std::uint8_t cmdId, std::uint32_t param1,
std::uint32_t param2, std::uint32_t param3)
{
Expand Down
Loading

0 comments on commit edb58c9

Please sign in to comment.