summaryrefslogtreecommitdiff
path: root/ports/cortex_m3
diff options
context:
space:
mode:
authorYuxin Zhou <[email protected]>2021-07-28 07:24:02 +0000
committerYuxin Zhou <[email protected]>2021-07-28 07:24:02 +0000
commitd0dab582506f132690b35b36ffea129ad51110b0 (patch)
tree13add80dd314dc38efc1830f3d1f36b5a2596e98 /ports/cortex_m3
parent244365fc6a937c754cfc6bb8e6895dc6f37bac0e (diff)
Release 6.1.8v6.1.8_rel
Diffstat (limited to 'ports/cortex_m3')
-rw-r--r--ports/cortex_m3/ac5/src/tx_thread_context_restore.s4
-rw-r--r--ports/cortex_m3/ac5/src/tx_thread_context_save.s6
-rw-r--r--ports/cortex_m3/ac5/src/tx_thread_schedule.s10
-rw-r--r--ports/cortex_m3/ac6/src/tx_thread_context_restore.S3
-rw-r--r--ports/cortex_m3/ac6/src/tx_thread_context_save.S6
-rw-r--r--ports/cortex_m3/ac6/src/tx_thread_schedule.S10
-rw-r--r--ports/cortex_m3/gnu/src/tx_thread_context_restore.S3
-rw-r--r--ports/cortex_m3/gnu/src/tx_thread_context_save.S2
-rw-r--r--ports/cortex_m3/gnu/src/tx_thread_schedule.S8
-rw-r--r--ports/cortex_m3/iar/src/tx_thread_context_restore.s2
-rw-r--r--ports/cortex_m3/iar/src/tx_thread_context_save.s2
-rw-r--r--ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s2
-rw-r--r--ports/cortex_m3/iar/src/tx_thread_schedule.s8
13 files changed, 42 insertions, 24 deletions
diff --git a/ports/cortex_m3/ac5/src/tx_thread_context_restore.s b/ports/cortex_m3/ac5/src/tx_thread_context_restore.s
index 75d971d2..aa2f30a4 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_context_restore.s
@@ -20,7 +20,7 @@
/**************************************************************************/
/**************************************************************************/
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_isr_exit
#endif
@@ -69,7 +69,7 @@
EXPORT _tx_thread_context_restore
_tx_thread_context_restore
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR exit function to indicate an ISR is complete. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_exit // Call the ISR exit function
diff --git a/ports/cortex_m3/ac5/src/tx_thread_context_save.s b/ports/cortex_m3/ac5/src/tx_thread_context_save.s
index d9f27da5..78cbc3c9 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_context_save.s
@@ -20,7 +20,7 @@
/**************************************************************************/
/**************************************************************************/
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_isr_enter
#endif
@@ -51,7 +51,7 @@
/* */
/* CALLS */
/* */
-/* None */
+/* [_tx_execution_isr_enter] Execution profiling ISR enter */
/* */
/* CALLED BY */
/* */
@@ -69,7 +69,7 @@
EXPORT _tx_thread_context_save
_tx_thread_context_save
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR enter function to indicate an ISR is starting. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_enter // Call the ISR enter function
diff --git a/ports/cortex_m3/ac5/src/tx_thread_schedule.s b/ports/cortex_m3/ac5/src/tx_thread_schedule.s
index 61371a3b..f2b1d103 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_schedule.s
@@ -25,7 +25,7 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_system_stack_ptr
IMPORT _tx_thread_preempt_disable
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_thread_enter
IMPORT _tx_execution_thread_exit
#endif
@@ -124,7 +124,7 @@ PendSV_Handler
__tx_ts_handler
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread exit function to indicate the thread is no longer executing. */
CPSID i // Disable interrupts
PUSH {r0, lr} // Save LR (and r0 just for alignment)
@@ -198,7 +198,7 @@ __tx_ts_restore
STR r5, [r4] // Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread entry function to indicate the thread is executing. */
PUSH {r0, r1} // Save r0 and r1
BL _tx_execution_thread_enter // Call the thread execution enter function
@@ -233,7 +233,9 @@ __tx_ts_wait
CBNZ r1, __tx_ts_ready // If non-NULL, a new thread is ready!
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
#endif
#ifdef TX_ENABLE_WFI
@@ -243,7 +245,9 @@ __tx_ts_wait
#endif
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
#endif
CPSIE i // Enable interrupts
diff --git a/ports/cortex_m3/ac6/src/tx_thread_context_restore.S b/ports/cortex_m3/ac6/src/tx_thread_context_restore.S
index 5159d0a3..9dbe0204 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_context_restore.S
@@ -19,7 +19,8 @@
/** */
/**************************************************************************/
/**************************************************************************/
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_isr_exit
#endif
diff --git a/ports/cortex_m3/ac6/src/tx_thread_context_save.S b/ports/cortex_m3/ac6/src/tx_thread_context_save.S
index 0e8dd3bd..5061b512 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_context_save.S
@@ -23,7 +23,7 @@
.text
.align 4
.syntax unified
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_isr_enter
#endif
/**************************************************************************/
@@ -51,7 +51,7 @@
/* */
/* CALLS */
/* */
-/* None */
+/* [_tx_execution_isr_enter] Execution profiling ISR enter */
/* */
/* CALLED BY */
/* */
@@ -70,7 +70,7 @@
.thumb_func
_tx_thread_context_save:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR enter function to indicate an ISR is starting. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_enter // Call the ISR enter function
diff --git a/ports/cortex_m3/ac6/src/tx_thread_schedule.S b/ports/cortex_m3/ac6/src/tx_thread_schedule.S
index f93ea4e2..7f43ef4e 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_schedule.S
@@ -23,7 +23,7 @@
.global _tx_thread_current_ptr
.global _tx_thread_execute_ptr
.global _tx_timer_time_slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_thread_enter
.global _tx_execution_thread_exit
#endif
@@ -130,7 +130,7 @@ __tx_PendSVHandler:
__tx_ts_handler:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread exit function to indicate the thread is no longer executing. */
CPSID i // Disable interrupts
PUSH {r0, lr} // Save LR (and r0 just for alignment)
@@ -204,7 +204,7 @@ __tx_ts_restore:
STR r5, [r4] // Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread entry function to indicate the thread is executing. */
PUSH {r0, r1} // Save r0 and r1
BL _tx_execution_thread_enter // Call the thread execution enter function
@@ -239,7 +239,9 @@ __tx_ts_wait:
CBNZ r1, __tx_ts_ready // If non-NULL, a new thread is ready!
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
#endif
#ifdef TX_ENABLE_WFI
@@ -249,7 +251,9 @@ __tx_ts_wait:
#endif
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
#endif
CPSIE i // Enable interrupts
diff --git a/ports/cortex_m3/gnu/src/tx_thread_context_restore.S b/ports/cortex_m3/gnu/src/tx_thread_context_restore.S
index 017a8809..4b62c21c 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_context_restore.S
@@ -19,7 +19,8 @@
/** */
/**************************************************************************/
/**************************************************************************/
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_isr_exit
#endif
diff --git a/ports/cortex_m3/gnu/src/tx_thread_context_save.S b/ports/cortex_m3/gnu/src/tx_thread_context_save.S
index f45292d8..13283881 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_context_save.S
@@ -67,7 +67,7 @@
.thumb_func
_tx_thread_context_save:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR enter function to indicate an ISR is starting. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_enter // Call the ISR enter function
diff --git a/ports/cortex_m3/gnu/src/tx_thread_schedule.S b/ports/cortex_m3/gnu/src/tx_thread_schedule.S
index 9ee1d9f7..7c2d6c3e 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_schedule.S
@@ -128,7 +128,7 @@ __tx_PendSVHandler:
__tx_ts_handler:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread exit function to indicate the thread is no longer executing. */
CPSID i // Disable interrupts
PUSH {r0, lr} // Save LR (and r0 just for alignment)
@@ -202,7 +202,7 @@ __tx_ts_restore:
STR r5, [r4] // Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread entry function to indicate the thread is executing. */
PUSH {r0, r1} // Save r0 and r1
BL _tx_execution_thread_enter // Call the thread execution enter function
@@ -237,7 +237,9 @@ __tx_ts_wait:
CBNZ r1, __tx_ts_ready // If non-NULL, a new thread is ready!
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
#endif
#ifdef TX_ENABLE_WFI
@@ -247,7 +249,9 @@ __tx_ts_wait:
#endif
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
#endif
CPSIE i // Enable interrupts
diff --git a/ports/cortex_m3/iar/src/tx_thread_context_restore.s b/ports/cortex_m3/iar/src/tx_thread_context_restore.s
index 45341c70..992585eb 100644
--- a/ports/cortex_m3/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m3/iar/src/tx_thread_context_restore.s
@@ -66,7 +66,7 @@
PUBLIC _tx_thread_context_restore
_tx_thread_context_restore:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR exit function to indicate an ISR is complete. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_exit // Call the ISR exit function
diff --git a/ports/cortex_m3/iar/src/tx_thread_context_save.s b/ports/cortex_m3/iar/src/tx_thread_context_save.s
index 8bb771cb..cae664e0 100644
--- a/ports/cortex_m3/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m3/iar/src/tx_thread_context_save.s
@@ -66,7 +66,7 @@
PUBLIC _tx_thread_context_save
_tx_thread_context_save:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR enter function to indicate an ISR is starting. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_enter // Call the ISR enter function
diff --git a/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s
index 7b1235a5..d27465a3 100644
--- a/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s
@@ -67,7 +67,7 @@ _tx_thread_interrupt_disable:
/* Return current interrupt lockout posture. */
#ifdef TX_PORT_USE_BASEPRI
MRS r0, BASEPRI
- LDR r1, =TX_PORT_USE_BASEPRI
+ LDR r1, =TX_PORT_BASEPRI
MSR BASEPRI, r1
#else
MRS r0, PRIMASK
diff --git a/ports/cortex_m3/iar/src/tx_thread_schedule.s b/ports/cortex_m3/iar/src/tx_thread_schedule.s
index 941f5398..6584a90a 100644
--- a/ports/cortex_m3/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m3/iar/src/tx_thread_schedule.s
@@ -124,7 +124,7 @@ __tx_PendSVHandler:
__tx_ts_handler:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread exit function to indicate the thread is no longer executing. */
CPSID i // Disable interrupts
PUSH {r0, lr} // Save LR (and r0 just for alignment)
@@ -198,7 +198,7 @@ __tx_ts_restore:
STR r5, [r4] // Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the thread entry function to indicate the thread is executing. */
PUSH {r0, r1} // Save r0 and r1
BL _tx_execution_thread_enter // Call the thread execution enter function
@@ -233,7 +233,9 @@ __tx_ts_wait:
CBNZ r1, __tx_ts_ready // If non-NULL, a new thread is ready!
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_enter // Possibly enter low power mode
+ POP {r0-r3}
#endif
#ifdef TX_ENABLE_WFI
@@ -243,7 +245,9 @@ __tx_ts_wait:
#endif
#ifdef TX_LOW_POWER
+ PUSH {r0-r3}
BL tx_low_power_exit // Exit low power mode
+ POP {r0-r3}
#endif
CPSIE i // Enable interrupts