Skip to content

Commit 7332d59

Browse files
committed
7.3.2
1 parent c2347e8 commit 7332d59

File tree

92 files changed

+896
-980
lines changed

Some content is hidden

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

92 files changed

+896
-980
lines changed

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

Lines changed: 6 additions & 12 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-23
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
// ------------------------
@@ -489,33 +489,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
489489
}
490490
}
491491
//............................................................................
492+
// NOTE:
493+
// No critical section in QS_onFlush() to avoid nesting of critical sections
494+
// in case QS_onFlush() is called from Q_onError().
492495
void QS_onFlush(void) {
493496
for (;;) {
494-
QF_INT_DISABLE();
495497
uint16_t b = QS_getByte();
496498
if (b != QS_EOD) {
497499
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
498-
QF_INT_ENABLE();
499-
QF_CRIT_EXIT_NOP();
500-
501-
QF_INT_DISABLE();
502500
}
503-
l_USART0->TXDATA = b;
504-
QF_INT_ENABLE();
501+
l_USART0->TXDATA = (uint8_t)b;
505502
}
506503
else {
507-
QF_INT_ENABLE();
508504
break;
509505
}
510506
}
511507
}
512508
//............................................................................
513-
//! callback function to reset the target (to be implemented in the BSP)
514509
void QS_onReset(void) {
515510
NVIC_SystemReset();
516511
}
517512
//............................................................................
518-
// callback function to execute a user command
519513
void QS_onCommand(uint8_t cmdId,
520514
uint32_t param1, uint32_t param2, uint32_t param3)
521515
{

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

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, QV kernel
3-
// Last updated for version 7.3.0
4-
// Last updated on 2023-08-23
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
// ------------------------
@@ -483,33 +483,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
483483
}
484484
}
485485
//............................................................................
486+
// NOTE:
487+
// No critical section in QS_onFlush() to avoid nesting of critical sections
488+
// in case QS_onFlush() is called from Q_onError().
486489
void QS_onFlush(void) {
487490
for (;;) {
488-
QF_INT_DISABLE();
489491
uint16_t b = QS_getByte();
490492
if (b != QS_EOD) {
491493
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
492-
QF_INT_ENABLE();
493-
QF_CRIT_EXIT_NOP();
494-
495-
QF_INT_DISABLE();
496494
}
497495
l_USART0->TXDATA = b;
498-
QF_INT_ENABLE();
499496
}
500497
else {
501-
QF_INT_ENABLE();
502498
break;
503499
}
504500
}
505501
}
506502
//............................................................................
507-
//! callback function to reset the target (to be implemented in the BSP)
508503
void QS_onReset(void) {
509504
NVIC_SystemReset();
510505
}
511506
//............................................................................
512-
// callback function to execute a user command
513507
void QS_onCommand(uint8_t cmdId,
514508
uint32_t param1, uint32_t param2, uint32_t param3)
515509
{

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

Lines changed: 6 additions & 12 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-23
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
// ------------------------
@@ -506,33 +506,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
506506
}
507507
}
508508
//............................................................................
509+
// NOTE:
510+
// No critical section in QS_onFlush() to avoid nesting of critical sections
511+
// in case QS_onFlush() is called from Q_onError().
509512
void QS_onFlush(void) {
510513
for (;;) {
511-
QF_INT_DISABLE();
512514
uint16_t b = QS_getByte();
513515
if (b != QS_EOD) {
514516
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
515-
QF_INT_ENABLE();
516-
QF_CRIT_EXIT_NOP();
517-
518-
QF_INT_DISABLE();
519517
}
520-
l_USART0->TXDATA = b; // put into the DR register
521-
QF_INT_ENABLE();
518+
l_USART0->TXDATA = (uint8_t)b; // put into the DR register
522519
}
523520
else {
524-
QF_INT_ENABLE();
525521
break;
526522
}
527523
}
528524
}
529525
//............................................................................
530-
//! callback function to reset the target (to be implemented in the BSP)
531526
void QS_onReset(void) {
532527
NVIC_SystemReset();
533528
}
534529
//............................................................................
535-
// callback function to execute a user command
536530
void QS_onCommand(uint8_t cmdId,
537531
uint32_t param1, uint32_t param2, uint32_t param3)
538532
{

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

Lines changed: 6 additions & 11 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-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
// ------------------------
@@ -471,28 +471,23 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
471471
return TIMER5->TAV;
472472
}
473473
//............................................................................
474+
// NOTE:
475+
// No critical section in QS_onFlush() to avoid nesting of critical sections
476+
// in case QS_onFlush() is called from Q_onError().
474477
void QS_onFlush(void) {
475478
for (;;) {
476-
QF_INT_DISABLE();
477479
uint16_t b = QS_getByte();
478480
if (b != QS_EOD) {
479481
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
480-
QF_INT_ENABLE();
481-
QF_CRIT_EXIT_NOP();
482-
483-
QF_INT_DISABLE();
484482
}
485-
UART0->DR = b; // put into the DR register
486-
QF_INT_ENABLE();
483+
UART0->DR = (uint8_t)b; // put into the DR register
487484
}
488485
else {
489-
QF_INT_ENABLE();
490486
break;
491487
}
492488
}
493489
}
494490
//............................................................................
495-
//! callback function to reset the target (to be implemented in the BSP)
496491
void QS_onReset(void) {
497492
NVIC_SystemReset();
498493
}

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

Lines changed: 6 additions & 11 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-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
// ------------------------
@@ -456,28 +456,23 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
456456
return TIMER5->TAV;
457457
}
458458
//............................................................................
459+
// NOTE:
460+
// No critical section in QS_onFlush() to avoid nesting of critical sections
461+
// in case QS_onFlush() is called from Q_onError().
459462
void QS_onFlush(void) {
460463
for (;;) {
461-
QF_INT_DISABLE();
462464
uint16_t b = QS_getByte();
463465
if (b != QS_EOD) {
464466
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
465-
QF_INT_ENABLE();
466-
QF_CRIT_EXIT_NOP();
467-
468-
QF_INT_DISABLE();
469467
}
470-
UART0->DR = b; // put into the DR register
471-
QF_INT_ENABLE();
468+
UART0->DR = (uint8_t)b; // put into the DR register
472469
}
473470
else {
474-
QF_INT_ENABLE();
475471
break;
476472
}
477473
}
478474
}
479475
//............................................................................
480-
//! callback function to reset the target (to be implemented in the BSP)
481476
void QS_onReset(void) {
482477
NVIC_SystemReset();
483478
}

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

Lines changed: 6 additions & 11 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-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
// ------------------------
@@ -488,28 +488,23 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
488488
return TIMER5->TAV;
489489
}
490490
//............................................................................
491+
// NOTE:
492+
// No critical section in QS_onFlush() to avoid nesting of critical sections
493+
// in case QS_onFlush() is called from Q_onError().
491494
void QS_onFlush(void) {
492495
for (;;) {
493-
QF_INT_DISABLE();
494496
uint16_t b = QS_getByte();
495497
if (b != QS_EOD) {
496498
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
497-
QF_INT_ENABLE();
498-
QF_CRIT_EXIT_NOP();
499-
500-
QF_INT_DISABLE();
501499
}
502-
UART0->DR = b; // put into the DR register
503-
QF_INT_ENABLE();
500+
UART0->DR = (uint8_t)b; // put into the DR register
504501
}
505502
else {
506-
QF_INT_ENABLE();
507503
break;
508504
}
509505
}
510506
}
511507
//............................................................................
512-
//! callback function to reset the target (to be implemented in the BSP)
513508
void QS_onReset(void) {
514509
NVIC_SystemReset();
515510
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ extern QXSemaphore TH_sema;
138138
// NOTE: kernel objects can be allocated outside any memory regions
139139
// accessible to the threads.
140140
extern QXMutex TH_mutex;
141+
142+
//${Shared-TH::TH_obj_dict} ..................................................
143+
#ifdef Q_SPY
144+
void TH_obj_dict(void);
145+
#endif // def Q_SPY
141146
//$enddecl${Shared-TH} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142147
#endif // QXK_H_
143148

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ me-&gt;super.super.thread = mpu;</code>
136136
<documentation>// NOTE: kernel objects can be allocated outside any memory regions
137137
// accessible to the threads.</documentation>
138138
</attribute>
139+
<!--${Shared-TH::TH_obj_dict}-->
140+
<operation name="TH_obj_dict?def Q_SPY" type="void" visibility="0x00" properties="0x00">
141+
<code>QS_OBJ_DICTIONARY(TH_XThread1);
142+
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);
143+
144+
QS_OBJ_DICTIONARY(TH_XThread2);
145+
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
146+
QS_OBJ_DICTIONARY(&amp;TH_sema);
147+
QS_OBJ_DICTIONARY(&amp;TH_mutex);</code>
148+
</operation>
139149
</package>
140150
<!--${AOs}-->
141151
<package name="AOs" stereotype="0x02">
@@ -500,10 +510,7 @@ me-&gt;fork[n] = FREE;</action>
500510
<operation name="run" type="void" visibility="0x02" properties="0x01">
501511
<!--${XThreads::XThread1::run::thr}-->
502512
<parameter name="thr" type="QXThread * const"/>
503-
<code>QS_OBJ_DICTIONARY(TH_XThread1);
504-
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);
505-
506-
// downcast the generic thr pointer to the specific thread
513+
<code>// downcast the generic thr pointer to the specific thread
507514
XThread1 *me = (XThread1 *)thr;
508515

509516
// subscribe to the EAT signal (from the application)
@@ -542,12 +549,7 @@ for (;;) {
542549
<operation name="run" type="void" visibility="0x02" properties="0x01">
543550
<!--${XThreads::XThread2::run::thr}-->
544551
<parameter name="thr" type="QXThread * const"/>
545-
<code>QS_OBJ_DICTIONARY(TH_XThread2);
546-
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
547-
QS_OBJ_DICTIONARY(&amp;TH_sema);
548-
QS_OBJ_DICTIONARY(&amp;TH_mutex);
549-
550-
// downcast the generic thr pointer to the specific thread
552+
<code>// downcast the generic thr pointer to the specific thread
551553
//XThread2 *me = (XThread2 *)thr;
552554

553555
// initialize the semaphore before using it
@@ -673,6 +675,7 @@ $define ${Shared-TH::TH_mutex}
673675

674676
$declare ${XThreads::XThread1}
675677
$define ${Shared-TH::XThread1_ctor}
678+
$define ${Shared-TH::TH_obj_dict}
676679
$define ${XThreads::XThread1}</text>
677680
</file>
678681
<!--${qxk::xthread2.c}-->

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

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-09-07
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
// ------------------------
@@ -783,38 +783,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
783783
return TIMER5->TAV;
784784
}
785785
//............................................................................
786+
// NOTE:
787+
// No critical section in QS_onFlush() to avoid nesting of critical sections
788+
// in case QS_onFlush() is called from Q_onError().
786789
void QS_onFlush(void) {
787790
for (;;) {
788-
QF_INT_DISABLE();
789-
QF_MEM_SYS();
790791
uint16_t b = QS_getByte();
791792
if (b != QS_EOD) {
792793
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
793-
QF_MEM_APP();
794-
QF_INT_ENABLE();
795-
QF_CRIT_EXIT_NOP();
796-
797-
QF_INT_DISABLE();
798-
QF_MEM_SYS();
799794
}
800795
UART0->DR = b; // put into the DR register
801-
QF_MEM_APP();
802-
QF_INT_ENABLE();
803796
}
804797
else {
805-
QF_MEM_APP();
806-
QF_INT_ENABLE();
807798
break;
808799
}
809800
}
810801
}
811802
//............................................................................
812-
//! callback function to reset the target (to be implemented in the BSP)
813803
void QS_onReset(void) {
814804
NVIC_SystemReset();
815805
}
816806
//............................................................................
817-
//! callback function to execute a user command
818807
void QS_onCommand(uint8_t cmdId,
819808
uint32_t param1, uint32_t param2, uint32_t param3)
820809
{

0 commit comments

Comments
 (0)