Skip to content

Commit edb58c9

Browse files
committed
7.3.2
1 parent 40a1e5f commit edb58c9

File tree

83 files changed

+782
-917
lines changed

Some content is hidden

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

83 files changed

+782
-917
lines changed

examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EFM32-SLSTK3401A board, QK kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-09
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -495,33 +495,27 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
495495
}
496496
}
497497
//............................................................................
498+
// NOTE:
499+
// No critical section in QS::onFlush() to avoid nesting of critical sections
500+
// in case QS::onFlush() is called from Q_onError().
498501
void onFlush() {
499502
for (;;) {
500-
QF_INT_DISABLE();
501503
std::uint16_t b = getByte();
502504
if (b != QS_EOD) {
503505
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
504-
QF_INT_ENABLE();
505-
QF_CRIT_EXIT_NOP();
506-
507-
QF_INT_DISABLE();
508506
}
509507
l_USART0->TXDATA = b;
510-
QF_INT_ENABLE();
511508
}
512509
else {
513-
QF_INT_ENABLE();
514510
break;
515511
}
516512
}
517513
}
518514
//............................................................................
519-
//! callback function to reset the target (to be implemented in the BSP)
520515
void onReset() {
521516
NVIC_SystemReset();
522517
}
523518
//............................................................................
524-
// callback function to execute a user command
525519
void onCommand(std::uint8_t cmdId, std::uint32_t param1,
526520
std::uint32_t param2, std::uint32_t param3)
527521
{

examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EFM32-SLSTK3401A board, QV kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-09
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -486,28 +486,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
486486
}
487487
}
488488
//............................................................................
489+
// NOTE:
490+
// No critical section in QS::onFlush() to avoid nesting of critical sections
491+
// in case QS::onFlush() is called from Q_onError().
489492
void onFlush() {
490493
for (;;) {
491-
QF_INT_DISABLE();
492494
std::uint16_t b = getByte();
493495
if (b != QS_EOD) {
494496
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
495-
QF_INT_ENABLE();
496-
QF_CRIT_EXIT_NOP();
497-
498-
QF_INT_DISABLE();
499497
}
500498
l_USART0->TXDATA = b;
501-
QF_INT_ENABLE();
502499
}
503500
else {
504-
QF_INT_ENABLE();
505501
break;
506502
}
507503
}
508504
}
509505
//............................................................................
510-
//! callback function to reset the target (to be implemented in the BSP)
511506
void onReset() {
512507
NVIC_SystemReset();
513508
}

examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EFM32-SLSTK3401A board, QXK kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-09
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -510,28 +510,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
510510
}
511511
}
512512
//............................................................................
513+
// NOTE:
514+
// No critical section in QS::onFlush() to avoid nesting of critical sections
515+
// in case QS::onFlush() is called from Q_onError().
513516
void onFlush() {
514517
for (;;) {
515-
QF_INT_DISABLE();
516518
std::uint16_t b = getByte();
517519
if (b != QS_EOD) {
518520
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
519-
QF_INT_ENABLE();
520-
QF_CRIT_EXIT_NOP();
521-
522-
QF_INT_DISABLE();
523521
}
524522
l_USART0->TXDATA = b;
525-
QF_INT_ENABLE();
526523
}
527524
else {
528-
QF_INT_ENABLE();
529525
break;
530526
}
531527
}
532528
}
533529
//............................................................................
534-
//! callback function to reset the target (to be implemented in the BSP)
535530
void onReset() {
536531
NVIC_SystemReset();
537532
}

examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EK-TM4C123GXL board, QK kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-09
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -479,28 +479,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
479479
return TIMER5->TAV;
480480
}
481481
//............................................................................
482+
// NOTE:
483+
// No critical section in QS::onFlush() to avoid nesting of critical sections
484+
// in case QS::onFlush() is called from Q_onError().
482485
void onFlush() {
483486
for (;;) {
484-
QF_INT_DISABLE();
485487
std::uint16_t b = getByte();
486488
if (b != QS_EOD) {
487489
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
488-
QF_INT_ENABLE();
489-
QF_CRIT_EXIT_NOP();
490-
491-
QF_INT_DISABLE();
492490
}
493491
UART0->DR = b; // put into the DR register
494-
QF_INT_ENABLE();
495492
}
496493
else {
497-
QF_INT_ENABLE();
498494
break;
499495
}
500496
}
501497
}
502498
//............................................................................
503-
//! callback function to reset the target (to be implemented in the BSP)
504499
void onReset() {
505500
NVIC_SystemReset();
506501
}

examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EK-TM4C123GXL board, QV kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-09
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -466,22 +466,18 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
466466
return TIMER5->TAV;
467467
}
468468
//............................................................................
469+
// NOTE:
470+
// No critical section in QS::onFlush() to avoid nesting of critical sections
471+
// in case QS::onFlush() is called from Q_onError().
469472
void onFlush() {
470473
for (;;) {
471-
QF_INT_DISABLE();
472474
std::uint16_t b = getByte();
473475
if (b != QS_EOD) {
474476
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
475-
QF_INT_ENABLE();
476-
QF_CRIT_EXIT_NOP();
477-
478-
QF_INT_DISABLE();
479477
}
480478
UART0->DR = b; // put into the DR register
481-
QF_INT_ENABLE();
482479
}
483480
else {
484-
QF_INT_ENABLE();
485481
break;
486482
}
487483
}

examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EK-TM4C123GXL board, QXK kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-09
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -492,28 +492,23 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
492492
return TIMER5->TAV;
493493
}
494494
//............................................................................
495+
// NOTE:
496+
// No critical section in QS::onFlush() to avoid nesting of critical sections
497+
// in case QS::onFlush() is called from Q_onError().
495498
void onFlush() {
496499
for (;;) {
497-
QF_INT_DISABLE();
498500
std::uint16_t b = getByte();
499501
if (b != QS_EOD) {
500502
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
501-
QF_INT_ENABLE();
502-
QF_CRIT_EXIT_NOP();
503-
504-
QF_INT_DISABLE();
505503
}
506504
UART0->DR = b;
507-
QF_INT_ENABLE();
508505
}
509506
else {
510-
QF_INT_ENABLE();
511507
break;
512508
}
513509
}
514510
}
515511
//............................................................................
516-
//! callback function to reset the target (to be implemented in the BSP)
517512
void onReset() {
518513
NVIC_SystemReset();
519514
}

examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ extern QP::QXSemaphore TH_sema;
140140
// accessible to the threads.
141141
extern QP::QXMutex TH_mutex;
142142

143+
//${Shared-TH::TH_obj_dict} ..................................................
144+
#ifdef Q_SPY
145+
void TH_obj_dict();
146+
#endif // def Q_SPY
147+
143148
} // namespace APP
144149
//$enddecl${Shared-TH} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145150
#endif // QXK_HPP_

examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ me-&gt;setThread(mpu);</code>
135135
<documentation>// NOTE: kernel objects can be allocated outside any memory regions
136136
// accessible to the threads.</documentation>
137137
</attribute>
138+
<!--${Shared-TH::TH_obj_dict}-->
139+
<operation name="TH_obj_dict?def Q_SPY" type="void" visibility="0x00" properties="0x00">
140+
<code>QS_OBJ_DICTIONARY(TH_XThread1);
141+
QS_OBJ_DICTIONARY(TH_XThread1-&gt;getTimeEvt());
142+
143+
QS_OBJ_DICTIONARY(TH_XThread2);
144+
QS_OBJ_DICTIONARY(TH_XThread2-&gt;getTimeEvt());
145+
QS_OBJ_DICTIONARY(&amp;TH_sema);
146+
QS_OBJ_DICTIONARY(&amp;TH_mutex);</code>
147+
</operation>
138148
</package>
139149
<!--${AOs}-->
140150
<package name="AOs" stereotype="0x02" namespace="APP::">
@@ -522,9 +532,6 @@ m_fork[n] = FREE;</action>
522532
<code>// downcast the generic thr pointer to the specific thread
523533
auto me = static_cast&lt;XThread1 *&gt;(thr);
524534

525-
QS_OBJ_DICTIONARY(TH_XThread1);
526-
QS_OBJ_DICTIONARY(TH_XThread1-&gt;getTimeEvt());
527-
528535
// subscribe to the EAT signal (from the application)
529536
me-&gt;subscribe(APP::EAT_SIG);
530537

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

571-
QS_OBJ_DICTIONARY(TH_XThread2);
572-
QS_OBJ_DICTIONARY(TH_XThread2-&gt;getTimeEvt());
573-
QS_OBJ_DICTIONARY(&amp;TH_sema);
574-
QS_OBJ_DICTIONARY(&amp;TH_mutex);
575-
576578
// initialize the semaphore before using it
577579
// NOTE: Here the semaphore is initialized in the highest-priority thread
578580
// that uses it. Alternatively, the semaphore can be initialized
@@ -702,6 +704,7 @@ $define ${Shared-TH::TH_mutex}
702704

703705
$declare ${XThreads::XThread1}
704706
$define ${Shared-TH::XThread1_ctor}
707+
$define ${Shared-TH::TH_obj_dict}
705708
$define ${XThreads::XThread1}</text>
706709
</file>
707710
<!--${qxk::xthread2.cpp}-->

examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/bsp.cpp

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//============================================================================
22
// Product: DPP example, EK-TM4C123GXL board, QK kernel, MPU isolation
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-15
3+
// Last updated for version 7.3.2
4+
// Last updated on 2023-12-13
55
//
66
// Q u a n t u m L e a P s
77
// ------------------------
@@ -810,38 +810,27 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED
810810
return TIMER5->TAV;
811811
}
812812
//............................................................................
813+
// NOTE:
814+
// No critical section in QS::onFlush() to avoid nesting of critical sections
815+
// in case QS::onFlush() is called from Q_onError().
813816
void onFlush() {
814817
for (;;) {
815-
QF_INT_DISABLE();
816-
QF_MEM_SYS();
817818
std::uint16_t b = getByte();
818819
if (b != QS_EOD) {
819820
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
820-
QF_MEM_APP();
821-
QF_INT_ENABLE();
822-
QF_CRIT_EXIT_NOP();
823-
824-
QF_INT_DISABLE();
825-
QF_MEM_SYS();
826821
}
827822
UART0->DR = b; // put into the DR register
828-
QF_MEM_APP();
829-
QF_INT_ENABLE();
830823
}
831824
else {
832-
QF_MEM_APP();
833-
QF_INT_ENABLE();
834825
break;
835826
}
836827
}
837828
}
838829
//............................................................................
839-
//! callback function to reset the target (to be implemented in the BSP)
840830
void onReset() {
841831
NVIC_SystemReset();
842832
}
843833
//............................................................................
844-
// callback function to execute a user command
845834
void onCommand(std::uint8_t cmdId, std::uint32_t param1,
846835
std::uint32_t param2, std::uint32_t param3)
847836
{

0 commit comments

Comments
 (0)