Skip to content

Commit

Permalink
Merge pull request #187 from azure-rtos/tizho/rx_update
Browse files Browse the repository at this point in the history
Import RX port update for 6.1.11 release.
  • Loading branch information
TiejunMS authored Apr 26, 2022
2 parents cef9cb2 + 408f9fa commit e11c166
Show file tree
Hide file tree
Showing 90 changed files with 620 additions and 182 deletions.
6 changes: 4 additions & 2 deletions ports/rxv1/ccrx/inc/tx_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* tx_port.h RXv1/CCRX */
/* 6.1.10 */
/* 6.1.11 */
/* */
/* AUTHOR */
/* */
Expand Down Expand Up @@ -55,6 +55,8 @@
/* added missing interrupt */
/* control defines, */
/* resulting in version 6.1.10 */
/* 04-25-2022 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -271,7 +273,7 @@ static void _tx_thread_system_return_inline(void)

#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv1/CCRX Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv1/CCRX Version 6.1.11 *";
#else
extern CHAR _tx_version_id[];
#endif
Expand Down
3 changes: 3 additions & 0 deletions ports/rxv1/ccrx/readme_threadx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ For generic code revision information, please refer to the readme_threadx_generi
file, which is included in your distribution. The following details the revision
information associated with this specific port of ThreadX:

04-25-2022 Release 6.1.11 changes:
tx_thread_schedule.src Added low power support

01-31-2022 Release 6.1.10 changes:
tx_port.h Removed system state macro, and added
missing interrupt control defines
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_initialize_low_level.src
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_initialize_low_level RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -72,6 +72,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/

Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_thread_context_restore.src
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_context_restore RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -84,6 +84,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_thread_context_save.src
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_context_save RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -76,6 +76,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_thread_interrupt_control.src
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_interrupt_control RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -70,6 +70,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
Expand Down
48 changes: 39 additions & 9 deletions ports/rxv1/ccrx/src/tx_thread_schedule.src
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
.GLB __tx_thread_execute_ptr
.GLB __tx_thread_current_ptr
.GLB __tx_timer_time_slice
.IF TX_LOW_POWER==1
.GLB _tx_low_power_enter
.GLB _tx_low_power_exit
.GLB __tx_thread_preempt_disable
.ENDIF
;
.SECTION P,CODE

Expand All @@ -42,7 +47,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_schedule RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -82,33 +87,58 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), and */
;/* added low power support, */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
.GLB __tx_thread_schedule
__tx_thread_schedule:
;
; /* Enable interrupts. */
;
SETPSW I
;
; /* Wait for a thread to execute. */
; do
; {
MOV.L #__tx_thread_execute_ptr, R1 ; Address of thread to executer ptr
__tx_thread_schedule_loop:
SETPSW I ; Enable interrupts
CLRPSW I ; Disable interrupts
MOV.L [R1],R2 ; Pickup next thread to execute
CMP #0,R2 ; Is it NULL?
BEQ __tx_thread_schedule_loop ; Yes, idle system, keep checking
BNE __tx_thread_thread_ready ; Not NULL, schedule the thread
; Idle system - no thread is ready
.IF TX_LOW_POWER==1
MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag.
MOV.L [R1], R2
ADD #1, R2 ; Disable preemption while enter/exit
MOV.L R2, [R1]
BSR _tx_low_power_enter ; Possibly enter low power mode
.ENDIF

.IF TX_ENABLE_WAIT==1
WAIT ; Wait for interrupt
.ENDIF

.IF TX_LOW_POWER==1
CLRPSW I ; Disable interrupts (because WAIT enables interrupts)
BSR _tx_low_power_exit ; Possibly exit low power mode
MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag.
MOV.L [R1], R2
SUB #1, R2 ; Enable preemption
MOV.L R2, [R1]
MOV.L #__tx_thread_execute_ptr, R1 ; Address of thread to executer ptr
.ENDIF

BRA __tx_thread_schedule_loop ; Idle system, keep checking

__tx_thread_thread_ready:
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
CLRPSW I ; Disable interrupts
; /* Yes! We have a thread to execute. Note that interrupts are locked out at this point. */
;
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_thread_stack_build.src
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_stack_build RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -75,6 +75,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_thread_system_return.src
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_system_return RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -78,6 +78,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/ccrx/src/tx_timer_interrupt.src
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_timer_interrupt RXv1/CCRX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -99,6 +99,8 @@
;/* added missing thread */
;/* preemption logic, */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
Expand Down
6 changes: 4 additions & 2 deletions ports/rxv1/gnu/inc/tx_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* tx_port.h RXv1/GNURX */
/* 6.1.10 */
/* 6.1.11 */
/* */
/* AUTHOR */
/* */
Expand Down Expand Up @@ -54,6 +54,8 @@
/* added missing interrupt */
/* control defines, */
/* resulting in version 6.1.10 */
/* 04-25-2022 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -267,7 +269,7 @@ static void _tx_thread_system_return_inline(void)

#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv1/GNURX Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv1/GNURX Version 6.1.11 *";
#else
extern CHAR _tx_version_id[];
#endif
Expand Down
5 changes: 4 additions & 1 deletion ports/rxv1/gnu/readme_threadx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,12 @@ For generic code revision information, please refer to the readme_threadx_generi
file, which is included in your distribution. The following details the revision
information associated with this specific port of ThreadX:

04-25-2022 Release 6.1.11 changes:
tx_thread_schedule.s Added low power support

01-31-2022 Release 6.1.10 changes:
tx_port.h Added missing interrupt control defines
tx_timer_interrupt.src Added missing thread preemption logic
tx_timer_interrupt.s Added missing thread preemption logic

10-15-2021 Release 6.1.9 changes:
tx_thread_context_restore.s Removed unnecessary stack type placement
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/gnu/src/tx_initialize_low_level.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_initialize_low_level RXv1/GNURX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -67,6 +67,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
.global __tx_initialize_low_level
Expand Down
4 changes: 3 additions & 1 deletion ports/rxv1/gnu/src/tx_thread_context_restore.S
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_thread_context_restore RXv1/GNURX */
;/* 6.1.10 */
;/* 6.1.11 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -85,6 +85,8 @@
;/* resulting in version 6.1.9 */
;/* 01-31-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.10 */
;/* 04-25-2022 William E. Lamie Modified comment(s), */
;/* resulting in version 6.1.11 */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
Expand Down
Loading

0 comments on commit e11c166

Please sign in to comment.