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 c2347e8 commit 7332d59
Show file tree
Hide file tree
Showing 92 changed files with 896 additions and 980 deletions.
18 changes: 6 additions & 12 deletions examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.c
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-23
// 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 @@ -489,33 +489,27 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_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();
l_USART0->TXDATA = (uint8_t)b;
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{
Expand Down
16 changes: 5 additions & 11 deletions examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.c
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-23
// 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 @@ -483,33 +483,27 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_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 QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{
Expand Down
18 changes: 6 additions & 12 deletions examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.c
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-23
// 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 @@ -506,33 +506,27 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_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; // put into the DR register
QF_INT_ENABLE();
l_USART0->TXDATA = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{
Expand Down
17 changes: 6 additions & 11 deletions examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.c
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-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 @@ -471,28 +471,23 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_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();
UART0->DR = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
Expand Down
17 changes: 6 additions & 11 deletions examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c
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-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 @@ -456,28 +456,23 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_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();
UART0->DR = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
Expand Down
17 changes: 6 additions & 11 deletions examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.c
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-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 @@ -488,28 +488,23 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_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();
UART0->DR = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
Expand Down
5 changes: 5 additions & 0 deletions examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ extern QXSemaphore TH_sema;
// NOTE: kernel objects can be allocated outside any memory regions
// accessible to the threads.
extern QXMutex TH_mutex;

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

Expand Down
23 changes: 13 additions & 10 deletions examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ me-&gt;super.super.thread = 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(&amp;TH_XThread1-&gt;timeEvt);

QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);</code>
</operation>
</package>
<!--${AOs}-->
<package name="AOs" stereotype="0x02">
Expand Down Expand Up @@ -500,10 +510,7 @@ me-&gt;fork[n] = FREE;</action>
<operation name="run" type="void" visibility="0x02" properties="0x01">
<!--${XThreads::XThread1::run::thr}-->
<parameter name="thr" type="QXThread * const"/>
<code>QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);

// downcast the generic thr pointer to the specific thread
<code>// downcast the generic thr pointer to the specific thread
XThread1 *me = (XThread1 *)thr;

// subscribe to the EAT signal (from the application)
Expand Down Expand Up @@ -542,12 +549,7 @@ for (;;) {
<operation name="run" type="void" visibility="0x02" properties="0x01">
<!--${XThreads::XThread2::run::thr}-->
<parameter name="thr" type="QXThread * const"/>
<code>QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);

// downcast the generic thr pointer to the specific thread
<code>// downcast the generic thr pointer to the specific thread
//XThread2 *me = (XThread2 *)thr;

// initialize the semaphore before using it
Expand Down Expand Up @@ -673,6 +675,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.c}-->
Expand Down
21 changes: 5 additions & 16 deletions examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/bsp.c
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-09-07
// 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 @@ -783,38 +783,27 @@ QSTimeCtr QS_onGetTime(void) { // 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 QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_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 QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{
Expand Down
Loading

0 comments on commit 7332d59

Please sign in to comment.