summaryrefslogtreecommitdiff
path: root/ports_module/cortex_a7
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /ports_module/cortex_a7
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'ports_module/cortex_a7')
-rw-r--r--ports_module/cortex_a7/ac5/example_build/sample_threadx_module.c40
-rw-r--r--ports_module/cortex_a7/ac5/example_build/sample_threadx_module_manager.c36
-rw-r--r--ports_module/cortex_a7/ac5/example_build/scatter.scat2
-rw-r--r--ports_module/cortex_a7/ac5/example_build/tx_initialize_low_level.s204
-rw-r--r--ports_module/cortex_a7/ac5/example_build/txm_module_preamble.s2
-rw-r--r--ports_module/cortex_a7/ac5/inc/tx_port.h98
-rw-r--r--ports_module/cortex_a7/ac5/inc/txm_module_port.h61
-rw-r--r--ports_module/cortex_a7/ac5/module_lib/src/txm_module_initialize.s84
-rw-r--r--ports_module/cortex_a7/ac5/module_lib/src/txm_module_thread_shell_entry.c13
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_restore.s92
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_save.s80
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_restore.s78
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_save.s102
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_end.s84
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_start.s74
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_control.s62
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_disable.s62
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_restore.s58
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_end.s84
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_start.s74
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_schedule.s142
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_stack_build.s86
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_system_return.s70
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_thread_vectored_context_save.s68
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/tx_timer_interrupt.s76
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_alignment_adjust.c85
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_external_memory_enable.c13
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_handler.c13
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_notify.c85
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_initialize.c163
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_thread_stack_build.s84
-rw-r--r--ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_user_mode_entry.s86
-rw-r--r--ports_module/cortex_a7/gnu/example_build/build_threadx_module_sample.bat2
-rw-r--r--ports_module/cortex_a7/gnu/example_build/gcc_setup.S15
-rw-r--r--ports_module/cortex_a7/gnu/example_build/module_code.c2
-rw-r--r--ports_module/cortex_a7/gnu/example_build/reset.S7
-rw-r--r--ports_module/cortex_a7/gnu/example_build/sample_threadx.ld14
-rw-r--r--ports_module/cortex_a7/gnu/example_build/sample_threadx_module.c40
-rw-r--r--ports_module/cortex_a7/gnu/example_build/sample_threadx_module.ld4
-rw-r--r--ports_module/cortex_a7/gnu/example_build/sample_threadx_module_manager.c36
-rw-r--r--ports_module/cortex_a7/gnu/example_build/tx_initialize_low_level.s19
-rw-r--r--ports_module/cortex_a7/gnu/example_build/txm_module_preamble.s4
-rw-r--r--ports_module/cortex_a7/gnu/inc/tx_port.h26
-rw-r--r--ports_module/cortex_a7/gnu/inc/txm_module_port.h64
-rw-r--r--ports_module/cortex_a7/gnu/module_lib/src/txm_module_thread_shell_entry.c13
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_restore.s22
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_save.s22
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_restore.s22
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_save.s22
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_end.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_start.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_control.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_disable.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_restore.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_end.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_start.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_schedule.s17
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_stack_build.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_system_return.s22
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_thread_vectored_context_save.s22
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/tx_timer_interrupt.s19
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_alignment_adjust.c13
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_external_memory_enable.c13
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c13
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c13
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_initialize.c163
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_thread_stack_build.s17
-rw-r--r--ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_user_mode_entry.s17
-rw-r--r--ports_module/cortex_a7/iar/example_build/cstartup.s10
-rw-r--r--ports_module/cortex_a7/iar/example_build/sample_threadx_module.c62
-rw-r--r--ports_module/cortex_a7/iar/example_build/sample_threadx_module.icf8
-rw-r--r--ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.c36
-rw-r--r--ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.icf4
-rw-r--r--ports_module/cortex_a7/iar/example_build/tx_initialize_low_level.s183
-rw-r--r--ports_module/cortex_a7/iar/example_build/txm_module_preamble.s18
-rw-r--r--ports_module/cortex_a7/iar/inc/tx_port.h103
-rw-r--r--ports_module/cortex_a7/iar/inc/txm_module_port.h66
-rw-r--r--ports_module/cortex_a7/iar/module_lib/src/txm_module_thread_shell_entry.c13
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_iar.c239
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_restore.s87
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_save.s67
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_restore.s85
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_save.s105
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_end.s87
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_start.s77
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_control.s65
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_disable.s65
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_restore.s61
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_end.s87
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_start.s77
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_schedule.s125
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_stack_build.s89
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_system_return.s71
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_thread_vectored_context_save.s73
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/tx_timer_interrupt.s79
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_alignment_adjust.c85
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_external_memory_enable.c13
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_handler.c13
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_notify.c85
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_initialize.c167
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_thread_stack_build.s87
-rw-r--r--ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_user_mode_entry.s89
105 files changed, 2562 insertions, 3234 deletions
diff --git a/ports_module/cortex_a7/ac5/example_build/sample_threadx_module.c b/ports_module/cortex_a7/ac5/example_build/sample_threadx_module.c
index fce2a3fa..f9ed56eb 100644
--- a/ports_module/cortex_a7/ac5/example_build/sample_threadx_module.c
+++ b/ports_module/cortex_a7/ac5/example_build/sample_threadx_module.c
@@ -1,5 +1,5 @@
-/* This is a small demo of the high-performance ThreadX kernel running as a module. It includes
- examples of eight threads of different priorities, using a message queue, semaphore, mutex,
+/* This is a small demo of the high-performance ThreadX kernel running as a module. It includes
+ examples of eight threads of different priorities, using a message queue, semaphore, mutex,
event flags group, byte pool, and block pool. */
/* Specify that this is a module! */
@@ -20,7 +20,7 @@
#define DEMO_QUEUE_SIZE 100
-/* Define the pool space in the bss section of the module. ULONG is used to
+/* Define the pool space in the bss section of the module. ULONG is used to
get the word alignment. */
ULONG demo_module_pool_space[DEMO_BYTE_POOL_SIZE / 4];
@@ -101,7 +101,7 @@ void demo_module_start(ULONG id)
CHAR *pointer;
/* Allocate all the objects. In MMU mode, modules cannot allocate control blocks within
- their own memory area so they cannot corrupt the resident portion of ThreadX by overwriting
+ their own memory area so they cannot corrupt the resident portion of ThreadX by overwriting
the control block(s). */
txm_module_object_allocate((void *) &thread_0, sizeof(TX_THREAD));
txm_module_object_allocate((void *) &thread_1, sizeof(TX_THREAD));
@@ -117,7 +117,7 @@ CHAR *pointer;
txm_module_object_allocate((void *) &event_flags_0, sizeof(TX_EVENT_FLAGS_GROUP));
txm_module_object_allocate((void *) &byte_pool_0, sizeof(TX_BYTE_POOL));
txm_module_object_allocate((void *) &block_pool_0, sizeof(TX_BLOCK_POOL));
-
+
/* Create a byte memory pool from which to allocate the thread stacks. */
tx_byte_pool_create(byte_pool_0, "module byte pool 0", demo_module_pool_space, DEMO_BYTE_POOL_SIZE);
@@ -129,25 +129,25 @@ CHAR *pointer;
/* Create the main thread. */
tx_thread_create(thread_0, "module thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
tx_thread_create(thread_1, "module thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(thread_2, "module thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
@@ -156,14 +156,14 @@ CHAR *pointer;
/* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
tx_thread_create(thread_3, "module thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(thread_4, "module thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -172,7 +172,7 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
tx_thread_create(thread_5, "module thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
@@ -180,14 +180,14 @@ CHAR *pointer;
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
tx_thread_create(thread_6, "module thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(thread_7, "module thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -237,7 +237,7 @@ UINT status;
*(ULONG *) 0x90000000 = 0xdeadbeef;
*(ULONG *) 0x90000FFC = 0xfeed0add;
*(ULONG *) 0x90001000 = 0xfedcba01;
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
@@ -247,7 +247,7 @@ UINT status;
/* Sleep for 10 ticks. */
tx_thread_sleep(10);
-
+
/* Set event flag 0 to wakeup thread 5. */
status = tx_event_flags_set(event_flags_0, 0x1, TX_OR);
@@ -300,11 +300,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -363,7 +363,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -416,7 +416,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(mutex_0);
diff --git a/ports_module/cortex_a7/ac5/example_build/sample_threadx_module_manager.c b/ports_module/cortex_a7/ac5/example_build/sample_threadx_module_manager.c
index 8b17e34a..ac3bbeb5 100644
--- a/ports_module/cortex_a7/ac5/example_build/sample_threadx_module_manager.c
+++ b/ports_module/cortex_a7/ac5/example_build/sample_threadx_module_manager.c
@@ -1,4 +1,4 @@
-/* Small demonstration of the ThreadX module manager. This demonstration assumes the program
+/* Small demonstration of the ThreadX module manager. This demonstration assumes the program
manager is loaded at 0 and that RAM addresses 0x200000 through 0x400000 are available for
use. */
@@ -45,7 +45,7 @@ VOID module_fault_handler(TX_THREAD *thread, TXM_MODULE_INSTANCE *module)
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -57,8 +57,8 @@ void tx_application_define(void *first_unused_memory)
{
/* Create the module manager thread. */
- tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
- first_unused_memory, DEMO_STACK_SIZE,
+ tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
+ first_unused_memory, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
@@ -71,46 +71,46 @@ void module_manager_entry(ULONG thread_input)
/* Initialize the module manager. */
txm_module_manager_initialize((VOID *) module_data_area, MODULE_DATA_SIZE);
-
+
/* Create a pool for module objects. */
txm_module_manager_object_pool_create(object_memory, sizeof(object_memory));
-
+
/* Register a fault handler. */
txm_module_manager_memory_fault_notify(module_fault_handler);
-
+
/* Initialize MMU. */
txm_module_manager_mm_initialize();
-
+
/* Load the module that is already there, in this example it is placed there by the multiple image download. */
txm_module_manager_in_place_load(&my_module1, "my module1", (VOID *) module_code);
-
+
/* Load a second instance of the module. */
//txm_module_manager_in_place_load(&my_module2, "my module2", (VOID *) module_code);
-
+
/* Enable shared memory regions for one module. */
//txm_module_manager_external_memory_enable(&my_module2, (void*)0x90000000, 0x010000, 0x3F);
-
+
/* Start the modules. */
txm_module_manager_start(&my_module1);
//txm_module_manager_start(&my_module2);
-
+
/* Sleep for a while and let the modules run.... */
tx_thread_sleep(50);
-
+
/* Thread 0 in module1 should be terminated due to violating the MMU. */
-
+
/* Stop the modules. */
txm_module_manager_stop(&my_module1);
txm_module_manager_stop(&my_module2);
-
+
/* Unload the modules. */
txm_module_manager_unload(&my_module1);
txm_module_manager_unload(&my_module2);
-
+
/* Reload the modules. */
txm_module_manager_in_place_load(&my_module2, "my module2", (VOID *) module_code);
txm_module_manager_in_place_load(&my_module1, "my module1", (VOID *) module_code);
-
+
/* Give both modules shared memory. */
txm_module_manager_external_memory_enable(&my_module2, (void*)0x90000000, 0x010000, 0x3F);
txm_module_manager_external_memory_enable(&my_module1, (void*)0x90000000, 0x010000, 0x3F);
@@ -118,7 +118,7 @@ void module_manager_entry(ULONG thread_input)
/* Start the module again. */
txm_module_manager_start(&my_module2);
txm_module_manager_start(&my_module1);
-
+
/* Now just spin... */
while(1)
{
diff --git a/ports_module/cortex_a7/ac5/example_build/scatter.scat b/ports_module/cortex_a7/ac5/example_build/scatter.scat
index a9e2d1d8..d30f6109 100644
--- a/ports_module/cortex_a7/ac5/example_build/scatter.scat
+++ b/ports_module/cortex_a7/ac5/example_build/scatter.scat
@@ -6,7 +6,7 @@
; Using a scatter-file with ARM_LIB_STACKHEAP eliminates the need to set stack-limit or heap-base in the debugger.
-SDRAM 0x80000000
+SDRAM 0x80000000
{
VECTORS +0
{
diff --git a/ports_module/cortex_a7/ac5/example_build/tx_initialize_low_level.s b/ports_module/cortex_a7/ac5/example_build/tx_initialize_low_level.s
index d9150dff..9bdd7ba4 100644
--- a/ports_module/cortex_a7/ac5/example_build/tx_initialize_low_level.s
+++ b/ports_module/cortex_a7/ac5/example_build/tx_initialize_low_level.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Initialize */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Initialize */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -109,45 +109,39 @@ Reset_Vector
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, 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 */
+;/* DESCRIPTION */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* 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 */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -335,7 +329,7 @@ GIC1_DIST_INTERFACE_BASE EQU 0x2C001000
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -375,7 +369,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -383,15 +377,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
-
+
; clear timer interrupt
ldr r0, =0x1C110000
eor r1, r1, r1
@@ -399,11 +393,11 @@ __tx_irq_processing_return
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -413,7 +407,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -429,28 +423,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -459,7 +453,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -481,11 +475,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
@@ -509,43 +503,43 @@ __tx_fiq_handler
B __tx_fiq_handler ; FIQ interrupt handler
ENDIF
-
-
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* __tx_prefetch_handler & __tx_abort_handler Cortex-A7/MMU/AC5 */
+
+
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* __tx_prefetch_handler & __tx_abort_handler Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function handles MMU exceptions and fills the */
-;/* _txm_module_manager_memory_fault_info struct. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _txm_module_manager_memory_fault_handler */
-;/* _tx_execution_thread_exit */
-;/* _tx_thread_schedule */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* MMU exceptions */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function handles MMU exceptions and fills the */
+;/* _txm_module_manager_memory_fault_info struct. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _txm_module_manager_memory_fault_handler */
+;/* _tx_execution_thread_exit */
+;/* _tx_thread_schedule */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* MMU exceptions */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 Scott Larson Initial Version 6.1 */
@@ -561,7 +555,7 @@ __tx_fiq_handler
EXTERN _txm_module_manager_memory_fault_handler
EXTERN _tx_execution_thread_exit
EXTERN _tx_thread_schedule
-
+
EXPORT __tx_prefetch_handler
EXPORT __tx_abort_handler
__tx_prefetch_handler
@@ -589,7 +583,7 @@ __tx_abort_handler
STR r0, [r3, #16] ; Save IFAR
MRC p15, 0, r0, c5, c0, 1 ; Read IFSR
STR r0, [r3, #20] ; Save IFSR
-
+
; Save registers r0-r12
POP {r0-r2}
STR r0, [r3, #28] ; Save r0
@@ -606,7 +600,7 @@ __tx_abort_handler
STR r10,[r3, #68] ; Save r10
STR r11,[r3, #72] ; Save r11
STR r12,[r3, #76] ; Save r12
-
+
CPS #SYS_MODE ; Enter SYS mode
MOV r0, lr ; Pickup lr
MOV r1, sp ; Pickup sp
@@ -618,7 +612,7 @@ __tx_abort_handler
ORR r0, r0, #SYS_MODE ; Return into SYS mode
BIC r0, r0, #THUMB_MASK ; Clear THUMB mode
MSR SPSR_c, r0 ; Save SPSR
-
+
; Call memory manager fault handler
BL _txm_module_manager_memory_fault_handler
@@ -633,11 +627,11 @@ __tx_abort_handler
LDR r1, [r0] ; Pickup system state
SUB r1, r1, #1 ; Decrement
STR r1, [r0] ; Store new system state
-
+
MOV r1, #0 ; Build NULL value
LDR r0, =_tx_thread_current_ptr ; Pickup address of current thread pointer
STR r1, [r0] ; Clear current thread pointer
-
+
; Return from exception
LDR lr, =_tx_thread_schedule ; Load scheduler address
MOVS pc, lr ; Return to scheduler
diff --git a/ports_module/cortex_a7/ac5/example_build/txm_module_preamble.s b/ports_module/cortex_a7/ac5/example_build/txm_module_preamble.s
index 168dad31..953a1d62 100644
--- a/ports_module/cortex_a7/ac5/example_build/txm_module_preamble.s
+++ b/ports_module/cortex_a7/ac5/example_build/txm_module_preamble.s
@@ -34,7 +34,7 @@ __txm_module_preamble
; 1 -> User mode execution (MMU protection)
DCD _txm_module_thread_shell_entry - . + . ; Module Shell Entry Point
DCD demo_module_start - . + . ; Module Start Thread Entry Point
- DCD 0 ; Module Stop Thread Entry Point
+ DCD 0 ; Module Stop Thread Entry Point
DCD 1 ; Module Start/Stop Thread Priority
DCD 2046 ; Module Start/Stop Thread Stack Size
DCD _txm_module_callback_request_thread_entry - . + . ; Module Callback Thread Entry
diff --git a/ports_module/cortex_a7/ac5/inc/tx_port.h b/ports_module/cortex_a7/ac5/inc/tx_port.h
index 1d507b66..fd061c95 100644
--- a/ports_module/cortex_a7/ac5/inc/tx_port.h
+++ b/ports_module/cortex_a7/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A7/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A7/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include <string.h>
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,11 +178,11 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
VOID *tx_thread_module_instance_ptr; \
VOID *tx_thread_module_entry_info_ptr; \
@@ -204,7 +196,7 @@ typedef unsigned short USHORT;
VOID *tx_thread_module_stack_end; \
ULONG tx_thread_module_stack_size; \
VOID *tx_thread_module_reserved;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -224,11 +216,11 @@ typedef unsigned short USHORT;
VOID (*tx_timer_module_expiration_function)(ULONG id);
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -236,8 +228,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -264,21 +256,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
-
+
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -298,7 +290,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -307,7 +299,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -343,8 +335,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A7/AC5 Version 6.4.2 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A7/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_module/cortex_a7/ac5/inc/txm_module_port.h b/ports_module/cortex_a7/ac5/inc/txm_module_port.h
index 2f930ec9..1102a377 100644
--- a/ports_module/cortex_a7/ac5/inc/txm_module_port.h
+++ b/ports_module/cortex_a7/ac5/inc/txm_module_port.h
@@ -1,52 +1,47 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Interface (API) */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Interface (API) */
+/** */
+/**************************************************************************/
+/**************************************************************************/
-/**************************************************************************/
-/* */
-/* APPLICATION INTERFACE DEFINITION RELEASE */
-/* */
-/* txm_module_port.h Cortex-A7/MMU/AC5 */
+/**************************************************************************/
+/* */
+/* APPLICATION INTERFACE DEFINITION RELEASE */
+/* */
+/* txm_module_port.h Cortex-A7/MMU/AC5 */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This file defines the basic module constants, interface structures, */
-/* and function prototypes. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* This file defines the basic module constants, interface structures, */
+/* and function prototypes. */
/* */
/**************************************************************************/
#ifndef TXM_MODULE_PORT_H
#define TXM_MODULE_PORT_H
-/* It is assumed that the base ThreadX tx_port.h file has been modified to add the
+/* It is assumed that the base ThreadX tx_port.h file has been modified to add the
following extensions to the ThreadX thread control block (this code should replace
the corresponding macro define in tx_port.h):
@@ -86,10 +81,10 @@ The following extensions must also be defined in tx_port.h:
#endif
/* Defined, this option enables the MMU hardware and requires memory protected
- module objects to be allocated from the module manager object pool.
- If this is undefined, module objects can be created in the module's data area
- or in the module manager object pool. If this is not defined (MMU hardware
- is disabled), a module requiring memory protection will not run (the load
+ module objects to be allocated from the module manager object pool.
+ If this is undefined, module objects can be created in the module's data area
+ or in the module manager object pool. If this is not defined (MMU hardware
+ is disabled), a module requiring memory protection will not run (the load
functions will return a TXM_MODULE_INVALID_PROPERTIES error).
Default setting for this value is defined. */
#define TXM_MODULE_MEMORY_PROTECTION_ENABLED
@@ -296,7 +291,7 @@ typedef struct TXM_MODULE_MANAGER_MEMORY_FAULT_INFO_STRUCT
TXM_MODULE_MANAGER_MEMORY_FAULT_INFO _txm_module_manager_memory_fault_info;
/* Define the macro to check the stack available in dispatch. */
-#define TXM_MODULE_MANAGER_CHECK_STACK_AVAILABLE
+#define TXM_MODULE_MANAGER_CHECK_STACK_AVAILABLE
/* Define the macro to check the code alignment. */
@@ -406,7 +401,7 @@ UINT _txm_module_manager_inside_data_check(ULONG pointer);
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-A7/MMU/AC5 Version 6.4.2 *";
+ "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-A7/MMU/AC5 Version 6.5.0.202601 *";
#endif
diff --git a/ports_module/cortex_a7/ac5/module_lib/src/txm_module_initialize.s b/ports_module/cortex_a7/ac5/module_lib/src/txm_module_initialize.s
index cb838377..1aff12b8 100644
--- a/ports_module/cortex_a7/ac5/module_lib/src/txm_module_initialize.s
+++ b/ports_module/cortex_a7/ac5/module_lib/src/txm_module_initialize.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Module */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Module */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -31,43 +31,37 @@
;
;
IMPORT __scatterload
-
+
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _txm_module_initialize Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _txm_module_initialize Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function initializes the module c runtime. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* __scatterload Initialize C runtime */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _txm_module_thread_shell_entry Start module thread */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function initializes the module c runtime. */
+;/* */
+;/* INPUT */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* __scatterload Initialize C runtime */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _txm_module_thread_shell_entry Start module thread */
;/* */
;/**************************************************************************/
;VOID _txm_module_initialize(VOID)
@@ -75,16 +69,16 @@
EXPORT _txm_module_initialize
_txm_module_initialize
PUSH {r4-r12,lr} ; Save dregs and LR
-
+
B __scatterload ; Call ARM func to initialize variables
;/* Override __rt_exit function. */
EXPORT __rt_exit
__rt_exit
-
+
POP {r4-r12,lr} ; Restore dregs and LR
BX lr ; Return to caller
;}
-
+
END
diff --git a/ports_module/cortex_a7/ac5/module_lib/src/txm_module_thread_shell_entry.c b/ports_module/cortex_a7/ac5/module_lib/src/txm_module_thread_shell_entry.c
index f04a1808..4925fe47 100644
--- a/ports_module/cortex_a7/ac5/module_lib/src/txm_module_thread_shell_entry.c
+++ b/ports_module/cortex_a7/ac5/module_lib/src/txm_module_thread_shell_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -87,12 +88,6 @@ VOID __user_setup_stackheap(VOID){return;}
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_ENTRY_INFO *thread_info)
{
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_restore.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_restore.s
index 92a2311a..515f2820 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_restore.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_restore.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -56,44 +56,38 @@ DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, 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 */
+;/* 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 */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -123,13 +117,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -189,10 +183,10 @@ __tx_thread_preempt_restore
LDMIA sp!, {r0-r3} ; Recover r0-r3
CPS #SYS_MODE ; Enter SYS mode
STMDB sp!, {r0-r3} ; Save r0-r3 on thread's stack
-
+
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
IF {TARGET_FPU_VFP} = {TRUE}
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -203,7 +197,7 @@ __tx_thread_preempt_restore
VSTMDB sp!, {D0-D15} ; Save D0-D15
_tx_skip_irq_vfp_save
ENDIF
-
+
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_save.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_save.s
index 3993d9f0..7c7be45c 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_context_save.s
+++ b/ports_module/cortex_a7/ac5/module_manager/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 */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A7/AC5 */
;/* 6.1 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* 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)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -108,7 +102,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -124,7 +118,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -138,13 +132,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -164,7 +158,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -174,7 +168,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -189,7 +183,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_restore.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_restore.s
index 44233091..0258ead2 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_restore.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_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 */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when 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 */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when 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 */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -163,7 +157,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -208,7 +202,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -220,7 +214,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_save.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_save.s
index eb969c1d..7be8a46f 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_context_save.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_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 */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A7/AC5 */
;/* 6.1 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* 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_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_end.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_end.s
index 9062160c..8b2fc70b 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_end.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_end.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 */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_start.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_start.s
index a1456bd1..a94ff890 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_start.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_fiq_nesting_start.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 */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_control.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_control.s
index 0d422e49..c9d95a58 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_control.s
+++ b/ports_module/cortex_a7/ac5/module_manager/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 */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A7/AC5 */
;/* 6.1 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* 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)
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_disable.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_disable.s
index 5653faf4..de174cb1 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_disable.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_disable.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 */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_restore.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_restore.s
index e9f15cc6..c2c32842 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_restore.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_interrupt_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 */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_end.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_end.s
index f458cb21..73a88636 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_end.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_end.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 */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_start.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_start.s
index 2f1814f8..d4c1ca06 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_start.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_irq_nesting_start.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 */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_schedule.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_schedule.s
index be7a2ca7..994c6964 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_schedule.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_schedule.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -36,7 +36,7 @@
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
IMPORT _tx_execution_thread_enter
ENDIF
-
+
IRQ_MODE EQU 0xD2 ; IRQ mode
USR_MODE EQU 0x10 ; USR mode
SVC_MODE EQU 0x13 ; SVC mode
@@ -48,7 +48,7 @@ ENABLE_INTS EQU 0xC0 ; IRQ & FIQ Interrupts enabled mask
ENABLE_INTS EQU 0x80 ; IRQ Interrupts enabled mask
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
THUMB_MASK EQU 0x20 ; Thumb bit mask
IMPORT _txm_system_mode_enter
@@ -58,52 +58,46 @@ THUMB_MASK EQU 0x20 ; Thumb bit mask
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, 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 */
-;/* */
-;/* None */
-;/* */
-;/* 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 */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* 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. */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* 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)
;{
EXPORT _tx_thread_schedule
_tx_thread_schedule
-
+
; Enter the scheduler.
SVC 0
@@ -138,7 +132,7 @@ __tx_swi_interrupt
;
; The service call is handled here
;
-
+
CMP r0, #0 ; Is it a schedule request?
BEQ _tx_handler_svc_schedule ; Yes, go there
@@ -147,7 +141,7 @@ __tx_swi_interrupt
CMP r0, #2 ; Is it a system mode exit request?
BEQ _tx_handler_svc_super_exit ; Yes, go there
-
+
LDR r2, =0x123456
CMP r0, r2 ; Is it an ARM request?
BEQ _tx_handler_svc_arm ; Yes, go there
@@ -161,14 +155,14 @@ _tx_handler_svc_unrecognized
_tx_handler_svc_unrecognized_loop ; We should never get here
B _tx_handler_svc_unrecognized_loop
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SVC 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; At this point we have an SVC 1, which means we are entering the system mode to service a kernel call
_tx_handler_svc_super_enter
; Make sure that we have been called from the system mode enter location (security)
- LDR r2, =_txm_system_mode_enter ; Load the address of the known call point
+ LDR r2, =_txm_system_mode_enter ; Load the address of the known call point
SUB r1, lr, #4 ; Calculate the address of the actual call
CMP r1, r2 ; Did we come from txm_module_manager_user_mode_entry?
BNE _tx_handler_svc_unrecognized ; Return to where we came
@@ -178,7 +172,7 @@ _tx_handler_svc_super_enter
LDR r2, [r1] ; Load current thread location from the pointer (pointer indirection)
MOV r1, #0 ; Load the new user mode flag value (user mode flag clear -> not user mode -> system)
STR r1, [r2, #0x9C] ; Clear tx_thread_module_current_user_mode for thread
-
+
; Now we enter the system mode and return
LDMFD sp!, {r0, r3} ; Get spsr from the stack
BIC r0, r0, #MODE_MASK ; clear mode field
@@ -198,16 +192,16 @@ _tx_handler_svc_super_enter
LDRD r0, r1, [r2, #0xA4] ; Load the module kernel stack start and end
STRD r0, r1, [r2, #0x0C] ; Set stack start and end
ENDIF
-
+
LDMFD sp!, {r0-r3, r12, pc}^ ; Restore the registers and return
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SVC 2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; At this point we have an SVC 2, which means we are exiting the system mode after servicing a kernel call
_tx_handler_svc_super_exit
; Make sure that we have been called from the system mode exit location (security)
- LDR r2, =_txm_system_mode_exit ; Load the address of the known call point
+ LDR r2, =_txm_system_mode_exit ; Load the address of the known call point
SUB r1, lr, #4 ; Calculate the address of the actual call
CMP r1, r2 ; Did we come from txm_module_manager_user_mode_entry?
BNE _tx_handler_svc_unrecognized ; Return to where we came
@@ -237,19 +231,19 @@ _tx_handler_svc_super_exit
STRD r0, r1, [r2, #0x0C] ; Set stack start and end
ENDIF
LDMFD sp!, {r0-r3, r12, pc}^ ; Restore the registers and return
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ARM Semihosting
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
_tx_handler_svc_arm
-
+
; *** TODO: handle semihosting requests or ARM angel requests ***
-
+
; just return
LDMFD sp!, {r0, r3} ; Get spsr from the stack
MSR SPSR_cxsf, r0 ; Restore the spsr
LDMFD sp!, {r0-r3, r12, pc}^ ; Restore the registers and return
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SVC 0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -258,10 +252,10 @@ _tx_handler_svc_schedule
LDMFD sp!, {r0, r3} ; Get spsr from stack
MSR SPSR_cxsf, r0 ; Restore spsr
- LDMFD sp!, {r0-r3, r12, lr} ; Restore the registers
+ LDMFD sp!, {r0-r3, r12, lr} ; Restore the registers
- ; This code waits for a thread control block pointer to appear in
- ; the _tx_thread_execute_ptr variable. Once a thread pointer appears
+ ; This code 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.
;
; /* Enable interrupts. */
@@ -317,7 +311,7 @@ __tx_thread_schedule_loop
; Determine if an interrupt frame or a synchronous task suspension frame is present.
CPS #SYS_MODE ; Enter SYS mode
- LDR sp, [r0, #8] ; Switch to thread stack pointer
+ LDR sp, [r0, #8] ; Switch to thread stack pointer
LDMIA sp!, {r4, r5} ; Pickup the stack type and saved CPSR
CPS #SVC_MODE ; Enter SVC mode
@@ -347,7 +341,7 @@ __tx_thread_schedule_loop
MOV r3, #14
ADD r1, r1, r2, LSL r3
MCR p15, 0, r1, c2, c0, 0 ; Change TTBR to new value
-
+
; refresh TLB
MOV r2, #0
DSB
@@ -356,21 +350,21 @@ __tx_thread_schedule_loop
MCR p15, 0, r2, c7, c5, 6 ; Invalidate branch predictor
DSB
ISB
-
+
;test address translation
;mcr p15, 0, r0, c7, c8, 0
-
+
_tx_skip_mmu_update
; **************************************************************************
-
+
CMP r4, #0 ; Check for synchronous context switch
BEQ _tx_solicited_return
-
+
MSR SPSR_cxsf, r5 ; Setup SPSR for return
LDR r1, [r0, #8] ; Get thread SP
LDR lr, [r1, #0x40] ; Get thread PC
CPS #SYS_MODE ; Enter SYS mode
-
+
IF {TARGET_FPU_VFP} = {TRUE}
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -384,7 +378,7 @@ _tx_skip_mmu_update
CPS #SYS_MODE ; Enter SYS mode
_tx_skip_interrupt_vfp_restore
ENDIF
-
+
LDMIA sp!, {r0-r12, lr} ; Restore registers
ADD sp, sp, #4 ; Fix stack pointer
CPS #SVC_MODE ; Enter SVC mode
@@ -393,7 +387,7 @@ _tx_skip_interrupt_vfp_restore
_tx_solicited_return
MOV r2, r5 ; Move CPSR to scratch register
CPS #SYS_MODE ; Enter SYS mode
-
+
IF {TARGET_FPU_VFP} = {TRUE}
LDR r1, [r0, #144] ; Pickup the VFP enabled flag
CMP r1, #0 ; Is the VFP enabled?
@@ -404,12 +398,12 @@ _tx_solicited_return
VMSR FPSCR, r4 ; Restore FPSCR
_tx_skip_solicited_vfp_restore
ENDIF
-
+
LDMIA sp!, {r4-r11, lr} ; Restore registers
MOV r1, lr ; Copy lr to r1 to preserve across mode change
CPS #SVC_MODE ; Enter SVC mode
MSR SPSR_cxsf, r2 ; Recover CPSR
- MOV lr, r1 ; Deprecated return via r1, so copy r1 to lr and return via lr
+ MOV lr, r1 ; Deprecated return via r1, so copy r1 to lr and return via lr
SUBS pc, lr, #0 ; Return to thread synchronously
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_stack_build.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_stack_build.s
index 03e24ca7..b85d1b77 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_stack_build.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_stack_build.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -42,44 +42,38 @@ THUMB_MASK EQU 0x20 ; Thumb bit (5) of CPSR/SPSR
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function builds a stack frame on the supplied thread's stack. */
-;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
-;/* thread_ptr Pointer to thread control blk */
-;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function builds a stack frame on the supplied thread's stack. */
+;/* The stack frame results in a fake interrupt return to the supplied */
+;/* function pointer. */
+;/* */
+;/* INPUT */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* thread_ptr Pointer to thread control blk */
+;/* function_ptr Pointer to return function */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -87,10 +81,10 @@ THUMB_MASK EQU 0x20 ; Thumb bit (5) of CPSR/SPSR
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A7 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_system_return.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_system_return.s
index 01e93435..cfaf4f84 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_system_return.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_system_return.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,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -104,7 +98,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
IF :DEF:TX_ENABLE_FIQ_SUPPORT
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_vectored_context_save.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_vectored_context_save.s
index 1e9a2f82..d52a9776 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_vectored_context_save.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_thread_vectored_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 */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A7/AC5 */
;/* 6.1 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* 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_vectored_context_save(VOID)
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/tx_timer_interrupt.s b/ports_module/cortex_a7/ac5/module_manager/src/tx_timer_interrupt.s
index ce94e6e0..0a2a68f6 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/tx_timer_interrupt.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/tx_timer_interrupt.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 */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_alignment_adjust.c b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_alignment_adjust.c
index 3f32067d..dda03dfc 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_alignment_adjust.c
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_alignment_adjust.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -25,45 +26,39 @@
#include "txm_module.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_alignment_adjust Cortex-A7/MMU/AC5 */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_alignment_adjust Cortex-A7/MMU/AC5 */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function adjusts the alignment and size of the code and data */
-/* section for a given module implementation. */
-/* */
-/* INPUT */
-/* */
-/* code_size Size of the code area (updated) */
-/* code_alignment Code area alignment (updated) */
-/* data_size Size of data area (updated) */
-/* data_alignment Data area alignment (updated) */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Initial thread stack frame */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function adjusts the alignment and size of the code and data */
+/* section for a given module implementation. */
+/* */
+/* INPUT */
+/* */
+/* code_size Size of the code area (updated) */
+/* code_alignment Code area alignment (updated) */
+/* data_size Size of data area (updated) */
+/* data_alignment Data area alignment (updated) */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* Initial thread stack frame */
/* */
/**************************************************************************/
VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble, ULONG *code_size, ULONG *code_alignment, ULONG *data_size, ULONG *data_alignment)
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_external_memory_enable.c b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_external_memory_enable.c
index f19534dd..4aa1b941 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_external_memory_enable.c
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_external_memory_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -64,12 +65,6 @@ extern ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_EN
/* */
/* _txm_module_manager_external_memory_enable */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
ULONG _txm_level2_page_get(TXM_MODULE_INSTANCE *module_instance, ULONG *page_addr)
{
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_handler.c b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_handler.c
index f5a8b293..00bb9075 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_handler.c
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_handler.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -71,12 +72,6 @@ TXM_MODULE_MANAGER_FAULT_INFO
/* */
/* Fault handler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_memory_fault_handler(VOID)
{
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_notify.c b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_notify.c
index 1cd9f082..cd0535ae 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_notify.c
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_memory_fault_notify.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -33,51 +34,45 @@ extern VOID (*_txm_module_manager_fault_notify)(TX_THREAD *, TXM_MODULE_INSTA
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_memory_fault_notify Cortex-A7/MMU/AC5 */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_memory_fault_notify Cortex-A7/MMU/AC5 */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function registers an application callback when/if a memory */
-/* fault occurs. The supplied thread is automatically terminated, but */
-/* any other threads in the same module may still execute. */
-/* */
-/* INPUT */
-/* */
-/* notify_function Memory fault notification */
-/* function, NULL disables. */
-/* */
-/* OUTPUT */
-/* */
-/* Status */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function registers an application callback when/if a memory */
+/* fault occurs. The supplied thread is automatically terminated, but */
+/* any other threads in the same module may still execute. */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* INPUT */
+/* */
+/* notify_function Memory fault notification */
+/* function, NULL disables. */
+/* */
+/* OUTPUT */
+/* */
+/* Status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
UINT _txm_module_manager_memory_fault_notify(VOID (*notify_function)(TX_THREAD *, TXM_MODULE_INSTANCE *))
{
/* Setup notification function. */
_txm_module_manager_fault_notify = notify_function;
-
+
/* Return success. */
return(TX_SUCCESS);
}
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_initialize.c b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_initialize.c
index be7288d1..aa8244cf 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_initialize.c
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_initialize.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -51,48 +52,42 @@ TXM_MODULE_INSTANCE *_txm_asid_table[TXM_ASID_TABLE_LENGTH];
__align(16384) ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_ENTRIES];
/* Module start and end level 2 page tables, 2^10 (1kB) alignment.
- * First set of 4 tables are the master level 2 tables, the rest are for each module.
+ * First set of 4 tables are the master level 2 tables, the rest are for each module.
* Each module needs two L2 tables for code and two L2 tables for data. */
__align(1024) ULONG _txm_level2_module_page_table[TXM_MAXIMUM_MODULES * 4][TXM_LEVEL_2_PAGE_TABLE_ENTRIES];
/* Module external memory level 2 page tables, 2^10 (1kB) alignment. */
__align(1024) ULONG _txm_level2_external_page_pool[TXM_LEVEL2_EXTERNAL_POOL_PAGES][TXM_LEVEL_2_PAGE_TABLE_ENTRIES];
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_mm_initialize Cortex-A7/MMU/AC5 */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_mm_initialize Cortex-A7/MMU/AC5 */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function performs the initial set up of the the A7 MMU. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* Completion Status */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function performs the initial set up of the the A7 MMU. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
/* */
/**************************************************************************/
UINT _txm_module_manager_mm_initialize(VOID)
@@ -103,53 +98,53 @@ UINT _txm_module_manager_mm_initialize(VOID)
ULONG cp15reg;
UINT user_mode_index;
UINT counter_limit;
-
+
/* Clear ASID table. */
for (i = 0; i < TXM_ASID_TABLE_LENGTH; i++)
{
_txm_asid_table[i] = 0;
}
_txm_asid_table[0] = (TXM_MODULE_INSTANCE *)TXM_ASID_RESERVED;
-
-
+
+
/********************************************************************************/
/* This is an example showing how to set up the cache attributes. */
/********************************************************************************/
/*******************************************************************************
-* PAGE TABLE generation
-* Generate the page tables
-* Build a flat translation table for the whole address space.
-* ie: Create 4096 1MB sections from 0x000xxxxx to 0xFFFxxxxx
+* PAGE TABLE generation
+* Generate the page tables
+* Build a flat translation table for the whole address space.
+* ie: Create 4096 1MB sections from 0x000xxxxx to 0xFFFxxxxx
* 31 20|19 18|17|16| 15|14 12|11 10|9|8 5|4 |3 2|1 0|
* |base address | 0 0|nG| S|AP2|TEX |AP |P|Domain|XN|CB |1 0|
*
-* Bits[31:20] - Top 12 bits of VA is pointer into table
+* Bits[31:20] - Top 12 bits of VA is pointer into table
* nG[17]=0 - Non global, enables matching against ASID in the TLB when set.
* S[16]=0 - Indicates normal memory is shared when set.
-* AP2[15]=0
+* AP2[15]=0
* TEX[14:12]=000
-* AP[11:10]=11 - Configure for full read/write access in all modes
+* AP[11:10]=11 - Configure for full read/write access in all modes
* IMPP[9]=0 - Ignored
* Domain[5:8]=1111 - Set all pages to use domain 15
* XN[4]=0 - Execute never disabled
-* CB[3:2]= 00 - Set attributes to Strongly-ordered memory.
-* (except for the descriptor where code segment is based,
-* see below)
-* Bits[1:0]=10 - Indicate entry is a 1MB section
+* CB[3:2]= 00 - Set attributes to Strongly-ordered memory.
+* (except for the descriptor where code segment is based,
+* see below)
+* Bits[1:0]=10 - Indicate entry is a 1MB section
*******************************************************************************/
/* ---- Parameter setting to level1 descriptor (bits 19:0) ---- */
-/* setting for Strongly-ordered memory
+/* setting for Strongly-ordered memory
B-00000000000000000000010111100010 */
#define TTB_PARA_STRGLY 0x05E2
-/* setting for Outer and inner not cache normal memory
+/* setting for Outer and inner not cache normal memory
B-00000000000000000001010111100010 */
#define TTB_PARA_NORMAL_NOT_CACHE 0x15E2
-/* setting for Outer and inner write back, write allocate normal memory
- (Cacheable)
+/* setting for Outer and inner write back, write allocate normal memory
+ (Cacheable)
B-00000000000000000001010111101110 */
#define TTB_PARA_NORMAL_CACHE 0x15EE //0x15EE
@@ -167,98 +162,98 @@ UINT _txm_module_manager_mm_initialize(VOID)
#define M_SIZE_RAM_M 10 /* [Area10] Internal RAM (mirror) */
#define M_SIZE_IO_2 2550 /* [Area11] I/O area 2 */
/* Should add to: 4096 */
-
+
counter_limit = M_SIZE_NOR;
for (i = 0; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_SDRAM;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_CS45;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_SPI;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_RAM;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_IO_1;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_NOR_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_SDRAM_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_CS45_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_SPI_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_RAM_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_IO_2;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
/********************************************************************************/
/* This is the end of the example showing how to set up the cache attributes. */
/********************************************************************************/
-
-
+
+
/* Clear ASID. */
cp15reg = 0;
__asm("mcr p15, 0, cp15reg, c13, c0, 1");
__asm("isb");
-
+
/* Put the page table address in TTBR. */
cp15reg = (int)(VOID*)_txm_ttbr1_page_table;
cp15reg |= TTBR0_ATTRIBUTES;
__asm("mcr p15, 0, cp15reg, c2, c0, 0");
-
+
/* Set the domain to client mode. */
cp15reg = DACR_CLIENT_MODE;
__asm("mcr p15, 0, cp15reg, c3, c0, 0");
-
+
/* Level 2 small page attributes: normal memory, cache & buffer enabled, priviledged access. */
#define TTB_LEVEL2_NORMAL_CACHE 0x05E
@@ -268,7 +263,7 @@ UINT _txm_module_manager_mm_initialize(VOID)
/* Attributes for user mode table entry in level 2 table. */
#define TTB_LEVEL2_USER_MODE_ENTRY 0x06E
-
+
/* Set up Level 2 table for user to kernel mode entry trampoline. */
/* Find which table entry _txm_module_manager_user_mode_entry is in. */
user_mode_index = (ULONG)_txm_module_manager_user_mode_entry >> TXM_MMU_LEVEL1_PAGE_SHIFT;
@@ -277,21 +272,21 @@ UINT _txm_module_manager_mm_initialize(VOID)
{
_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = ((ULONG)_txm_module_manager_user_mode_entry & TXM_MMU_LEVEL1_MASK) | (i << TXM_MMU_LEVEL2_PAGE_SHIFT) | TTB_LEVEL2_NORMAL_CACHE;
}
-
+
/* Enter Level 2 table in to master table. */
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] = ((ULONG)_txm_level2_module_page_table & TXM_MMU_LEVEL1_SECOND_MASK) | TXM_MMU_LEVEL1_SECOND_ATTRIBUTES;
-
+
/* Find level 2 entry that holds _txm_module_manager_user_mode_entry. */
user_mode_index = ((ULONG)_txm_module_manager_user_mode_entry & ~TXM_MMU_LEVEL1_MASK) >> TXM_MMU_LEVEL2_PAGE_SHIFT;
-
+
/* Set attribute bits for the user mode entry page. */
_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] = (_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] & TTB_LEVEL2_AP_CLEAR_MASK) | TTB_LEVEL2_USER_MODE_ENTRY;
-
+
/* Enable the MMU. */
__asm("mrc p15, 0, cp15reg, c1, c0, 0");
cp15reg |= 0x1;
__asm("mcr p15, 0, cp15reg, c1, c0, 0");
-
+
return(TX_SUCCESS);
#else
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c
index 4c5d7a09..bdaa548d 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -61,12 +62,6 @@ extern ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_EN
/* */
/* TXM_MODULE_MANAGER_DATA_POINTER_CHECK */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_inside_data_check(ULONG pointer)
{
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_thread_stack_build.s b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_thread_stack_build.s
index 675b1db6..5ae43a7e 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_thread_stack_build.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_thread_stack_build.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Module Manager */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Module Manager */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -40,44 +40,38 @@ CPSR_MASK EQU 0x9F ; Mask initial CPSR, IRQ ints en
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _txm_module_manager_thread_stack_build Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _txm_module_manager_thread_stack_build Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function builds a stack frame on the supplied thread's stack. */
-;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
-;/* thread_ptr Pointer to thread control blk */
-;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function builds a stack frame on the supplied thread's stack. */
+;/* The stack frame results in a fake interrupt return to the supplied */
+;/* function pointer. */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* thread_ptr Pointer to thread control blk */
+;/* function_ptr Pointer to return function */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _txm_module_manager_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(TX_THREAD *, TXM_MODULE_INSTANCE *))
@@ -88,7 +82,7 @@ _txm_module_manager_thread_stack_build
;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A7 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; r0 Initial value for r0
diff --git a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_user_mode_entry.s b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_user_mode_entry.s
index 58da85b9..758c4125 100644
--- a/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_user_mode_entry.s
+++ b/ports_module/cortex_a7/ac5/module_manager/src/txm_module_manager_user_mode_entry.s
@@ -1,66 +1,60 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Module Manager */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Module Manager */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
IMPORT _tx_thread_current_ptr
IMPORT _txm_module_manager_kernel_dispatch
-
-
+
+
AREA ||.text||, CODE, READONLY, ALIGN=12
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _txm_module_manager_user_mode_entry Cortex-A7/MMU/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _txm_module_manager_user_mode_entry Cortex-A7/MMU/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function allows modules to enter kernel mode. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* SVC 1 Enter kernel mode */
-;/* SVC 2 Exit kernel mode */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Modules in user mode */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function allows modules to enter kernel mode. */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* SVC 1 Enter kernel mode */
+;/* SVC 2 Exit kernel mode */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Modules in user mode */
;/* */
;/**************************************************************************/
EXPORT _txm_module_manager_user_mode_entry
@@ -83,9 +77,9 @@ _txm_system_mode_exit
BX lr ; Return to the caller
NOP
NOP
-
+
; Fill up 4kB page.
ALIGN 4096
_txm_module_manager_user_mode_end
-
+
END
diff --git a/ports_module/cortex_a7/gnu/example_build/build_threadx_module_sample.bat b/ports_module/cortex_a7/gnu/example_build/build_threadx_module_sample.bat
index 8e6f8286..f0214cfc 100644
--- a/ports_module/cortex_a7/gnu/example_build/build_threadx_module_sample.bat
+++ b/ports_module/cortex_a7/gnu/example_build/build_threadx_module_sample.bat
@@ -3,4 +3,4 @@ arm-none-eabi-gcc -c -g -O0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -m
arm-none-eabi-gcc -c -g -O0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -marm -mthumb-interwork -DTX_ENABLE_VFP_SUPPORT -fpic -fno-plt -mno-pic-data-is-text-relative -msingle-pic-base -I../inc -I../../../../common/inc -I../../../../common_modules/inc -I../../../../common_modules/module_manager/inc sample_threadx_module.c
rem arm-none-eabi-gcc -g --elf --ro 0 --first txm_module_preamble.o(Init) --entry=_txm_module_thread_shell_entry --ropi --rwpi --remove --map --symbols --list sample_threadx_module.map txm_module_preamble.o sample_threadx_module.o txm.a
rem arm-none-eabi-gcc -g -mcpu=cortex-a7 -T sample_threadx_module.ld -mfloat-abi=hard -mfpu=neon-vfpv4 -marm -mthumb-interwork --specs=nosys.specs -e _txm_module_thread_shell_entry -o sample_threadx_module.out -Wl,-Map=sample_threadx_module.map gcc_setup.o txm_module_preamble.o sample_threadx_module.o txm.a
-arm-none-eabi-ld -A cortex-a7 -T sample_threadx_module.ld txm_module_preamble.o gcc_setup.o sample_threadx_module.o -e _txm_module_thread_shell_entry txm.a -o sample_threadx_module.axf -M > sample_threadx_module.map \ No newline at end of file
+arm-none-eabi-ld -A cortex-a7 -T sample_threadx_module.ld txm_module_preamble.o gcc_setup.o sample_threadx_module.o -e _txm_module_thread_shell_entry txm.a -o sample_threadx_module.axf -M > sample_threadx_module.map \ No newline at end of file
diff --git a/ports_module/cortex_a7/gnu/example_build/gcc_setup.S b/ports_module/cortex_a7/gnu/example_build/gcc_setup.S
index 22a41727..d0eaeb79 100644
--- a/ports_module/cortex_a7/gnu/example_build/gcc_setup.S
+++ b/ports_module/cortex_a7/gnu/example_build/gcc_setup.S
@@ -22,7 +22,7 @@ _gcc_setup:
mov r5,r0
/* Copy GOT table. */
-
+
ldr r0, =__got_load_start__
sub r0,r0,r3
add r0,r0,r5
@@ -50,13 +50,13 @@ flash_area:
address_built:
str r6, [r1] // Store in new GOT table
add r0, r0, #4 // Move to next entry
- add r1, r1, #4 //
+ add r1, r1, #4 //
b new_got_setup // Continue at the top of the loop
got_setup_done:
/* Copy initialised sections into RAM if required. */
-
+
ldr r0, =__data_load_start__
sub r0,r0,r3
add r0,r0,r5
@@ -67,9 +67,9 @@ got_setup_done:
sub r2,r2,r4
add r2,r2,r9
bl crt0_memory_copy
-
+
/* Zero bss. */
-
+
ldr r0, =__bss_start__
sub r0,r0,r4
add r0,r0,r9
@@ -93,10 +93,10 @@ got_setup_done:
str r2, [r0]
add r0, r0, #4
str r1, [r0]
-
+
LDMIA sp!, {r3, r4, r5, r6, r7, lr} // Store other preserved registers
bx lr // Return to caller
-
+
.align 4
/* Startup helper functions. */
@@ -130,4 +130,3 @@ memory_set_done:
/* Setup attibutes of heap section so it doesn't take up room in the elf file */
.section .heap, "wa", %nobits
- \ No newline at end of file
diff --git a/ports_module/cortex_a7/gnu/example_build/module_code.c b/ports_module/cortex_a7/gnu/example_build/module_code.c
index 562ecea2..d380dfa9 100644
--- a/ports_module/cortex_a7/gnu/example_build/module_code.c
+++ b/ports_module/cortex_a7/gnu/example_build/module_code.c
@@ -4,7 +4,7 @@
/* */
/************************************************************************************************/
-/*
+/*
Input ELF file: .\sample_threadx_module.axf
Output C Array file: .\module_code.c
*/
diff --git a/ports_module/cortex_a7/gnu/example_build/reset.S b/ports_module/cortex_a7/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports_module/cortex_a7/gnu/example_build/reset.S
+++ b/ports_module/cortex_a7/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
diff --git a/ports_module/cortex_a7/gnu/example_build/sample_threadx.ld b/ports_module/cortex_a7/gnu/example_build/sample_threadx.ld
index 3dea4e1c..e940b2b8 100644
--- a/ports_module/cortex_a7/gnu/example_build/sample_threadx.ld
+++ b/ports_module/cortex_a7/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.c b/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.c
index fce2a3fa..f9ed56eb 100644
--- a/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.c
+++ b/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.c
@@ -1,5 +1,5 @@
-/* This is a small demo of the high-performance ThreadX kernel running as a module. It includes
- examples of eight threads of different priorities, using a message queue, semaphore, mutex,
+/* This is a small demo of the high-performance ThreadX kernel running as a module. It includes
+ examples of eight threads of different priorities, using a message queue, semaphore, mutex,
event flags group, byte pool, and block pool. */
/* Specify that this is a module! */
@@ -20,7 +20,7 @@
#define DEMO_QUEUE_SIZE 100
-/* Define the pool space in the bss section of the module. ULONG is used to
+/* Define the pool space in the bss section of the module. ULONG is used to
get the word alignment. */
ULONG demo_module_pool_space[DEMO_BYTE_POOL_SIZE / 4];
@@ -101,7 +101,7 @@ void demo_module_start(ULONG id)
CHAR *pointer;
/* Allocate all the objects. In MMU mode, modules cannot allocate control blocks within
- their own memory area so they cannot corrupt the resident portion of ThreadX by overwriting
+ their own memory area so they cannot corrupt the resident portion of ThreadX by overwriting
the control block(s). */
txm_module_object_allocate((void *) &thread_0, sizeof(TX_THREAD));
txm_module_object_allocate((void *) &thread_1, sizeof(TX_THREAD));
@@ -117,7 +117,7 @@ CHAR *pointer;
txm_module_object_allocate((void *) &event_flags_0, sizeof(TX_EVENT_FLAGS_GROUP));
txm_module_object_allocate((void *) &byte_pool_0, sizeof(TX_BYTE_POOL));
txm_module_object_allocate((void *) &block_pool_0, sizeof(TX_BLOCK_POOL));
-
+
/* Create a byte memory pool from which to allocate the thread stacks. */
tx_byte_pool_create(byte_pool_0, "module byte pool 0", demo_module_pool_space, DEMO_BYTE_POOL_SIZE);
@@ -129,25 +129,25 @@ CHAR *pointer;
/* Create the main thread. */
tx_thread_create(thread_0, "module thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
tx_thread_create(thread_1, "module thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(thread_2, "module thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
@@ -156,14 +156,14 @@ CHAR *pointer;
/* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
tx_thread_create(thread_3, "module thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(thread_4, "module thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -172,7 +172,7 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
tx_thread_create(thread_5, "module thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
@@ -180,14 +180,14 @@ CHAR *pointer;
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
tx_thread_create(thread_6, "module thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(thread_7, "module thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -237,7 +237,7 @@ UINT status;
*(ULONG *) 0x90000000 = 0xdeadbeef;
*(ULONG *) 0x90000FFC = 0xfeed0add;
*(ULONG *) 0x90001000 = 0xfedcba01;
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
@@ -247,7 +247,7 @@ UINT status;
/* Sleep for 10 ticks. */
tx_thread_sleep(10);
-
+
/* Set event flag 0 to wakeup thread 5. */
status = tx_event_flags_set(event_flags_0, 0x1, TX_OR);
@@ -300,11 +300,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -363,7 +363,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -416,7 +416,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(mutex_0);
diff --git a/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.ld b/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.ld
index 30c66655..5fa4c680 100644
--- a/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.ld
+++ b/ports_module/cortex_a7/gnu/example_build/sample_threadx_module.ld
@@ -125,7 +125,7 @@ SECTIONS
KEEP (*(.got*))
. = ALIGN(4);
_egot = .;
- }
+ }
__got_end__ = __got_load_start__ + SIZEOF(.got);
__rodata_load_start__ = ALIGN(__got_end__ , 4);
@@ -135,7 +135,7 @@ SECTIONS
*(.rodata .rodata.* .gnu.linkonce.r.*)
}
__rodata_end__ = __rodata_start__ + SIZEOF(.rodata);
-
+
__code_size__ = SIZEOF(.data) + __rodata_end__ - __FLASH_segment_start__;
__fast_load_start__ = ALIGN(__rodata_end__ , 4);
diff --git a/ports_module/cortex_a7/gnu/example_build/sample_threadx_module_manager.c b/ports_module/cortex_a7/gnu/example_build/sample_threadx_module_manager.c
index 8b17e34a..ac3bbeb5 100644
--- a/ports_module/cortex_a7/gnu/example_build/sample_threadx_module_manager.c
+++ b/ports_module/cortex_a7/gnu/example_build/sample_threadx_module_manager.c
@@ -1,4 +1,4 @@
-/* Small demonstration of the ThreadX module manager. This demonstration assumes the program
+/* Small demonstration of the ThreadX module manager. This demonstration assumes the program
manager is loaded at 0 and that RAM addresses 0x200000 through 0x400000 are available for
use. */
@@ -45,7 +45,7 @@ VOID module_fault_handler(TX_THREAD *thread, TXM_MODULE_INSTANCE *module)
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -57,8 +57,8 @@ void tx_application_define(void *first_unused_memory)
{
/* Create the module manager thread. */
- tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
- first_unused_memory, DEMO_STACK_SIZE,
+ tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
+ first_unused_memory, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
@@ -71,46 +71,46 @@ void module_manager_entry(ULONG thread_input)
/* Initialize the module manager. */
txm_module_manager_initialize((VOID *) module_data_area, MODULE_DATA_SIZE);
-
+
/* Create a pool for module objects. */
txm_module_manager_object_pool_create(object_memory, sizeof(object_memory));
-
+
/* Register a fault handler. */
txm_module_manager_memory_fault_notify(module_fault_handler);
-
+
/* Initialize MMU. */
txm_module_manager_mm_initialize();
-
+
/* Load the module that is already there, in this example it is placed there by the multiple image download. */
txm_module_manager_in_place_load(&my_module1, "my module1", (VOID *) module_code);
-
+
/* Load a second instance of the module. */
//txm_module_manager_in_place_load(&my_module2, "my module2", (VOID *) module_code);
-
+
/* Enable shared memory regions for one module. */
//txm_module_manager_external_memory_enable(&my_module2, (void*)0x90000000, 0x010000, 0x3F);
-
+
/* Start the modules. */
txm_module_manager_start(&my_module1);
//txm_module_manager_start(&my_module2);
-
+
/* Sleep for a while and let the modules run.... */
tx_thread_sleep(50);
-
+
/* Thread 0 in module1 should be terminated due to violating the MMU. */
-
+
/* Stop the modules. */
txm_module_manager_stop(&my_module1);
txm_module_manager_stop(&my_module2);
-
+
/* Unload the modules. */
txm_module_manager_unload(&my_module1);
txm_module_manager_unload(&my_module2);
-
+
/* Reload the modules. */
txm_module_manager_in_place_load(&my_module2, "my module2", (VOID *) module_code);
txm_module_manager_in_place_load(&my_module1, "my module1", (VOID *) module_code);
-
+
/* Give both modules shared memory. */
txm_module_manager_external_memory_enable(&my_module2, (void*)0x90000000, 0x010000, 0x3F);
txm_module_manager_external_memory_enable(&my_module1, (void*)0x90000000, 0x010000, 0x3F);
@@ -118,7 +118,7 @@ void module_manager_entry(ULONG thread_input)
/* Start the module again. */
txm_module_manager_start(&my_module2);
txm_module_manager_start(&my_module1);
-
+
/* Now just spin... */
while(1)
{
diff --git a/ports_module/cortex_a7/gnu/example_build/tx_initialize_low_level.s b/ports_module/cortex_a7/gnu/example_build/tx_initialize_low_level.s
index 6d1ceeff..0c267ac6 100644
--- a/ports_module/cortex_a7/gnu/example_build/tx_initialize_low_level.s
+++ b/ports_module/cortex_a7/gnu/example_build/tx_initialize_low_level.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -87,18 +88,6 @@ THUMB_MASK = 0x20 // THUMB mode bit
/* CALLED BY */
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/example_build/txm_module_preamble.s b/ports_module/cortex_a7/gnu/example_build/txm_module_preamble.s
index 7678628b..90c0c338 100644
--- a/ports_module/cortex_a7/gnu/example_build/txm_module_preamble.s
+++ b/ports_module/cortex_a7/gnu/example_build/txm_module_preamble.s
@@ -1,4 +1,4 @@
- .section .txm_module_preamble
+ .section .txm_module_preamble, "ax"
.align 4
/* Define common external references. */
@@ -28,7 +28,7 @@ __txm_module_preamble:
// 1 -> User mode execution
.dc.l _txm_module_thread_shell_entry // Module Shell Entry Point
.dc.l demo_module_start // Module Start Thread Entry Point
- .dc.l 0 // Module Stop Thread Entry Point
+ .dc.l 0 // Module Stop Thread Entry Point
.dc.l 1 // Module Start/Stop Thread Priority
.dc.l 2046 // Module Start/Stop Thread Stack Size
.dc.l _txm_module_callback_request_thread_entry // Module Callback Thread Entry
diff --git a/ports_module/cortex_a7/gnu/inc/tx_port.h b/ports_module/cortex_a7/gnu/inc/tx_port.h
index 55400b6f..41040fa9 100644
--- a/ports_module/cortex_a7/gnu/inc/tx_port.h
+++ b/ports_module/cortex_a7/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -42,23 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -337,7 +321,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.2 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_module/cortex_a7/gnu/inc/txm_module_port.h b/ports_module/cortex_a7/gnu/inc/txm_module_port.h
index a0a435b1..9cd5a280 100644
--- a/ports_module/cortex_a7/gnu/inc/txm_module_port.h
+++ b/ports_module/cortex_a7/gnu/inc/txm_module_port.h
@@ -1,55 +1,47 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Interface (API) */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Interface (API) */
+/** */
+/**************************************************************************/
+/**************************************************************************/
-/**************************************************************************/
-/* */
-/* APPLICATION INTERFACE DEFINITION RELEASE */
-/* */
-/* txm_module_port.h Cortex-A7/MMU/GNU */
+/**************************************************************************/
+/* */
+/* APPLICATION INTERFACE DEFINITION RELEASE */
+/* */
+/* txm_module_port.h Cortex-A7/MMU/GNU */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This file defines the basic module constants, interface structures, */
-/* and function prototypes. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
+/* This file defines the basic module constants, interface structures, */
+/* and function prototypes. */
/* */
/**************************************************************************/
#ifndef TXM_MODULE_PORT_H
#define TXM_MODULE_PORT_H
-/* It is assumed that the base ThreadX tx_port.h file has been modified to add the
+/* It is assumed that the base ThreadX tx_port.h file has been modified to add the
following extensions to the ThreadX thread control block (this code should replace
the corresponding macro define in tx_port.h):
@@ -89,10 +81,10 @@ The following extensions must also be defined in tx_port.h:
#endif
/* Defined, this option enables the MMU hardware and requires memory protected
- module objects to be allocated from the module manager object pool.
- If this is undefined, module objects can be created in the module's data area
- or in the module manager object pool. If this is not defined (MMU hardware
- is disabled), a module requiring memory protection will not run (the load
+ module objects to be allocated from the module manager object pool.
+ If this is undefined, module objects can be created in the module's data area
+ or in the module manager object pool. If this is not defined (MMU hardware
+ is disabled), a module requiring memory protection will not run (the load
functions will return a TXM_MODULE_INVALID_PROPERTIES error).
Default setting for this value is defined. */
#define TXM_MODULE_MEMORY_PROTECTION_ENABLED
@@ -299,7 +291,7 @@ typedef struct TXM_MODULE_MANAGER_MEMORY_FAULT_INFO_STRUCT
TXM_MODULE_MANAGER_MEMORY_FAULT_INFO _txm_module_manager_memory_fault_info;
/* Define the macro to check the stack available in dispatch. */
-#define TXM_MODULE_MANAGER_CHECK_STACK_AVAILABLE
+#define TXM_MODULE_MANAGER_CHECK_STACK_AVAILABLE
/* Define the macro to check the code alignment. */
@@ -409,7 +401,7 @@ UINT _txm_module_manager_inside_data_check(ULONG pointer);
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-A7/MMU/GNU Version 6.4.2 *";
+ "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-A7/MMU/GNU Version 6.5.0.202601 *";
#endif
diff --git a/ports_module/cortex_a7/gnu/module_lib/src/txm_module_thread_shell_entry.c b/ports_module/cortex_a7/gnu/module_lib/src/txm_module_thread_shell_entry.c
index 5e22ff15..73a38340 100644
--- a/ports_module/cortex_a7/gnu/module_lib/src/txm_module_thread_shell_entry.c
+++ b/ports_module/cortex_a7/gnu/module_lib/src/txm_module_thread_shell_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -81,12 +82,6 @@ ULONG (*_txm_module_kernel_call_dispatcher)(ULONG kern
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* */
/**************************************************************************/
VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_ENTRY_INFO *thread_info)
{
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_restore.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_restore.s
index 8b55c21d..62b36534 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_restore.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -71,21 +72,6 @@ SVC_MODE = 0x13 // SVC mode
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_save.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_save.s
index d29d464f..e124db7a 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_save.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -69,21 +70,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_restore.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_restore.s
index 8876a873..a6f5cbeb 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_restore.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -74,21 +75,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* CALLED BY */
/* */
/* FIQ ISR Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_save.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_save.s
index b6ac3bbf..2ce315f9 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_save.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -67,21 +68,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_end.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_end.s
index e2dbba7d..9938b4e6 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_end.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_end.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -75,18 +76,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_start.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_start.s
index 68cdb6ba..2be8b631 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_start.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_fiq_nesting_start.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -68,18 +69,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_control.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_control.s
index 4d5c7442..15e244f1 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_control.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -64,18 +65,6 @@ FIQ_MASK = 0x040
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_disable.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_disable.s
index 1fa006d8..7b6d8647 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_disable.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -57,18 +58,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_restore.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_restore.s
index 725e4810..ba5fe5b6 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_restore.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -64,18 +65,6 @@ FIQ_MASK = 0x040
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_end.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_end.s
index 90573977..dfd8b554 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_end.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_end.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -75,18 +76,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_start.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_start.s
index 02be1d75..c87978e7 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_start.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_irq_nesting_start.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -68,18 +69,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_schedule.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_schedule.s
index 9faf80eb..54e2c768 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_schedule.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -86,16 +87,6 @@ FIQ_MASK = 0x040
/* _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 */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_stack_build.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_stack_build.s
index d4dd01c7..f4f0717b 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_stack_build.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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,18 +74,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_system_return.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_system_return.s
index d2792904..fd8de227 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_system_return.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -66,21 +67,6 @@ SYS_MODE = 0x1F // SYS mode
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_vectored_context_save.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_vectored_context_save.s
index 27465bdf..ce0202d4 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_vectored_context_save.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_thread_vectored_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -66,21 +67,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/tx_timer_interrupt.s b/ports_module/cortex_a7/gnu/module_manager/src/tx_timer_interrupt.s
index 8d70c67a..8c9b5186 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/tx_timer_interrupt.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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,18 +74,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_alignment_adjust.c b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_alignment_adjust.c
index c7178301..4641dcc8 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_alignment_adjust.c
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_alignment_adjust.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -60,12 +61,6 @@
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble, ULONG *code_size, ULONG *code_alignment, ULONG *data_size, ULONG *data_alignment)
{
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_external_memory_enable.c b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_external_memory_enable.c
index fa79dc8a..bbb9013c 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_external_memory_enable.c
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_external_memory_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -64,12 +65,6 @@ extern ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_EN
/* */
/* _txm_module_manager_external_memory_enable */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* */
/**************************************************************************/
ULONG _txm_level2_page_get(TXM_MODULE_INSTANCE *module_instance, ULONG *page_addr)
{
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c
index 68bd8e44..303b17ce 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -71,12 +72,6 @@ TXM_MODULE_MANAGER_FAULT_INFO
/* */
/* Fault handler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_memory_fault_handler(VOID)
{
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c
index 7b6ea622..df6ca21e 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -66,12 +67,6 @@ extern VOID (*_txm_module_manager_fault_notify)(TX_THREAD *, TXM_MODULE_INSTA
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_memory_fault_notify(VOID (*notify_function)(TX_THREAD *, TXM_MODULE_INSTANCE *))
{
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_initialize.c b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_initialize.c
index dcda0e1c..da8d0904 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_initialize.c
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_initialize.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -51,48 +52,42 @@ TXM_MODULE_INSTANCE *_txm_asid_table[TXM_ASID_TABLE_LENGTH];
__attribute__ ((aligned (16384))) ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_ENTRIES];
/* Module start and end level 2 page tables, 2^10 (1kB) alignment.
- * First set of 4 tables are the master level 2 tables, the rest are for each module.
+ * First set of 4 tables are the master level 2 tables, the rest are for each module.
* Each module needs two L2 tables for code and two L2 tables for data. */
__attribute__ ((aligned (1024))) ULONG _txm_level2_module_page_table[TXM_MAXIMUM_MODULES * 4][TXM_LEVEL_2_PAGE_TABLE_ENTRIES];
/* Module external memory level 2 page tables, 2^10 (1kB) alignment. */
__attribute__ ((aligned (1024))) ULONG _txm_level2_external_page_pool[TXM_LEVEL2_EXTERNAL_POOL_PAGES][TXM_LEVEL_2_PAGE_TABLE_ENTRIES];
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_mm_initialize Cortex-A7/MMU/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_mm_initialize Cortex-A7/MMU/GNU */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function performs the initial set up of the the A7 MMU. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* Completion Status */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function performs the initial set up of the the A7 MMU. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
/* */
/**************************************************************************/
UINT _txm_module_manager_mm_initialize(VOID)
@@ -103,53 +98,53 @@ UINT _txm_module_manager_mm_initialize(VOID)
ULONG cp15reg;
UINT user_mode_index;
UINT counter_limit;
-
+
/* Clear ASID table. */
for (i = 0; i < TXM_ASID_TABLE_LENGTH; i++)
{
_txm_asid_table[i] = 0;
}
_txm_asid_table[0] = (TXM_MODULE_INSTANCE *)TXM_ASID_RESERVED;
-
-
+
+
/********************************************************************************/
/* This is an example showing how to set up the cache attributes. */
/********************************************************************************/
/*******************************************************************************
-* PAGE TABLE generation
-* Generate the page tables
-* Build a flat translation table for the whole address space.
-* ie: Create 4096 1MB sections from 0x000xxxxx to 0xFFFxxxxx
+* PAGE TABLE generation
+* Generate the page tables
+* Build a flat translation table for the whole address space.
+* ie: Create 4096 1MB sections from 0x000xxxxx to 0xFFFxxxxx
* 31 20|19 18|17|16| 15|14 12|11 10|9|8 5|4 |3 2|1 0|
* |base address | 0 0|nG| S|AP2|TEX |AP |P|Domain|XN|CB |1 0|
*
-* Bits[31:20] - Top 12 bits of VA is pointer into table
+* Bits[31:20] - Top 12 bits of VA is pointer into table
* nG[17]=0 - Non global, enables matching against ASID in the TLB when set.
* S[16]=0 - Indicates normal memory is shared when set.
-* AP2[15]=0
+* AP2[15]=0
* TEX[14:12]=000
-* AP[11:10]=11 - Configure for full read/write access in all modes
+* AP[11:10]=11 - Configure for full read/write access in all modes
* IMPP[9]=0 - Ignored
* Domain[5:8]=1111 - Set all pages to use domain 15
* XN[4]=0 - Execute never disabled
-* CB[3:2]= 00 - Set attributes to Strongly-ordered memory.
-* (except for the descriptor where code segment is based,
-* see below)
-* Bits[1:0]=10 - Indicate entry is a 1MB section
+* CB[3:2]= 00 - Set attributes to Strongly-ordered memory.
+* (except for the descriptor where code segment is based,
+* see below)
+* Bits[1:0]=10 - Indicate entry is a 1MB section
*******************************************************************************/
/* ---- Parameter setting to level1 descriptor (bits 19:0) ---- */
-/* setting for Strongly-ordered memory
+/* setting for Strongly-ordered memory
B-00000000000000000000010111100010 */
#define TTB_PARA_STRGLY 0x05E2
-/* setting for Outer and inner not cache normal memory
+/* setting for Outer and inner not cache normal memory
B-00000000000000000001010111100010 */
#define TTB_PARA_NORMAL_NOT_CACHE 0x15E2
-/* setting for Outer and inner write back, write allocate normal memory
- (Cacheable)
+/* setting for Outer and inner write back, write allocate normal memory
+ (Cacheable)
B-00000000000000000001010111101110 */
#define TTB_PARA_NORMAL_CACHE 0x15EE //0x15EE
@@ -167,98 +162,98 @@ UINT _txm_module_manager_mm_initialize(VOID)
#define M_SIZE_RAM_M 10 /* [Area10] Internal RAM (mirror) */
#define M_SIZE_IO_2 2550 /* [Area11] I/O area 2 */
/* Should add to: 4096 */
-
+
counter_limit = M_SIZE_NOR;
for (i = 0; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_SDRAM;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_CS45;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_SPI;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_RAM;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_IO_1;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_NOR_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_SDRAM_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_CS45_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_SPI_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_RAM_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_IO_2;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
/********************************************************************************/
/* This is the end of the example showing how to set up the cache attributes. */
/********************************************************************************/
-
-
+
+
/* Clear ASID. */
cp15reg = 0;
__asm volatile ("mcr p15, 0, %0, c13, c0, 1" : : "r"(cp15reg) : );
__asm("isb");
-
+
/* Put the page table address in TTBR. */
cp15reg = (int)(VOID*)_txm_ttbr1_page_table;
cp15reg |= TTBR0_ATTRIBUTES;
__asm volatile ("mcr p15, 0, %0, c2, c0, 0" : : "r"(cp15reg) : );
-
+
/* Set the domain to client mode. */
cp15reg = DACR_CLIENT_MODE;
__asm volatile ("mcr p15, 0, %0, c3, c0, 0" : : "r"(cp15reg) : );
-
+
/* Level 2 small page attributes: normal memory, cache & buffer enabled, priviledged access. */
#define TTB_LEVEL2_NORMAL_CACHE 0x05E
@@ -268,7 +263,7 @@ UINT _txm_module_manager_mm_initialize(VOID)
/* Attributes for user mode table entry in level 2 table. */
#define TTB_LEVEL2_USER_MODE_ENTRY 0x06E
-
+
/* Set up Level 2 table for user to kernel mode entry trampoline. */
/* Find which table entry _txm_module_manager_user_mode_entry is in. */
user_mode_index = (ULONG)_txm_module_manager_user_mode_entry >> TXM_MMU_LEVEL1_PAGE_SHIFT;
@@ -277,21 +272,21 @@ UINT _txm_module_manager_mm_initialize(VOID)
{
_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = ((ULONG)_txm_module_manager_user_mode_entry & TXM_MMU_LEVEL1_MASK) | (i << TXM_MMU_LEVEL2_PAGE_SHIFT) | TTB_LEVEL2_NORMAL_CACHE;
}
-
+
/* Enter Level 2 table in to master table. */
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] = ((ULONG)_txm_level2_module_page_table & TXM_MMU_LEVEL1_SECOND_MASK) | TXM_MMU_LEVEL1_SECOND_ATTRIBUTES;
-
+
/* Find level 2 entry that holds _txm_module_manager_user_mode_entry. */
user_mode_index = ((ULONG)_txm_module_manager_user_mode_entry & ~TXM_MMU_LEVEL1_MASK) >> TXM_MMU_LEVEL2_PAGE_SHIFT;
-
+
/* Set attribute bits for the user mode entry page. */
_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] = (_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] & TTB_LEVEL2_AP_CLEAR_MASK) | TTB_LEVEL2_USER_MODE_ENTRY;
-
+
/* Enable the MMU. */
__asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r"(cp15reg) : : );
cp15reg |= 0x1;
__asm volatile ("mcr p15, 0, %0, c1, c0, 0" : : "r"(cp15reg) : );
-
+
return(TX_SUCCESS);
#else
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
index 9a049056..60202970 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -61,12 +62,6 @@ extern ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_EN
/* */
/* TXM_MODULE_MANAGER_DATA_POINTER_CHECK */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_inside_data_check(ULONG pointer)
{
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_thread_stack_build.s b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_thread_stack_build.s
index d62f5cf8..e701846a 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_thread_stack_build.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -67,16 +68,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _txm_module_manager_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(TX_THREAD *, TXM_MODULE_INSTANCE *))
// {
diff --git a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_user_mode_entry.s b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_user_mode_entry.s
index e84bb7f2..b9c59109 100644
--- a/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_user_mode_entry.s
+++ b/ports_module/cortex_a7/gnu/module_manager/src/txm_module_manager_user_mode_entry.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -57,16 +58,6 @@
/* CALLED BY */
/* */
/* Modules in user mode */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
-/* 10-31-2023 Yajun Xia Updated comments, */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.text
.align 12
diff --git a/ports_module/cortex_a7/iar/example_build/cstartup.s b/ports_module/cortex_a7/iar/example_build/cstartup.s
index 329decce..443be304 100644
--- a/ports_module/cortex_a7/iar/example_build/cstartup.s
+++ b/ports_module/cortex_a7/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports_module/cortex_a7/iar/example_build/sample_threadx_module.c b/ports_module/cortex_a7/iar/example_build/sample_threadx_module.c
index 0cad4a70..33a22445 100644
--- a/ports_module/cortex_a7/iar/example_build/sample_threadx_module.c
+++ b/ports_module/cortex_a7/iar/example_build/sample_threadx_module.c
@@ -1,5 +1,5 @@
-/* This is a small demo of the high-performance ThreadX kernel running as a module. It includes
- examples of eight threads of different priorities, using a message queue, semaphore, mutex,
+/* This is a small demo of the high-performance ThreadX kernel running as a module. It includes
+ examples of eight threads of different priorities, using a message queue, semaphore, mutex,
event flags group, byte pool, and block pool. */
/* Specify that this is a module! */
@@ -20,7 +20,7 @@
#define DEMO_QUEUE_SIZE 100
-/* Define the pool space in the bss section of the module. ULONG is used to
+/* Define the pool space in the bss section of the module. ULONG is used to
get the word alignment. */
ULONG demo_module_pool_space[DEMO_BYTE_POOL_SIZE / 4];
@@ -101,7 +101,7 @@ void demo_module_start(ULONG id)
CHAR *pointer;
/* Allocate all the objects. In MMU mode, modules cannot allocate control blocks within
- their own memory area so they cannot corrupt the resident portion of ThreadX by overwriting
+ their own memory area so they cannot corrupt the resident portion of ThreadX by overwriting
the control block(s). */
txm_module_object_allocate((void *) &thread_0, sizeof(TX_THREAD));
txm_module_object_allocate((void *) &thread_1, sizeof(TX_THREAD));
@@ -117,7 +117,7 @@ CHAR *pointer;
txm_module_object_allocate((void *) &event_flags_0, sizeof(TX_EVENT_FLAGS_GROUP));
txm_module_object_allocate((void *) &byte_pool_0, sizeof(TX_BYTE_POOL));
txm_module_object_allocate((void *) &block_pool_0, sizeof(TX_BLOCK_POOL));
-
+
/* Create a byte memory pool from which to allocate the thread stacks. */
tx_byte_pool_create(byte_pool_0, "module byte pool 0", demo_module_pool_space, DEMO_BYTE_POOL_SIZE);
@@ -128,42 +128,42 @@ CHAR *pointer;
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(thread_0, "module thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_0, "module thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(thread_1, "module thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_1, "module thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(thread_2, "module thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_2, "module thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(thread_3, "module thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_3, "module thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(thread_4, "module thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_4, "module thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -171,23 +171,23 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(thread_5, "module thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_5, "module thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(thread_6, "module thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_6, "module thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(thread_7, "module thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(thread_7, "module thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -241,7 +241,7 @@ UINT status;
/* Sleep for 10 ticks. */
tx_thread_sleep(10);
-
+
/* Set event flag 0 to wakeup thread 5. */
status = tx_event_flags_set(event_flags_0, 0x1, TX_OR);
@@ -261,7 +261,7 @@ UINT status;
/* This thread simply sends messages to a queue shared by thread 2. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_1_counter++;
@@ -287,18 +287,18 @@ UINT status;
/* This thread retrieves messages placed on the queue by thread 1. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_2_counter++;
/* Retrieve a message from the queue. */
status = tx_queue_receive(queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -352,12 +352,12 @@ ULONG actual_flags;
/* This thread simply waits for an event in a forever loop. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -410,7 +410,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(mutex_0);
diff --git a/ports_module/cortex_a7/iar/example_build/sample_threadx_module.icf b/ports_module/cortex_a7/iar/example_build/sample_threadx_module.icf
index bed79adf..69c8f600 100644
--- a/ports_module/cortex_a7/iar/example_build/sample_threadx_module.icf
+++ b/ports_module/cortex_a7/iar/example_build/sample_threadx_module.icf
@@ -26,11 +26,11 @@ define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
-define movable block ROPI with alignment = 4, fixed order
-{
+define movable block ROPI with alignment = 4, fixed order
+{
ro object txm_module_preamble.o,
- ro,
- ro data
+ ro,
+ ro data
};
define movable block RWPI with alignment = 8, fixed order, static base
diff --git a/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.c b/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.c
index 9aa08e2f..b3a4f2f9 100644
--- a/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.c
+++ b/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.c
@@ -1,4 +1,4 @@
-/* Small demonstration of the ThreadX module manager. This demonstration assumes the program
+/* Small demonstration of the ThreadX module manager. This demonstration assumes the program
manager is loaded at 0 and that RAM addresses 0x200000 through 0x400000 are available for
use. */
@@ -47,7 +47,7 @@ VOID module_fault_handler(TX_THREAD *thread, TXM_MODULE_INSTANCE *module)
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -59,8 +59,8 @@ void tx_application_define(void *first_unused_memory)
{
/* Create the module manager thread. */
- tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
- manager_thread_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
+ manager_thread_stack, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
@@ -72,46 +72,46 @@ void module_manager_entry(ULONG thread_input)
/* Initialize the module manager. */
txm_module_manager_initialize((VOID *) module_data_area, MODULE_DATA_SIZE);
-
+
/* Create a pool for module objects. */
txm_module_manager_object_pool_create(object_memory, sizeof(object_memory));
-
+
/* Register a fault handler. */
txm_module_manager_memory_fault_notify(module_fault_handler);
-
+
/* Initialize MMU. */
txm_module_manager_mm_initialize();
-
+
/* Load the module that is already there, in this example it is placed there by the multiple image download. */
txm_module_manager_in_place_load(&my_module1, "my module1", (VOID *) 0x00100000);
-
+
/* Load a second instance of the module. */
//txm_module_manager_in_place_load(&my_module2, "my module2", (VOID *) module_code);
-
+
/* Enable shared memory regions for one module. */
//txm_module_manager_external_memory_enable(&my_module2, (void*)0x90000000, 0x010000, 0x3F);
-
+
/* Start the modules. */
txm_module_manager_start(&my_module1);
//txm_module_manager_start(&my_module2);
-
+
/* Sleep for a while and let the modules run.... */
tx_thread_sleep(50);
-
+
/* Thread 0 in module1 should be terminated due to violating the MMU. */
-
+
/* Stop the modules. */
txm_module_manager_stop(&my_module1);
txm_module_manager_stop(&my_module2);
-
+
/* Unload the modules. */
txm_module_manager_unload(&my_module1);
txm_module_manager_unload(&my_module2);
-
+
/* Reload the modules. */
txm_module_manager_in_place_load(&my_module2, "my module2", (VOID *) 0x00100000);
txm_module_manager_in_place_load(&my_module1, "my module1", (VOID *) 0x00100000);
-
+
/* Give both modules shared memory. */
txm_module_manager_external_memory_enable(&my_module2, (void*)0x90000000, 0x010000, 0x3F);
txm_module_manager_external_memory_enable(&my_module1, (void*)0x90000000, 0x010000, 0x3F);
@@ -119,7 +119,7 @@ void module_manager_entry(ULONG thread_input)
/* Start the module again. */
txm_module_manager_start(&my_module2);
txm_module_manager_start(&my_module1);
-
+
/* Now just spin... */
while(1)
{
diff --git a/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.icf b/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.icf
index f076b002..ea39b4f5 100644
--- a/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.icf
+++ b/ports_module/cortex_a7/iar/example_build/sample_threadx_module_manager.icf
@@ -7,7 +7,7 @@ define symbol __ICFEDIT_intvec_start__ = 0x00000000;
define symbol __ICFEDIT_region_ROM_start__ = 0x00000040;
define symbol __ICFEDIT_region_ROM_end__ = 0x000FFFFF; //Module in 0x00100000-0x0013FFFF
define symbol __ICFEDIT_region_RAM_start__ = 0x08000000;
-define symbol __ICFEDIT_region_RAM_end__ = 0x081FFFFF;
+define symbol __ICFEDIT_region_RAM_end__ = 0x081FFFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x200;
define symbol __ICFEDIT_size_svcstack__ = 0x100;
@@ -33,7 +33,7 @@ define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
-define block PAGE_ALIGN with alignment = 4096 { section page_align };
+define block PAGE_ALIGN with alignment = 4096 { section page_align };
initialize by copy { readwrite };
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
diff --git a/ports_module/cortex_a7/iar/example_build/tx_initialize_low_level.s b/ports_module/cortex_a7/iar/example_build/tx_initialize_low_level.s
index 28ca3030..d3795786 100644
--- a/ports_module/cortex_a7/iar/example_build/tx_initialize_low_level.s
+++ b/ports_module/cortex_a7/iar/example_build/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 */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0x1F ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,48 +75,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A7/IAR */
;/* 6.3.0 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* 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 */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -149,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -177,7 +168,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -185,17 +176,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -210,7 +201,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -229,22 +220,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -253,7 +244,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -277,11 +268,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
@@ -307,41 +298,41 @@ __tx_fiq_handler
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* __tx_prefetch_handler & __tx_abort_handler Cortex-A7/MMU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* __tx_prefetch_handler & __tx_abort_handler Cortex-A7/MMU/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function handles MMU exceptions and fills the */
-;/* _txm_module_manager_memory_fault_info struct. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _txm_module_manager_memory_fault_handler */
-;/* _tx_execution_thread_exit */
-;/* _tx_thread_schedule */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* MMU exceptions */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function handles MMU exceptions and fills the */
+;/* _txm_module_manager_memory_fault_info struct. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _txm_module_manager_memory_fault_handler */
+;/* _tx_execution_thread_exit */
+;/* _tx_thread_schedule */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* MMU exceptions */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 Scott Larson Initial Version 6.1 */
@@ -389,7 +380,7 @@ __tx_abort_handler
STR r0, [r3, #16] ; Save IFAR
MRC p15, 0, r0, c5, c0, 1 ; Read IFSR
STR r0, [r3, #20] ; Save IFSR
-
+
; Save registers r0-r12
POP {r0-r2}
STR r0, [r3, #28] ; Save r0
@@ -406,7 +397,7 @@ __tx_abort_handler
STR r10,[r3, #68] ; Save r10
STR r11,[r3, #72] ; Save r11
STR r12,[r3, #76] ; Save r12
-
+
CPS #SYS_MODE ; Enter SYS mode
MOV r0, lr ; Pickup lr
MOV r1, sp ; Pickup sp
@@ -418,7 +409,7 @@ __tx_abort_handler
ORR r0, r0, #SYS_MODE ; Return into SYS mode
BIC r0, r0, #THUMB_MASK ; Clear THUMB mode
MSR SPSR_c, r0 ; Save SPSR
-
+
; Call memory manager fault handler
BL _txm_module_manager_memory_fault_handler
@@ -433,11 +424,11 @@ __tx_abort_handler
LDR r1, [r0] ; Pickup system state
SUB r1, r1, #1 ; Decrement
STR r1, [r0] ; Store new system state
-
+
MOV r1, #0 ; Build NULL value
LDR r0, =_tx_thread_current_ptr ; Pickup address of current thread pointer
STR r1, [r0] ; Clear current thread pointer
-
+
; Return from exception
LDR lr, =_tx_thread_schedule ; Load scheduler address
MOVS pc, lr ; Return to scheduler
diff --git a/ports_module/cortex_a7/iar/example_build/txm_module_preamble.s b/ports_module/cortex_a7/iar/example_build/txm_module_preamble.s
index 343d2a6b..4a42627b 100644
--- a/ports_module/cortex_a7/iar/example_build/txm_module_preamble.s
+++ b/ports_module/cortex_a7/iar/example_build/txm_module_preamble.s
@@ -26,7 +26,7 @@ __txm_module_preamble:
DC32 0x6 ; Module Major Version
DC32 0x1 ; Module Minor Version
DC32 32 ; Module Preamble Size in 32-bit words
- DC32 0x12345678 ; Module ID (application defined)
+ DC32 0x12345678 ; Module ID (application defined)
DC32 0x00000001 ; Module Properties where:
; Bits 31-24: Compiler ID
; 0 -> IAR
@@ -41,23 +41,23 @@ __txm_module_preamble:
; 1 -> User mode execution
DC32 _txm_module_thread_shell_entry - . - 0 ; Module Shell Entry Point
DC32 demo_module_start - . - 0 ; Module Start Thread Entry Point
- DC32 0 ; Module Stop Thread Entry Point
+ DC32 0 ; Module Stop Thread Entry Point
DC32 1 ; Module Start/Stop Thread Priority
DC32 1022 ; Module Start/Stop Thread Stack Size
DC32 _txm_module_callback_request_thread_entry - . - 0 ; Module Callback Thread Entry
- DC32 1 ; Module Callback Thread Priority
- DC32 1022 ; Module Callback Thread Stack Size
+ DC32 1 ; Module Callback Thread Priority
+ DC32 1022 ; Module Callback Thread Stack Size
DC32 ROPI$$Length ; Module Code Size
DC32 RWPI$$Length ; Module Data Size
- DC32 0 ; Reserved 0
+ DC32 0 ; Reserved 0
DC32 0 ; Reserved 1
DC32 0 ; Reserved 2
DC32 0 ; Reserved 3
DC32 0 ; Reserved 4
- DC32 0 ; Reserved 5
- DC32 0 ; Reserved 6
- DC32 0 ; Reserved 7
- DC32 0 ; Reserved 8
+ DC32 0 ; Reserved 5
+ DC32 0 ; Reserved 6
+ DC32 0 ; Reserved 7
+ DC32 0 ; Reserved 8
DC32 0 ; Reserved 9
DC32 0 ; Reserved 10
DC32 0 ; Reserved 11
diff --git a/ports_module/cortex_a7/iar/inc/tx_port.h b/ports_module/cortex_a7/iar/inc/tx_port.h
index 3270eabe..fd21d57b 100644
--- a/ports_module/cortex_a7/iar/inc/tx_port.h
+++ b/ports_module/cortex_a7/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A7/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A7/IAR */
/* 6.3.0 */
/* */
/* AUTHOR */
@@ -32,27 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 10-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -65,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -82,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -118,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -133,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -190,7 +179,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_INLINE_INITIALIZATION
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -204,11 +193,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
VOID *tx_thread_module_instance_ptr; \
@@ -239,7 +228,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
ULONG tx_thread_module_stack_size; \
VOID *tx_thread_module_reserved;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -259,11 +248,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
VOID (*tx_timer_module_expiration_function)(ULONG id);
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -273,23 +262,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -322,20 +311,20 @@ void __iar_Initlocks(void);
#ifndef TX_DISABLE_INLINE
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -393,7 +382,7 @@ void _tx_thread_interrupt_restore(UINT old_posture);
thread. */
void tx_thread_vfp_enable(void);
-void tx_thread_vfp_disable(void);
+void tx_thread_vfp_disable(void);
/* Define the interrupt lockout macros for each ThreadX object. */
@@ -409,8 +398,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A7/IAR Version 6.4.2 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A7/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports_module/cortex_a7/iar/inc/txm_module_port.h b/ports_module/cortex_a7/iar/inc/txm_module_port.h
index 81a8eb17..247868ea 100644
--- a/ports_module/cortex_a7/iar/inc/txm_module_port.h
+++ b/ports_module/cortex_a7/iar/inc/txm_module_port.h
@@ -1,48 +1,40 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Interface (API) */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Interface (API) */
+/** */
+/**************************************************************************/
+/**************************************************************************/
-/**************************************************************************/
-/* */
-/* APPLICATION INTERFACE DEFINITION RELEASE */
-/* */
-/* txm_module_port.h Cortex-A7/MMU/IAR */
+/**************************************************************************/
+/* */
+/* APPLICATION INTERFACE DEFINITION RELEASE */
+/* */
+/* txm_module_port.h Cortex-A7/MMU/IAR */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This file defines the basic module constants, interface structures, */
-/* and function prototypes. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.3.0 */
+/* This file defines the basic module constants, interface structures, */
+/* and function prototypes. */
/* */
/**************************************************************************/
@@ -54,13 +46,13 @@
#ifdef TXM_MODULE_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in txm_module_user.h. The defines in this file may
+/* Yes, include the user defines in txm_module_user.h. The defines in this file may
alternately be defined on the command line. */
#include "txm_module_user.h"
#endif
-/* It is assumed that the base ThreadX tx_port.h file has been modified to add the
+/* It is assumed that the base ThreadX tx_port.h file has been modified to add the
following extensions to the ThreadX thread control block (this code should replace
the corresponding macro define in tx_port.h):
@@ -100,10 +92,10 @@ The following extensions must also be defined in tx_port.h:
#endif
/* Defined, this option enables the MMU hardware and requires memory protected
- module objects to be allocated from the module manager object pool.
- If this is undefined, module objects can be created in the module's data area
- or in the module manager object pool. If this is not defined (MMU hardware
- is disabled), a module requiring memory protection will not run (the load
+ module objects to be allocated from the module manager object pool.
+ If this is undefined, module objects can be created in the module's data area
+ or in the module manager object pool. If this is not defined (MMU hardware
+ is disabled), a module requiring memory protection will not run (the load
functions will return a TXM_MODULE_INVALID_PROPERTIES error).
Default setting for this value is defined. */
#define TXM_MODULE_MEMORY_PROTECTION_ENABLED
@@ -310,7 +302,7 @@ typedef struct TXM_MODULE_MANAGER_MEMORY_FAULT_INFO_STRUCT
TXM_MODULE_MANAGER_MEMORY_FAULT_INFO _txm_module_manager_memory_fault_info;
/* Define the macro to check the stack available in dispatch. */
-#define TXM_MODULE_MANAGER_CHECK_STACK_AVAILABLE
+#define TXM_MODULE_MANAGER_CHECK_STACK_AVAILABLE
/* Define the macro to check the code alignment. */
@@ -420,7 +412,7 @@ UINT _txm_module_manager_inside_data_check(ULONG pointer);
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-A7/MMU/iar Version 6.4.2 *";
+ "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-A7/MMU/iar Version 6.5.0.202601 *";
#endif
diff --git a/ports_module/cortex_a7/iar/module_lib/src/txm_module_thread_shell_entry.c b/ports_module/cortex_a7/iar/module_lib/src/txm_module_thread_shell_entry.c
index e34fdbea..cfe18ef1 100644
--- a/ports_module/cortex_a7/iar/module_lib/src/txm_module_thread_shell_entry.c
+++ b/ports_module/cortex_a7/iar/module_lib/src/txm_module_thread_shell_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -88,12 +89,6 @@ extern VOID __iar_data_init3(VOID);
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_ENTRY_INFO *thread_info)
{
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_iar.c b/ports_module/cortex_a7/iar/module_manager/src/tx_iar.c
index 158738ea..238b485e 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_iar.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and <yvals.h> is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include <yvals.h>
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and <yvals.h> is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include <yvals.h>
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,17 +423,17 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_restore.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_restore.s
index 2d4a1428..bf3c0e54 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_restore.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_restore.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
@@ -39,47 +39,38 @@ SYS_MODE EQU 0x1F ; SYS mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A7/MMU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A7/MMU/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* Scott Larson, 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 */
+;/* 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 */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -183,7 +174,7 @@ restore_and_return_from_irq:
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_save.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_save.s
index 51d17e4d..139ae048 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_context_save.s
+++ b/ports_module/cortex_a7/iar/module_manager/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 */
;/** */
@@ -29,46 +29,37 @@
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A7/IAR */
;/* 6.3.0 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* 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)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_restore.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_restore.s
index 77425a1e..2e5370ec 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_restore.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_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 */
;/** */
@@ -21,7 +21,7 @@
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -36,47 +36,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
EXTERN _tx_execution_isr_exit
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when 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 */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function restores the fiq interrupt context when 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 */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -108,13 +99,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
POP {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -125,7 +116,7 @@ _tx_thread_fiq_context_restore
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
@@ -169,7 +160,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -181,7 +172,7 @@ __tx_thread_fiq_no_preempt_restore
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
@@ -225,7 +216,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
PUSH {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -237,7 +228,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_save.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_save.s
index 36330436..925c5261 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_context_save.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_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 */
;/** */
@@ -26,46 +26,37 @@
EXTERN _tx_execution_isr_enter
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A7/IAR */
;/* 6.3.0 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* 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_fiq_context_save(VOID)
@@ -86,7 +77,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -101,7 +92,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -117,38 +108,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -161,7 +152,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -181,18 +172,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_end.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_end.s
index fe49fea3..d9e92fc4 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_end.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_end.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 */
;/** */
@@ -24,57 +24,48 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -91,7 +82,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_start.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_start.s
index 75e6b0d7..bde34045 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_start.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_fiq_nesting_start.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 */
;/** */
@@ -23,51 +23,42 @@ FIQ_DISABLE EQU 0x40 ; FIQ disable bit
MODE_MASK EQU 0x1F ; Mode mask
SYS_MODE_BITS EQU 0x1F ; System mode bits
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_control.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_control.s
index 94c42a69..1840fb85 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_control.s
+++ b/ports_module/cortex_a7/iar/module_manager/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,45 +28,36 @@ FIQ_MASK EQU 0x40 ; Interrupt bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A7/IAR */
;/* 6.3.0 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* 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)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_disable.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_disable.s
index 1bbbe754..f965666f 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_disable.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_disable.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 */
;/** */
@@ -21,44 +21,35 @@
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
@@ -81,7 +72,7 @@ _tx_thread_interrupt_disable
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
#else
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
#endif
BX lr ; Return to caller
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_restore.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_restore.s
index 65df8b7e..6292bbd6 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_restore.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_interrupt_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 */
;/** */
@@ -25,45 +25,36 @@ IRQ_MASK EQU 0x80 ; Interrupt bit mask
FIQ_MASK EQU 0x40 ; Interrupt bit mask
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_end.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_end.s
index cbee12f2..ac26b693 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_end.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_end.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 */
;/** */
@@ -27,59 +27,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -96,7 +87,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_start.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_start.s
index 96a7fed4..3c7a5ec1 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_start.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_irq_nesting_start.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 */
;/** */
@@ -26,51 +26,42 @@ MODE_MASK EQU 0x1F ; Mode mask
SYS_MODE_BITS EQU 0x1F ; System mode bits
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_schedule.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_schedule.s
index 4b92a25b..3b446f04 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_schedule.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_schedule.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
EXTERN _tx_thread_execute_ptr
@@ -26,7 +26,7 @@
#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
EXTERN _tx_execution_thread_enter
#endif
-
+
IRQ_MODE EQU 0xD2 ; IRQ mode
USR_MODE EQU 0x10 ; USR mode
SVC_MODE EQU 0x13 ; SVC mode
@@ -38,7 +38,7 @@ IRQ_MASK EQU 0x80 ; Interrupt bit mask
FIQ_MASK EQU 0x40 ; Interrupt bit mask
#endif
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
THUMB_MASK EQU 0x20 ; Thumb bit mask
EXTERN _txm_system_mode_enter
@@ -47,48 +47,39 @@ THUMB_MASK EQU 0x20 ; Thumb bit mask
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A7/MMU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A7/MMU/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* Scott Larson, 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 */
-;/* */
-;/* None */
-;/* */
-;/* 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 */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* 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 */
+;/* */
+;/* None */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* 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)
@@ -161,11 +152,11 @@ _tx_handler_svc_unrecognized
BKPT 0x0000
_tx_handler_svc_unrecognized_loop ; We should never get here
B _tx_handler_svc_unrecognized_loop
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SVC 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; At this point we have an SVC 1, which means we are entering
+ ; At this point we have an SVC 1, which means we are entering
; supervisor mode to service a kernel call.
_tx_handler_svc_super_enter
; Make sure that we have been called from the system mode enter location (security)
@@ -213,7 +204,7 @@ _tx_handler_svc_super_enter
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
@@ -228,7 +219,7 @@ _tx_handler_svc_super_enter
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SVC 2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; At this point we have an SVC 2, which means we are exiting
+ ; At this point we have an SVC 2, which means we are exiting
; supervisor mode after servicing a kernel call.
_tx_handler_svc_super_exit:
; Make sure that we have been called from the system mode exit location (security)
@@ -266,14 +257,14 @@ _tx_handler_svc_super_exit:
LDRD r0, r1, [r2, #0xB4] ; Load the module thread stack start and end
STRD r0, r1, [r2, #0x0C] ; Set stack start and end
#endif
-
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ARM Semihosting
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
_tx_handler_svc_arm
-
+
; *** TODO: handle semihosting requests or ARM angel requests ***
-
+
; Restore the registers and return
#if defined(THUMB_MODE)
POP {r0-r3, r12, lr}
@@ -282,7 +273,7 @@ _tx_handler_svc_arm
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
@@ -303,8 +294,8 @@ _tx_handler_svc_schedule
POP {r0-r3, r12, lr} ; Restore the registers
- ; This code waits for a thread control block pointer to appear in
- ; the _tx_thread_execute_ptr variable. Once a thread pointer appears
+ ; This code 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.
;
; /* Enable interrupts. */
@@ -407,10 +398,10 @@ __tx_thread_schedule_loop
; test address translation
;mcr p15, 0, r0, c7, c8, 0
-
+
_tx_skip_mmu_update
; **************************************************************************
-
+
CMP r4, #0 ; Check for synchronous context switch
BEQ _tx_solicited_return
@@ -442,7 +433,7 @@ _tx_skip_interrupt_vfp_restore
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
@@ -453,7 +444,7 @@ _tx_skip_interrupt_vfp_restore
_tx_solicited_return
MOV r2, r5 ; Move CPSR to scratch register
CPS #SYS_MODE ; Enter SYS mode
-
+
#ifdef __ARMVFP__
LDR r1, [r0, #144] ; Pickup the VFP enabled flag
CMP r1, #0 ; Is the VFP enabled?
@@ -464,7 +455,7 @@ _tx_solicited_return
VMSR FPSCR, r4 ; Restore FPSCR
_tx_skip_solicited_vfp_restore
#endif
-
+
POP {r4-r11, lr} ; Restore registers
MOV r1, lr ; Copy lr to r1 to preserve across mode change
CPS #SVC_MODE ; Enter SVC mode
@@ -475,7 +466,7 @@ _tx_skip_solicited_vfp_restore
; /* The reason for adding this segment is that IAR's simulator
; may not handle PC-relative instructions correctly in thumb mode.*/
STR lr, [sp, #-8]
- MRS lr, SPSR
+ MRS lr, SPSR
STR lr, [sp, #-4]
SUB lr, sp, #8
RFE lr
@@ -486,7 +477,7 @@ _tx_skip_solicited_vfp_restore
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; End SWI_Handler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
+
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
#ifdef THUMB_MODE
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_stack_build.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_stack_build.s
index fc692efc..09cecfa8 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_stack_build.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_stack_build.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
SVC_MODE EQU 0x13 ; SVC mode
SYS_MODE EQU 0x1F ; SYS mode
@@ -31,47 +31,38 @@ THUMB_MASK EQU 0x20 ; Thumb bit (5) of CPSR/SPSR
EXTERN _tx_thread_schedule
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A7/MMU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A7/MMU/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function builds a stack frame on the supplied thread's stack. */
-;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
-;/* thread_ptr Pointer to thread control blk */
-;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function builds a stack frame on the supplied thread's stack. */
+;/* The stack frame results in a fake interrupt return to the supplied */
+;/* function pointer. */
+;/* */
+;/* INPUT */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* thread_ptr Pointer to thread control blk */
+;/* function_ptr Pointer to return function */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -85,10 +76,10 @@ THUMB_MASK EQU 0x20 ; Thumb bit (5) of CPSR/SPSR
#endif
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A7 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_system_return.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_system_return.s
index 6307c693..f22ca01c 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_system_return.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_system_return.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 */
;/** */
@@ -23,50 +23,41 @@
EXTERN _tx_timer_time_slice
EXTERN _tx_thread_schedule
#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
- EXTERN _tx_execution_thread_exit
+ EXTERN _tx_execution_thread_exit
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_vectored_context_save.s b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_vectored_context_save.s
index a4c6b041..dcd4ed95 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_thread_vectored_context_save.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_thread_vectored_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 */
;/** */
@@ -25,46 +25,37 @@
EXTERN _tx_execution_isr_enter
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A7/IAR */
;/* 6.3.0 */
;/* 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 */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* 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_vectored_context_save(VOID)
@@ -127,7 +118,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -150,12 +141,12 @@ __tx_thread_not_nested_save
#endif
BX lr ; Return to caller
-
+
__tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports_module/cortex_a7/iar/module_manager/src/tx_timer_interrupt.s b/ports_module/cortex_a7/iar/module_manager/src/tx_timer_interrupt.s
index fd2c46b9..8580a4c7 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/tx_timer_interrupt.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/tx_timer_interrupt.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 */
;/** */
;/** Timer */
;/** */
@@ -33,49 +33,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A7/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -105,7 +96,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -223,13 +214,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_alignment_adjust.c b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_alignment_adjust.c
index e22cfc63..e8107c19 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_alignment_adjust.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_alignment_adjust.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -25,45 +26,39 @@
#include "txm_module.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_alignment_adjust Cortex-A7/MMU/IAR */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_alignment_adjust Cortex-A7/MMU/IAR */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function adjusts the alignment and size of the code and data */
-/* section for a given module implementation. */
-/* */
-/* INPUT */
-/* */
-/* code_size Size of the code area (updated) */
-/* code_alignment Code area alignment (updated) */
-/* data_size Size of data area (updated) */
-/* data_alignment Data area alignment (updated) */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Initial thread stack frame */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function adjusts the alignment and size of the code and data */
+/* section for a given module implementation. */
+/* */
+/* INPUT */
+/* */
+/* code_size Size of the code area (updated) */
+/* code_alignment Code area alignment (updated) */
+/* data_size Size of data area (updated) */
+/* data_alignment Data area alignment (updated) */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* Initial thread stack frame */
/* */
/**************************************************************************/
VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble, ULONG *code_size, ULONG *code_alignment, ULONG *data_size, ULONG *data_alignment)
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_external_memory_enable.c b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_external_memory_enable.c
index 08ab19f7..5361822c 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_external_memory_enable.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_external_memory_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -64,12 +65,6 @@ extern ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_EN
/* */
/* _txm_module_manager_external_memory_enable */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
ULONG _txm_level2_page_get(TXM_MODULE_INSTANCE *module_instance, ULONG *page_addr)
{
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_handler.c b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_handler.c
index 94e6e502..46d39bee 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_handler.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_handler.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -71,12 +72,6 @@ TXM_MODULE_MANAGER_FAULT_INFO
/* */
/* Fault handler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_memory_fault_handler(VOID)
{
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_notify.c b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_notify.c
index 32911033..c0a87261 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_notify.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_memory_fault_notify.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -33,51 +34,45 @@ extern VOID (*_txm_module_manager_fault_notify)(TX_THREAD *, TXM_MODULE_INSTA
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_memory_fault_notify Cortex-A7/MMU/IAR */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_memory_fault_notify Cortex-A7/MMU/IAR */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function registers an application callback when/if a memory */
-/* fault occurs. The supplied thread is automatically terminated, but */
-/* any other threads in the same module may still execute. */
-/* */
-/* INPUT */
-/* */
-/* notify_function Memory fault notification */
-/* function, NULL disables. */
-/* */
-/* OUTPUT */
-/* */
-/* status Completion status */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function registers an application callback when/if a memory */
+/* fault occurs. The supplied thread is automatically terminated, but */
+/* any other threads in the same module may still execute. */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* INPUT */
+/* */
+/* notify_function Memory fault notification */
+/* function, NULL disables. */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
UINT _txm_module_manager_memory_fault_notify(VOID (*notify_function)(TX_THREAD *, TXM_MODULE_INSTANCE *))
{
/* Setup notification function. */
_txm_module_manager_fault_notify = notify_function;
-
+
/* Return success. */
return(TX_SUCCESS);
}
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_initialize.c b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_initialize.c
index ad70a286..e76ae60a 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_initialize.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_initialize.c
@@ -1,23 +1,24 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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 */
-/** */
-/** Module Manager */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
#define TX_SOURCE_CODE
@@ -52,50 +53,44 @@ TXM_MODULE_INSTANCE *_txm_asid_table[TXM_ASID_TABLE_LENGTH];
ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_ENTRIES];
/* Module start and end level 2 page tables, 2^10 (1kB) alignment.
- * First set of 4 tables are the master level 2 tables, the rest are for each module.
+ * First set of 4 tables are the master level 2 tables, the rest are for each module.
* Each module needs two L2 tables for code and two L2 tables for data. */
-#pragma data_alignment=1024
+#pragma data_alignment=1024
ULONG _txm_level2_module_page_table[TXM_MAXIMUM_MODULES * 4][TXM_LEVEL_2_PAGE_TABLE_ENTRIES];
/* Module external memory level 2 page tables, 2^10 (1kB) alignment. */
-#pragma data_alignment=1024
+#pragma data_alignment=1024
ULONG _txm_level2_external_page_pool[TXM_LEVEL2_EXTERNAL_POOL_PAGES][TXM_LEVEL_2_PAGE_TABLE_ENTRIES];
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_mm_initialize Cortex-A7/MMU/IAR */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_mm_initialize Cortex-A7/MMU/IAR */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function performs the initial set up of the the A7 MMU. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* Completion Status */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
+/* */
+/* This function performs the initial set up of the the A7 MMU. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
/* */
/**************************************************************************/
UINT _txm_module_manager_mm_initialize(VOID)
@@ -106,53 +101,53 @@ UINT _txm_module_manager_mm_initialize(VOID)
ULONG cp15reg;
UINT user_mode_index;
UINT counter_limit;
-
+
/* Clear ASID table. */
for (i = 0; i < TXM_ASID_TABLE_LENGTH; i++)
{
_txm_asid_table[i] = 0;
}
_txm_asid_table[0] = (TXM_MODULE_INSTANCE *)TXM_ASID_RESERVED;
-
-
+
+
/********************************************************************************/
/* This is an example showing how to set up the cache attributes. */
/********************************************************************************/
/*******************************************************************************
-* PAGE TABLE generation
-* Generate the page tables
-* Build a flat translation table for the whole address space.
-* ie: Create 4096 1MB sections from 0x000xxxxx to 0xFFFxxxxx
+* PAGE TABLE generation
+* Generate the page tables
+* Build a flat translation table for the whole address space.
+* ie: Create 4096 1MB sections from 0x000xxxxx to 0xFFFxxxxx
* 31 20|19 18|17|16| 15|14 12|11 10|9|8 5|4 |3 2|1 0|
* |base address | 0 0|nG| S|AP2|TEX |AP |P|Domain|XN|CB |1 0|
*
-* Bits[31:20] - Top 12 bits of VA is pointer into table
+* Bits[31:20] - Top 12 bits of VA is pointer into table
* nG[17]=0 - Non global, enables matching against ASID in the TLB when set.
* S[16]=0 - Indicates normal memory is shared when set.
-* AP2[15]=0
+* AP2[15]=0
* TEX[14:12]=000
-* AP[11:10]=11 - Configure for full read/write access in all modes
+* AP[11:10]=11 - Configure for full read/write access in all modes
* IMPP[9]=0 - Ignored
* Domain[5:8]=1111 - Set all pages to use domain 15
* XN[4]=0 - Execute never disabled
-* CB[3:2]= 00 - Set attributes to Strongly-ordered memory.
-* (except for the descriptor where code segment is based,
-* see below)
-* Bits[1:0]=10 - Indicate entry is a 1MB section
+* CB[3:2]= 00 - Set attributes to Strongly-ordered memory.
+* (except for the descriptor where code segment is based,
+* see below)
+* Bits[1:0]=10 - Indicate entry is a 1MB section
*******************************************************************************/
/* ---- Parameter setting to level1 descriptor (bits 19:0) ---- */
-/* setting for Strongly-ordered memory
+/* setting for Strongly-ordered memory
B-00000000000000000000010111100010 */
#define TTB_PARA_STRGLY 0x05E2
-/* setting for Outer and inner not cache normal memory
+/* setting for Outer and inner not cache normal memory
B-00000000000000000001010111100010 */
#define TTB_PARA_NORMAL_NOT_CACHE 0x15E2
-/* setting for Outer and inner write back, write allocate normal memory
- (Cacheable)
+/* setting for Outer and inner write back, write allocate normal memory
+ (Cacheable)
B-00000000000000000001010111101110 */
#define TTB_PARA_NORMAL_CACHE 0x15EE //0x15EE
@@ -170,98 +165,98 @@ UINT _txm_module_manager_mm_initialize(VOID)
#define M_SIZE_RAM_M 10 /* [Area10] Internal RAM (mirror) */
#define M_SIZE_IO_2 2550 /* [Area11] I/O area 2 */
/* Should add to: 4096 */
-
+
counter_limit = M_SIZE_NOR;
for (i = 0; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_SDRAM;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_CS45;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_SPI;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_RAM;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_CACHE;
}
-
+
counter_limit += M_SIZE_IO_1;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_NOR_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_SDRAM_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_CS45_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
counter_limit += M_SIZE_SPI_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_RAM_M;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_NORMAL_NOT_CACHE;
}
-
+
counter_limit += M_SIZE_IO_2;
for (; i < counter_limit; i++)
{
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = (i << TXM_MMU_LEVEL1_PAGE_SHIFT) | TTB_PARA_STRGLY;
}
-
+
/********************************************************************************/
/* This is the end of the example showing how to set up the cache attributes. */
/********************************************************************************/
-
-
+
+
/* Clear ASID. */
cp15reg = 0;
asm volatile ("mcr p15, 0, %0, c13, c0, 1" : : "r"(cp15reg) : );
asm("isb");
-
+
/* Put the page table address in TTBR. */
cp15reg = (int)(VOID*)_txm_ttbr1_page_table;
cp15reg |= TTBR0_ATTRIBUTES;
asm volatile ("mcr p15, 0, %0, c2, c0, 0" : : "r"(cp15reg) : );
-
+
/* Set the domain to client mode. */
cp15reg = DACR_CLIENT_MODE;
asm volatile ("mcr p15, 0, %0, c3, c0, 0" : : "r"(cp15reg) : );
-
+
/* Level 2 small page attributes: normal memory, cache & buffer enabled, priviledged access. */
#define TTB_LEVEL2_NORMAL_CACHE 0x05E
@@ -271,7 +266,7 @@ UINT _txm_module_manager_mm_initialize(VOID)
/* Attributes for user mode table entry in level 2 table. */
#define TTB_LEVEL2_USER_MODE_ENTRY 0x06E
-
+
/* Set up Level 2 table for user to kernel mode entry trampoline. */
/* Find which table entry _txm_module_manager_user_mode_entry is in. */
user_mode_index = (ULONG)_txm_module_manager_user_mode_entry >> TXM_MMU_LEVEL1_PAGE_SHIFT;
@@ -280,21 +275,21 @@ UINT _txm_module_manager_mm_initialize(VOID)
{
_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][i] = ((ULONG)_txm_module_manager_user_mode_entry & TXM_MMU_LEVEL1_MASK) | (i << TXM_MMU_LEVEL2_PAGE_SHIFT) | TTB_LEVEL2_NORMAL_CACHE;
}
-
+
/* Enter Level 2 table in to master table. */
_txm_ttbr1_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] = ((ULONG)_txm_level2_module_page_table & TXM_MMU_LEVEL1_SECOND_MASK) | TXM_MMU_LEVEL1_SECOND_ATTRIBUTES;
-
+
/* Find level 2 entry that holds _txm_module_manager_user_mode_entry. */
user_mode_index = ((ULONG)_txm_module_manager_user_mode_entry & ~TXM_MMU_LEVEL1_MASK) >> TXM_MMU_LEVEL2_PAGE_SHIFT;
-
+
/* Set attribute bits for the user mode entry page. */
_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] = (_txm_level2_module_page_table[TXM_MASTER_PAGE_TABLE_INDEX][user_mode_index] & TTB_LEVEL2_AP_CLEAR_MASK) | TTB_LEVEL2_USER_MODE_ENTRY;
-
+
/* Enable the MMU. */
asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r"(cp15reg) : : );
cp15reg |= 0x1;
asm volatile ("mcr p15, 0, %0, c1, c0, 0" : : "r"(cp15reg) : );
-
+
return(TX_SUCCESS);
#else
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_register_setup.c
index 1a394c05..3d477a4a 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* 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
**************************************************************************/
@@ -61,12 +62,6 @@ extern ULONG _txm_ttbr1_page_table[TXM_MAXIMUM_MODULES][TXM_MASTER_PAGE_TABLE_EN
/* */
/* TXM_MODULE_MANAGER_DATA_POINTER_CHECK */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_inside_data_check(ULONG pointer)
{
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_thread_stack_build.s b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_thread_stack_build.s
index f0018aa0..cedcb217 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_thread_stack_build.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_thread_stack_build.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Module Manager */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Module Manager */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
THUMB_MASK EQU 0x20 ; Thumb bit (5) of CPSR/SPSR
@@ -29,47 +29,38 @@ CPSR_MASK EQU 0xDF ; Mask initial CPSR, IRQ & FIQ i
CPSR_MASK EQU 0x9F ; Mask initial CPSR, IRQ ints enabled
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _txm_module_manager_thread_stack_build Cortex-A7/MMU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _txm_module_manager_thread_stack_build Cortex-A7/MMU/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function builds a stack frame on the supplied thread's stack. */
-;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
-;/* thread_ptr Pointer to thread control blk */
-;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function builds a stack frame on the supplied thread's stack. */
+;/* The stack frame results in a fake interrupt return to the supplied */
+;/* function pointer. */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* INPUT */
+;/* */
+;/* thread_ptr Pointer to thread control blk */
+;/* function_ptr Pointer to return function */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _txm_module_manager_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(TX_THREAD *, TXM_MODULE_INSTANCE *))
@@ -86,7 +77,7 @@ _txm_module_manager_thread_stack_build
;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A7 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; r0 Initial value for r0
diff --git a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_user_mode_entry.s b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_user_mode_entry.s
index c3eb43da..f25a5ea0 100644
--- a/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_user_mode_entry.s
+++ b/ports_module/cortex_a7/iar/module_manager/src/txm_module_manager_user_mode_entry.s
@@ -1,66 +1,57 @@
;/***************************************************************************
-; * 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 */
-;/** */
-;/** Module Manager */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Module Manager */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
EXTERN _txm_module_manager_kernel_dispatch
-
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* tx Cortex-A7/MMU/IAR */
+
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* tx Cortex-A7/MMU/IAR */
;/* 6.3.0 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function allows modules to enter kernel mode. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* SVC 1 Enter kernel mode */
-;/* SVC 2 Exit kernel mode */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Modules in user mode */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* DESCRIPTION */
+;/* */
+;/* This function allows modules to enter kernel mode. */
+;/* */
+;/* INPUT */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
-;/* 10-31-2023 Yajun Xia Modified comment(s), */
-;/* Added thumb mode support, */
-;/* resulting in version 6.3.0 */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* SVC 1 Enter kernel mode */
+;/* SVC 2 Exit kernel mode */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Modules in user mode */
;/* */
;/**************************************************************************/
RSEG .text:CODE:NOROOT(2)
@@ -100,10 +91,10 @@ _txm_system_mode_exit
BX lr ; Return to the caller
NOP
NOP
-
+
; Fill up 4kB page.
SECTION page_align:CONST:ROOT(2)
-
+
_txm_module_manager_user_mode_end
-
+
END