Merge pull request #159 from azure-rtos/sclarson/update_rx_modules

update RX modules
This commit is contained in:
Scott Larson
2022-02-02 11:45:51 -08:00
committed by GitHub
3 changed files with 90 additions and 60 deletions

View File

@@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* tx_port.h RXv2/IAR */ /* tx_port.h RXv2/IAR */
/* 6.1.9 */ /* 6.1.10 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@@ -52,6 +52,11 @@
/* resulting in version 6.1.7 */ /* resulting in version 6.1.7 */
/* 10-15-2021 William E. Lamie Modified comment(s), */ /* 10-15-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.9 */ /* resulting in version 6.1.9 */
/* 01-31-2022 William E. Lamie Modified comment(s), removed */
/* system state macro, and */
/* added missing interrupt */
/* control defines, */
/* resulting in version 6.1.10 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@@ -85,6 +90,12 @@ typedef short SHORT;
typedef unsigned short USHORT; typedef unsigned short USHORT;
/* Define interrupt control options. */
#define TX_INT_DISABLE 0x00000000
#define TX_INT_ENABLE 0x00010000
/* Define the priority levels for ThreadX. Legal values range /* Define the priority levels for ThreadX. Legal values range
from 32 to 1024 and MUST be evenly divisible by 32. */ from 32 to 1024 and MUST be evenly divisible by 32. */
@@ -263,15 +274,6 @@ static void _tx_thread_system_return_inline(void)
#endif #endif
#ifndef TX_THREAD_GET_SYSTEM_STATE
extern volatile ULONG _tx_thread_system_state;
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | ((~__get_PSW_register()) & (1u << 17u)))
#endif
/* Define the interrupt lockout macros for each ThreadX object. */ /* Define the interrupt lockout macros for each ThreadX object. */
#define TX_BLOCK_POOL_DISABLE TX_DISABLE #define TX_BLOCK_POOL_DISABLE TX_DISABLE
@@ -286,7 +288,7 @@ extern volatile ULONG _tx_thread_system_state;
#ifdef TX_THREAD_INIT #ifdef TX_THREAD_INIT
CHAR _tx_version_id[] = CHAR _tx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv2/IAR Version 6.1.9 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv2/IAR Version 6.1.10 *";
#else #else
extern CHAR _tx_version_id[]; extern CHAR _tx_version_id[];
#endif #endif

View File

@@ -28,7 +28,7 @@
;/* FUNCTION RELEASE */ ;/* FUNCTION RELEASE */
;/* */ ;/* */
;/* _tx_thread_stack_build RXv2/IAR */ ;/* _tx_thread_stack_build RXv2/IAR */
;/* 6.1.9 */ ;/* 6.1.10 */
;/* AUTHOR */ ;/* AUTHOR */
;/* */ ;/* */
;/* William E. Lamie, Microsoft Corporation */ ;/* William E. Lamie, Microsoft Corporation */
@@ -65,6 +65,8 @@
;/* removed unnecessary stack */ ;/* removed unnecessary stack */
;/* type placement, */ ;/* type placement, */
;/* resulting in version 6.1.9 */ ;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* */ ;/* */
;/**************************************************************************/ ;/**************************************************************************/
public __tx_thread_stack_build public __tx_thread_stack_build

View File

@@ -20,6 +20,8 @@
;/**************************************************************************/ ;/**************************************************************************/
;/**************************************************************************/ ;/**************************************************************************/
SWI0 EQU 0x872E0
extern __tx_timer_expiration_process extern __tx_timer_expiration_process
extern __tx_timer_system_clock extern __tx_timer_system_clock
extern __tx_timer_expired_time_slice extern __tx_timer_expired_time_slice
@@ -29,6 +31,9 @@
extern __tx_timer_time_slice extern __tx_timer_time_slice
extern __tx_timer_list_end extern __tx_timer_list_end
extern __tx_thread_time_slice extern __tx_thread_time_slice
extern __tx_thread_preempt_disable
extern __tx_thread_execute_ptr
extern __tx_thread_current_ptr
section .text:CODE:ROOT section .text:CODE:ROOT
@@ -37,7 +42,7 @@
;/* FUNCTION RELEASE */ ;/* FUNCTION RELEASE */
;/* */ ;/* */
;/* _tx_timer_interrupt RXv2/IAR */ ;/* _tx_timer_interrupt RXv2/IAR */
;/* 6.1.9 */ ;/* 6.1.10 */
;/* AUTHOR */ ;/* AUTHOR */
;/* */ ;/* */
;/* William E. Lamie, Microsoft Corporation */ ;/* William E. Lamie, Microsoft Corporation */
@@ -76,6 +81,10 @@
;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */ ;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
;/* 10-15-2021 William E. Lamie Modified comment(s), */ ;/* 10-15-2021 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.9 */ ;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), and */
;/* added missing thread */
;/* preemption logic, */
;/* resulting in version 6.1.10 */
;/* */ ;/* */
;/**************************************************************************/ ;/**************************************************************************/
@@ -222,6 +231,23 @@ __tx_timer_dont_activate:
; _tx_thread_time_slice(); ; _tx_thread_time_slice();
BSR __tx_thread_time_slice ; Call time-slice processing BSR __tx_thread_time_slice ; Call time-slice processing
; /* Check if we must trigger a context switch. */
MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag.
MOV.L [R1], R1
CMP #0, R1
BNE __tx_timer_not_ts_expiration ; Skip if prempt disabled.
MOV.L #__tx_thread_execute_ptr, R1
MOV.L [R1], R1
MOV.L #__tx_thread_current_ptr, R2
MOV.L [R2], R2
CMP R1, R2
BEQ __tx_timer_not_ts_expiration
MOV.L #SWI0, R1
MOV.L #1, [R1]
; } ; }
; ;
__tx_timer_not_ts_expiration: __tx_timer_not_ts_expiration: