summaryrefslogtreecommitdiff
path: root/ports/rxv2/iar/src
diff options
context:
space:
mode:
Diffstat (limited to 'ports/rxv2/iar/src')
-rw-r--r--ports/rxv2/iar/src/tx_initialize_low_level.s88
-rw-r--r--ports/rxv2/iar/src/tx_thread_context_restore.s98
-rw-r--r--ports/rxv2/iar/src/tx_thread_context_save.s90
-rw-r--r--ports/rxv2/iar/src/tx_thread_interrupt_control.s92
-rw-r--r--ports/rxv2/iar/src/tx_thread_schedule.s97
-rw-r--r--ports/rxv2/iar/src/tx_thread_stack_build.s28
-rw-r--r--ports/rxv2/iar/src/tx_thread_system_return.s20
-rw-r--r--ports/rxv2/iar/src/tx_timer_interrupt.s34
8 files changed, 221 insertions, 326 deletions
diff --git a/ports/rxv2/iar/src/tx_initialize_low_level.s b/ports/rxv2/iar/src/tx_initialize_low_level.s
index eafcd6c0..482b29af 100644
--- a/ports/rxv2/iar/src/tx_initialize_low_level.s
+++ b/ports/rxv2/iar/src/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -25,53 +25,41 @@
section .text:CODE:ROOT
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_initialize_low_level RXv2/IAR */
;/* 6.1.11 */
-;/* AUTHOR */
-;/* */
+;/* AUTHOR */
+;/* */
;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), */
-;/* 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 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* */
+;/**************************************************************************/
public __tx_initialize_low_level
__tx_initialize_low_level:
@@ -80,7 +68,7 @@ __tx_initialize_low_level:
; _tx_initialize_unused_memory = (VOID_PTR) &free_mem_start;
;
MOV.L #__tx_free_memory_start, R1 ; Pickup unused memory address
- MOV.L #__tx_initialize_unused_memory,R2
+ MOV.L #__tx_initialize_unused_memory,R2
MOV.L R1,[R2] ; Save first free memory address
; /* Set priority of SWINT to 1. */
diff --git a/ports/rxv2/iar/src/tx_thread_context_restore.s b/ports/rxv2/iar/src/tx_thread_context_restore.s
index c8a452ed..7998506d 100644
--- a/ports/rxv2/iar/src/tx_thread_context_restore.s
+++ b/ports/rxv2/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,54 +39,40 @@
section .text:CODE:ROOT
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_context_restore RXv2/IAR */
;/* 6.1.11 */
-;/* AUTHOR */
-;/* */
+;/* AUTHOR */
+;/* */
;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), and */
-;/* removed unnecessary stack */
-;/* type placement, */
-;/* 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 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
+;/* */
+;/**************************************************************************/
public __tx_thread_context_restore
__tx_thread_context_restore:
@@ -103,7 +89,7 @@ __tx_thread_context_restore:
MOV.L [R1], R2
SUB #1, R2
MOV.L R2,[R1]
- BEQ __tx_thread_not_nested_restore
+ BEQ __tx_thread_not_nested_restore
;
; /* Interrupts are nested. */
@@ -125,17 +111,17 @@ __tx_thread_not_nested_restore:
; else if (((_tx_thread_current_ptr) && (_tx_thread_current_ptr == _tx_thread_execute_ptr))
; || (_tx_thread_preempt_disable))
; {
-
+
MOV.L #__tx_thread_current_ptr, R1 ; Pickup current thread ptr address
MOV.L [R1], R2
CMP #0, R2
- BEQ __tx_thread_idle_system_restore
-
+ BEQ __tx_thread_idle_system_restore
+
MOV.L #__tx_thread_preempt_disable, R3 ; Pick up preempt disable flag
MOV.L [R3], R3
CMP #0, R3
BNE __tx_thread_no_preempt_restore ; If pre-empt disable flag set, we simply return to the original point of interrupt regardless
-
+
MOV.L #__tx_thread_execute_ptr, R3 ; (_tx_thread_current_ptr != _tx_thread_execute_ptr)
CMP [R3], R2
BNE __tx_thread_preempt_restore ; Jump to pre-empt restoring
@@ -176,7 +162,7 @@ __tx_thread_dont_save_ts:
SETPSW U ; User stack
PUSHM R6-R13
-
+
MVFACGU #0, A1, R4 ; Save accumulators.
MVFACHI #0, A1, R5
MVFACLO #0, A1, R6
diff --git a/ports/rxv2/iar/src/tx_thread_context_save.s b/ports/rxv2/iar/src/tx_thread_context_save.s
index 28c0ea5f..dd29a288 100644
--- a/ports/rxv2/iar/src/tx_thread_context_save.s
+++ b/ports/rxv2/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,51 +33,39 @@
extern __tx_thread_current_ptr
section .text:CODE:ROOT
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_context_save RXv2/IAR */
;/* 6.1.11 */
-;/* AUTHOR */
-;/* */
+;/* AUTHOR */
+;/* */
;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), */
-;/* 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 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
public __tx_thread_context_save
@@ -104,7 +92,7 @@ __tx_thread_context_save:
BEQ __tx_thread_not_nested_save
;
; /* Nested interrupt condition. */
-;
+;
ADD #1, r2 ; _tx_thread_system_state++
MOV.L r2, [r1]
@@ -130,7 +118,7 @@ __tx_thread_not_nested_save:
MOV.L #__tx_thread_current_ptr, R2 ; Pickup current thread pointer
MOV.L [R2], R2
- CMP #0,R2 ; Is it NULL?
+ CMP #0,R2 ; Is it NULL?
BEQ __tx_thread_idle_system_save ; Yes, idle system is running - idle restore
;
; /* Move stack frame over to the current threads stack. */
@@ -152,7 +140,7 @@ __tx_thread_not_nested_save:
MOV.L R14, [-R1] ; Save R14 on thread stack
MVFC FPSW, R3
MOV.L R3, [-R1] ; Save FPSW on thread stack
-
+
POP R2 ; Pick up return address from interrupt stack
ADD #16, R0, R0 ; Correct interrupt stack pointer back to the bottom
MVTC R1, USP ; Set user/thread stack pointer
@@ -171,5 +159,5 @@ __tx_thread_idle_system_save:
JMP R1 ; Return to caller
;
; }
-;}
+;}
END
diff --git a/ports/rxv2/iar/src/tx_thread_interrupt_control.s b/ports/rxv2/iar/src/tx_thread_interrupt_control.s
index d4656214..1c29ec80 100644
--- a/ports/rxv2/iar/src/tx_thread_interrupt_control.s
+++ b/ports/rxv2/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,50 +28,38 @@
;#include "tx_thread.h"
;
section .text:CODE:ROOT
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_interrupt_control RXv2/IAR */
;/* 6.1.11 */
-;/* AUTHOR */
-;/* */
+;/* AUTHOR */
+;/* */
;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), */
-;/* 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 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
+;/* */
+;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
public __tx_thread_interrupt_control
@@ -79,20 +67,20 @@ __tx_thread_interrupt_control:
;
; /* Pickup current interrupt lockout posture. */
;
-
+
MVFC PSW, R2 ; Save PSW to R2
MOV.L R2, R3 ; Make a copy of PSW in r3
-
+
;
; /* Apply the new interrupt posture. */
;
-
+
BTST #16, R1 ; Test I bit of PSW of "new posture"
BMNE #16, R2 ; Conditionally set I bit of intermediate posture
-
+
MVTC R2, PSW ; Save intermediate posture to PSW
-
- MOV.L R3,R1 ; Get original SR
+
+ MOV.L R3,R1 ; Get original SR
RTS ; Return to caller
;}
END
diff --git a/ports/rxv2/iar/src/tx_thread_schedule.s b/ports/rxv2/iar/src/tx_thread_schedule.s
index 5cf106c7..8d0c02f6 100644
--- a/ports/rxv2/iar/src/tx_thread_schedule.s
+++ b/ports/rxv2/iar/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,56 +41,41 @@
section .text:CODE:ROOT
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_schedule RXv2/IAR */
;/* 6.1.11 */
-;/* AUTHOR */
-;/* */
+;/* AUTHOR */
+;/* */
;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLS */
-;/* */
+;/* */
+;/* OUTPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), and */
-;/* removed unnecessary stack */
-;/* type checking, */
-;/* 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 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
public __tx_thread_schedule
@@ -108,7 +93,7 @@ __tx_thread_schedule_loop:
MOV.L [R1],R2 ; Pickup next thread to execute
CMP #0,R2 ; Is it NULL?
BNE __tx_thread_thread_ready ; Not NULL, schedule the thread
- ; Idle system - no thread is ready
+ ; 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
@@ -137,7 +122,7 @@ __tx_thread_thread_ready:
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Note that interrupts are locked out at this point. */
;
; /* Setup the current thread pointer. */
@@ -173,14 +158,14 @@ __tx_thread_thread_ready:
MVTACLO R3, A1
MVTACHI R2, A1
MVTACGU R1, A1
-
+
POPM R6-R13 ; Recover interrupt stack frame
- POPC FPSW
+ POPC FPSW
POPM R14-R15
POPM R3-R5
- POPM R1-R2
+ POPM R1-R2
RTE ; Return to point of interrupt, this restores PC and PSW
-
+
;}
extern __tx_thread_context_save
diff --git a/ports/rxv2/iar/src/tx_thread_stack_build.s b/ports/rxv2/iar/src/tx_thread_stack_build.s
index 1d6be57f..632ac6e3 100644
--- a/ports/rxv2/iar/src/tx_thread_stack_build.s
+++ b/ports/rxv2/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -55,28 +55,14 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), and */
-;/* removed unnecessary stack */
-;/* type placement, */
-;/* 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 */
-;/* */
;/**************************************************************************/
public __tx_thread_stack_build
__tx_thread_stack_build:
;
-;
+;
; /* Build an interrupt frame. The form of the fake interrupt stack
; on the Renesas RX should look like the following after it is built:
-;
+;
; Stack Top: ACC0
; ACC1
; R6
@@ -139,11 +125,11 @@ __tx_thread_stack_build:
MOV.L R4,[-R3]
; /* Setup stack pointer. */
-; thread_ptr -> tx_thread_stack_ptr = R1;
+; thread_ptr -> tx_thread_stack_ptr = R1;
MOV.L R3, 8[R1]
; Store initial SP in thread control block
RTS
-
+
;}
END
diff --git a/ports/rxv2/iar/src/tx_thread_system_return.s b/ports/rxv2/iar/src/tx_thread_system_return.s
index 0e312291..53f0855f 100644
--- a/ports/rxv2/iar/src/tx_thread_system_return.s
+++ b/ports/rxv2/iar/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -20,7 +20,7 @@
;/**************************************************************************/
section .text:CODE:ROOT
-
+
;/**************************************************************************/
;/* */
;/* FUNCTION RELEASE */
@@ -54,18 +54,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-31-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), */
-;/* 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 */
-;/* */
;/**************************************************************************/
public __tx_thread_system_return
diff --git a/ports/rxv2/iar/src/tx_timer_interrupt.s b/ports/rxv2/iar/src/tx_timer_interrupt.s
index 9bc43b24..a1ec6147 100644
--- a/ports/rxv2/iar/src/tx_timer_interrupt.s
+++ b/ports/rxv2/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -73,20 +73,6 @@ SWI0 EQU 0x872E0
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), */
-;/* 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 */
-;/* 04-25-2022 William E. Lamie Modified comment(s), */
-;/* resulting in version 6.1.11 */
-;/* */
;/**************************************************************************/
public __tx_timer_interrupt
@@ -149,14 +135,14 @@ __tx_timer_no_time_slice:
MOV.L [R2+], R1 ; Pickup timer list entry, _tx_timer_current_ptr++
CMP #0, R1 ; Is timer pointer NULL?
BEQ __tx_timer_no_timer ; Yes, no timer has expired
-
+
;
; /* Set expiration flag. */
; _tx_timer_expired = TX_TRUE;
;
MOV.L #__tx_timer_expired,R2 ; Build address of expired flag
MOV.L #1, R1 ; Build expired value
- MOV.L R1, [R2]
+ MOV.L R1, [R2]
BRA __tx_timer_done ; Finished with timer processing
;
; }
@@ -167,7 +153,7 @@ __tx_timer_no_timer:
; /* No timer expired, increment the timer pointer. */
; _tx_timer_current_ptr++;
;
-; /* R2 already contains __tx_timer_current_ptr++ */
+; /* R2 already contains __tx_timer_current_ptr++ */
;
; /* Check for wrap-around. */
; if (_tx_timer_current_ptr == _tx_timer_list_end)
@@ -186,9 +172,9 @@ __tx_timer_no_timer:
; }
;
__tx_timer_skip_wrap:
- MOV.L #__tx_timer_current_ptr,R1
+ MOV.L #__tx_timer_current_ptr,R1
MOV.L R2, [R1] ; Store in updated pointer in _tx_timer_current_ptr
-
+
__tx_timer_done:
;
; /* See if anything has expired. */
@@ -222,14 +208,14 @@ __tx_timer_dont_activate:
; /* Did time slice expire? */
; if (_tx_timer_expired_time_slice)
; {
-;
+;
MOV.L #__tx_timer_expired_time_slice, R1 ; Pickup time-slice expired flag addr
MOV.L [R1], R1 ; Pickup actual flag
CMP #0,R1 ; Has time-slice expired?
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice expiration
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BSR __tx_thread_time_slice ; Call time-slice processing