summaryrefslogtreecommitdiff
path: root/ports_module/cortex_m33/gnu
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_m33/gnu
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_m33/gnu')
-rw-r--r--ports_module/cortex_m33/gnu/example_build/gcc_setup.s15
-rw-r--r--ports_module/cortex_m33/gnu/example_build/sample_threadx_module.c62
-rw-r--r--ports_module/cortex_m33/gnu/example_build/sample_threadx_module_manager.c18
-rw-r--r--ports_module/cortex_m33/gnu/example_build/txm_module_preamble.S3
-rw-r--r--ports_module/cortex_m33/gnu/inc/tx_port.h40
-rw-r--r--ports_module/cortex_m33/gnu/inc/tx_secure_interface.h13
-rw-r--r--ports_module/cortex_m33/gnu/inc/txm_module_port.h17
-rw-r--r--ports_module/cortex_m33/gnu/module_lib/src/txm_module_thread_shell_entry.c21
-rw-r--r--ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_allocate.c13
-rw-r--r--ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_free.c13
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/inc/txm_module_manager_dispatch_port.h7
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_initialize_low_level.S15
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_restore.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_save.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_control.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_disable.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_restore.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S37
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack.c22
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_allocate.S13
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_free.S13
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_initialize.S17
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_stack_build.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_thread_system_return.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/tx_timer_interrupt.s14
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_allocate.c21
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_free.c21
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_alignment_adjust.c15
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_external_memory_enable.c39
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c17
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c15
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c28
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_port_dispatch.c19
-rw-r--r--ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_thread_stack_build.s14
34 files changed, 213 insertions, 427 deletions
diff --git a/ports_module/cortex_m33/gnu/example_build/gcc_setup.s b/ports_module/cortex_m33/gnu/example_build/gcc_setup.s
index d7c61892..4a729ffe 100644
--- a/ports_module/cortex_m33/gnu/example_build/gcc_setup.s
+++ b/ports_module/cortex_m33/gnu/example_build/gcc_setup.s
@@ -14,7 +14,7 @@ _gcc_setup:
mov r5,r0
/* Copy GOT table. */
-
+
ldr r0, =__got_load_start__
sub r0,r0,r3
add r0,r0,r5
@@ -42,13 +42,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
@@ -59,9 +59,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
@@ -85,10 +85,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. */
@@ -124,4 +124,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_m33/gnu/example_build/sample_threadx_module.c b/ports_module/cortex_m33/gnu/example_build/sample_threadx_module.c
index 52557312..b74d7a35 100644
--- a/ports_module/cortex_m33/gnu/example_build/sample_threadx_module.c
+++ b/ports_module/cortex_m33/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 MPU 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", (UCHAR*)demo_module_pool_space, DEMO_BYTE_POOL_SIZE);
@@ -129,42 +129,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. */
@@ -172,23 +172,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. */
@@ -233,7 +233,7 @@ void thread_0_entry(ULONG thread_input)
UINT status;
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
@@ -243,7 +243,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);
@@ -291,19 +291,19 @@ UINT status;
{
/* Test memory handler. */
*(ULONG *)0x20010000 = 0xCDCDCDCD;
-
-
+
+
/* 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++;
}
@@ -362,7 +362,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. */
@@ -415,7 +415,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_m33/gnu/example_build/sample_threadx_module_manager.c b/ports_module/cortex_m33/gnu/example_build/sample_threadx_module_manager.c
index 19add3d8..de0910d5 100644
--- a/ports_module/cortex_m33/gnu/example_build/sample_threadx_module_manager.c
+++ b/ports_module/cortex_m33/gnu/example_build/sample_threadx_module_manager.c
@@ -54,8 +54,8 @@ void tx_application_define(void *first_unused_memory)
CHAR *pointer = (CHAR*)first_unused_memory;
- tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
pointer = pointer + DEMO_STACK_SIZE;
}
@@ -75,22 +75,22 @@ void module_manager_entry(ULONG thread_input)
/* Register a fault handler. */
txm_module_manager_memory_fault_notify(module_fault_handler);
-
+
/* Load the module that is already there, in this example it is placed there by the multiple image download. */
txm_module_manager_memory_load(&my_module, "my module", (VOID *) 0x00030000);
-
+
/* Enable 128 byte read/write shared memory region at 0x20010000. */
txm_module_manager_external_memory_enable(&my_module, (void *) 0x20010000, 128, TXM_MODULE_ATTRIBUTE_READ_WRITE);
-
+
/* Start the module. */
txm_module_manager_start(&my_module);
/* Sleep for a while.... */
tx_thread_sleep(1000);
-
+
/* Stop the module. */
txm_module_manager_stop(&my_module);
-
+
/* Unload the module. */
txm_module_manager_unload(&my_module);
@@ -99,11 +99,11 @@ void module_manager_entry(ULONG thread_input)
/* Start the module again. */
txm_module_manager_start(&my_module);
-
+
/* Now just spin... */
while(1)
{
-
+
tx_thread_sleep(100);
}
}
diff --git a/ports_module/cortex_m33/gnu/example_build/txm_module_preamble.S b/ports_module/cortex_m33/gnu/example_build/txm_module_preamble.S
index a9413251..5f663569 100644
--- a/ports_module/cortex_m33/gnu/example_build/txm_module_preamble.S
+++ b/ports_module/cortex_m33/gnu/example_build/txm_module_preamble.S
@@ -1,6 +1,7 @@
.text
.align 4
.syntax unified
+ .section .preamble, "ax"
/* Define public symbols. */
.global __txm_module_preamble
@@ -32,7 +33,7 @@ __txm_module_preamble:
// 1 -> User mode execution
.dc.l _txm_module_thread_shell_entry - . - 0 // Module Shell Entry Point
.dc.l demo_module_start - . - 0 // 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 1024 // Module Start/Stop Thread Stack Size
.dc.l _txm_module_callback_request_thread_entry - . - 0 // Module Callback Thread Entry
diff --git a/ports_module/cortex_m33/gnu/inc/tx_port.h b/ports_module/cortex_m33/gnu/inc/tx_port.h
index 7358ef1b..9adb6f01 100644
--- a/ports_module/cortex_m33/gnu/inc/tx_port.h
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -45,37 +46,6 @@
/* This file replaces the previous Cortex-M33 files. It unifies */
/* the Cortex-M33 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -705,7 +675,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M33 Version 6.4.2 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M33 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports_module/cortex_m33/gnu/inc/tx_secure_interface.h b/ports_module/cortex_m33/gnu/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports_module/cortex_m33/gnu/inc/tx_secure_interface.h
+++ b/ports_module/cortex_m33/gnu/inc/tx_secure_interface.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
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports_module/cortex_m33/gnu/inc/txm_module_port.h b/ports_module/cortex_m33/gnu/inc/txm_module_port.h
index 37a644d8..c48d5184 100644
--- a/ports_module/cortex_m33/gnu/inc/txm_module_port.h
+++ b/ports_module/cortex_m33/gnu/inc/txm_module_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
**************************************************************************/
@@ -35,14 +36,6 @@
/* This file defines the basic module constants, interface structures, */
/* and function prototypes. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* 01-31-2022 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TXM_MODULE_PORT_H
@@ -350,6 +343,6 @@ ALIGN_TYPE _txm_module_manager_port_dispatch(TXM_MODULE_INSTANCE *module_instanc
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-M33/GNU Version 6.4.2 *";
+ "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-M33/GNU Version 6.5.0.202601 *";
#endif
diff --git a/ports_module/cortex_m33/gnu/module_lib/src/txm_module_thread_shell_entry.c b/ports_module/cortex_m33/gnu/module_lib/src/txm_module_thread_shell_entry.c
index 9d2e676b..0fa4f2de 100644
--- a/ports_module/cortex_m33/gnu/module_lib/src/txm_module_thread_shell_entry.c
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -86,12 +87,6 @@ extern VOID _gcc_setup(TXM_MODULE_INSTANCE *);
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_ENTRY_INFO *thread_info)
{
@@ -107,14 +102,14 @@ VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_EN
{
/* Initialize the GNU C environment. */
_gcc_setup(thread_info -> txm_module_thread_entry_info_code_base_address);
-
+
/* Save the entry info pointer, for later use. */
_txm_module_entry_info = thread_info;
-
+
/* Save the kernel function dispatch address. This is used to make all resident calls from
the module. */
_txm_module_kernel_call_dispatcher = thread_info -> txm_module_thread_entry_info_kernel_call_dispatcher;
-
+
/* Ensure that we have a valid pointer. */
while (!_txm_module_kernel_call_dispatcher)
{
@@ -122,7 +117,7 @@ VOID _txm_module_thread_shell_entry(TX_THREAD *thread_ptr, TXM_MODULE_THREAD_EN
An error here typically indicates the resident portion of _tx_thread_schedule
is not supporting the trap to obtain the function pointer. */
}
-
+
/* Resume the module's callback thread, already created in the manager. */
_txe_thread_resume(thread_info -> txm_module_thread_entry_info_callback_request_thread);
}
diff --git a/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_allocate.c b/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_allocate.c
index 91d90f1f..dc8297c4 100644
--- a/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_allocate.c
+++ b/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_allocate.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
**************************************************************************/
@@ -56,12 +57,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
diff --git a/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_free.c b/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_free.c
index 56d9718b..17e7a4da 100644
--- a/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_free.c
+++ b/ports_module/cortex_m33/gnu/module_lib/src/txm_thread_secure_stack_free.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
**************************************************************************/
@@ -54,12 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
diff --git a/ports_module/cortex_m33/gnu/module_manager/inc/txm_module_manager_dispatch_port.h b/ports_module/cortex_m33/gnu/module_manager/inc/txm_module_manager_dispatch_port.h
index 8bbcd5b3..0575c748 100644
--- a/ports_module/cortex_m33/gnu/module_manager/inc/txm_module_manager_dispatch_port.h
+++ b/ports_module/cortex_m33/gnu/module_manager/inc/txm_module_manager_dispatch_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
**************************************************************************/
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_initialize_low_level.S b/ports_module/cortex_m33/gnu/module_manager/src/tx_initialize_low_level.S
index 49415774..c89394c2 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_initialize_low_level.S
+++ b/ports_module/cortex_m33/gnu/module_manager/src/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
**************************************************************************/
@@ -62,14 +63,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_restore.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_restore.s
index 6adf027c..9ac66244 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_restore.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_save.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_save.s
index 01a8f2b0..71d42cde 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_context_save.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_control.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_control.s
index 082f1af0..b9083160 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_control.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -50,13 +51,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_disable.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_disable.s
index 779e5a76..c27e7362 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_disable.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -50,13 +51,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_restore.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_restore.s
index dc3d6ad7..506ddf52 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_interrupt_restore.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -50,13 +51,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S
index e392380b..16913f57 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -56,28 +57,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* 04-02-2021 Scott Larson Modified comments and fixed */
-/* MPU region configuration, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Fixed extended stack handling */
-/* when calling kernel APIs, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Optimized MPU configuration, */
-/* added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Removed the code path to skip */
-/* MPU reloading, */
-/* resulting in version 6.1.12 */
-/* 10-31-2022 Scott Larson Added low power support, */
-/* resulting in version 6.2.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -541,7 +520,7 @@ SVC_Handler:
ORREQ lr, lr, #0x10 // Set bit, return with standard frame
STR r3, [r2, #0xB0] // Save thread stack pointer
BIC r3, #1 // Clear possibly OR'd bit
-
+
/* Build kernel stack by copying thread stack two registers at a time */
ADD r3, r3, #32 // Start at bottom of hardware stack
LDMDB r3!, {r1-r2}
@@ -647,20 +626,20 @@ _tx_svc_secure_alloc:
CMP r1, r2 // Did we come from _tx_thread_secure_stack_allocate?
IT NE // If no (not equal), then...
BXNE lr // return from where we came.
-
+
PUSH {r0, lr} // Save SP and EXC_RETURN
LDM r0, {r0-r3} // Load function parameters from stack
BL _tx_thread_secure_mode_stack_allocate
POP {r12, lr} // Restore SP and EXC_RETURN
STR r0, [r12] // Store function return value
BX lr
-
+
_tx_svc_secure_free:
LDR r2, =_tx_free_return // Load address of where we should have come from
CMP r1, r2 // Did we come from _tx_thread_secure_stack_free?
IT NE // If no (not equal), then...
BXNE lr // return from where we came.
-
+
PUSH {r0, lr} // Save SP and EXC_RETURN
LDM r0, {r0-r3} // Load function parameters from stack
BL _tx_thread_secure_mode_stack_free
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack.c b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack.c
index ac0e90a1..82acdfbb 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack.c
+++ b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack.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
**************************************************************************/
@@ -98,21 +99,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* disable optimizations, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry, optimize(0)))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_allocate.S b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_allocate.S
index 1509327e..3a59c6e3 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_allocate.S
+++ b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_allocate.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
**************************************************************************/
@@ -52,12 +53,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_free.S b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_free.S
index 11b299f1..7e2e1ea5 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_free.S
+++ b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_free.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
**************************************************************************/
@@ -50,12 +51,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_initialize.S b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_initialize.S
index a78b1eec..92f92809 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_initialize.S
+++ b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_secure_stack_initialize.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
**************************************************************************/
@@ -50,16 +51,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_stack_build.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_stack_build.s
index e7ef020c..370a18da 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_stack_build.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -52,13 +53,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_system_return.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_system_return.s
index 6bda9b54..95d8678f 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_system_return.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -52,13 +53,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_timer_interrupt.s b/ports_module/cortex_m33/gnu/module_manager/src/tx_timer_interrupt.s
index 2611dbf9..8acc0744 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/tx_timer_interrupt.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -53,13 +54,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_allocate.c b/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_allocate.c
index d6f061c2..344e5fd9 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_allocate.c
+++ b/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_allocate.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
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_free.c b/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_free.c
index aa452180..76832975 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_free.c
+++ b/ports_module/cortex_m33/gnu/module_manager/src/txe_thread_secure_stack_free.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 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_alignment_adjust.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_alignment_adjust.c
index 718fa052..76c52f02 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_alignment_adjust.c
+++ b/ports_module/cortex_m33/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-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble,
ULONG *code_size,
@@ -77,7 +72,7 @@ VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble,
/* Round code and data size UP to TXM_MODULE_MPU_ALIGNMENT bytes. */
*code_size = (*code_size + TXM_MODULE_MPU_ALIGNMENT - 1) & ~(TXM_MODULE_MPU_ALIGNMENT - 1);
*data_size = (*data_size + TXM_MODULE_MPU_ALIGNMENT - 1) & ~(TXM_MODULE_MPU_ALIGNMENT - 1);
-
+
/* Alignment for code and data is TXM_MODULE_MPU_ALIGNMENT bytes. */
*code_alignment = TXM_MODULE_MPU_ALIGNMENT;
*data_alignment = TXM_MODULE_MPU_ALIGNMENT;
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_external_memory_enable.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_external_memory_enable.c
index 4a860702..6e78d96d 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_external_memory_enable.c
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_external_memory_enable(TXM_MODULE_INSTANCE *module_instance,
VOID *start_address,
@@ -105,7 +100,7 @@ ULONG shared_index;
/* Invalid module pointer. */
return(TX_PTR_ERROR);
}
-
+
/* Determine if the module instance is in the loaded state. */
if (module_instance -> txm_module_instance_state != TXM_MODULE_LOADED)
{
@@ -115,49 +110,49 @@ ULONG shared_index;
/* Return error if the module is not ready. */
return(TX_START_ERROR);
}
-
+
/* Determine if there are shared memory entries available. */
if(module_instance -> txm_module_instance_shared_memory_count >= TXM_MODULE_MPU_SHARED_ENTRIES)
{
/* Release the protection mutex. */
_tx_mutex_put(&_txm_module_manager_mutex);
-
+
/* No more entries available. */
return(TX_NO_MEMORY);
}
-
+
/* Start address must adhere to Cortex-M33 MPU alignment. */
address = (ULONG) start_address;
if(address != (address & ~(TXM_MODULE_MPU_ALIGNMENT - 1)))
{
/* Release the protection mutex. */
_tx_mutex_put(&_txm_module_manager_mutex);
-
+
/* Return alignment error. */
return(TXM_MODULE_ALIGNMENT_ERROR);
}
-
+
/* At this point, we have a valid address. Set up MPU registers. */
-
+
/* Pick up index into shared memory entries. */
shared_index = TXM_MODULE_MPU_SHARED_INDEX + module_instance -> txm_module_instance_shared_memory_count;
-
+
/* Set base address register with start address, sanitized attributes and execute never. */
module_instance -> txm_module_instance_mpu_registers[shared_index].txm_module_mpu_region_base_address = address | (attributes & TXM_MODULE_ATTRIBUTE_MASK) | TXM_MODULE_ATTRIBUTE_EXECUTE_NEVER;
-
+
/* Set the limit address (data start + length-1), attribute index, and enable bit. */
module_instance -> txm_module_instance_mpu_registers[shared_index].txm_module_mpu_region_limit_address = (address + length-1) | TXM_MODULE_ATTRIBUTE_INDEX | TXM_MODULE_ATTRIBUTE_REGION_ENABLE;
-
+
/* Keep track of shared memory address and length in module instance. */
module_instance -> txm_module_instance_shared_memory_address[module_instance -> txm_module_instance_shared_memory_count] = address;
module_instance -> txm_module_instance_shared_memory_length[module_instance -> txm_module_instance_shared_memory_count] = length;
-
+
/* Increment counter. */
module_instance -> txm_module_instance_shared_memory_count++;
-
+
/* Release the protection mutex. */
_tx_mutex_put(&_txm_module_manager_mutex);
-
+
/* Return success. */
return(TX_SUCCESS);
}
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c
index 7bd60c88..8048fa57 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_handler.c
+++ b/ports_module/cortex_m33/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-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_memory_fault_handler(VOID)
{
@@ -89,7 +84,7 @@ TX_THREAD *thread_ptr;
/* Initialize the module instance pointer to NULL. */
module_instance_ptr = TX_NULL;
-
+
/* Is there a thread? */
if (thread_ptr)
{
@@ -99,7 +94,7 @@ TX_THREAD *thread_ptr;
/* Terminate the current thread. */
_tx_thread_terminate(_tx_thread_current_ptr);
}
-
+
/* Determine if there is a user memory fault notification callback. */
if (_txm_module_manager_fault_notify)
{
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c
index 9be0809a..12976ffe 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_memory_fault_notify.c
+++ b/ports_module/cortex_m33/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,18 +67,12 @@ extern VOID (*_txm_module_manager_fault_notify)(TX_THREAD *, TXM_MODULE_INSTA
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
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_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
index 53ae5fcf..b7dba686 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* _txm_module_manager_thread_create */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 12-31-2020 Scott Larson Initial Version 6.1.3 */
-/* 04-02-2021 Scott Larson Modified comments and check */
-/* for overflow, */
-/* resulting 6.1.6 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_mm_register_setup(TXM_MODULE_INSTANCE *module_instance)
{
@@ -94,27 +86,27 @@ ULONG callback_stack_size;
/* Set base address register to module data address, which should be at least 32-byte aligned.
Mask address to proper range, inner shareable, read write, execute never. */
module_instance -> txm_module_instance_mpu_registers[TXM_MODULE_MPU_DATA_INDEX].txm_module_mpu_region_base_address = ((ULONG) module_instance -> txm_module_instance_data_start & 0xFFFFFFE0) | TXM_MODULE_ATTRIBUTE_INNER_SHAREABLE | TXM_MODULE_ATTRIBUTE_READ_WRITE | TXM_MODULE_ATTRIBUTE_EXECUTE_NEVER;
-
+
/* Adjust the size of the module elements to be aligned to the default alignment. We do this
so that when we partition the allocated memory, we can simply place these regions right beside
each other without having to align their pointers. Note this only works when they all have
the same alignment. */
-
+
data_size = module_instance -> txm_module_instance_preamble_ptr -> txm_module_preamble_data_size;
start_stop_stack_size = module_instance -> txm_module_instance_preamble_ptr -> txm_module_preamble_start_stop_stack_size;
callback_stack_size = module_instance -> txm_module_instance_preamble_ptr -> txm_module_preamble_callback_stack_size;
-
+
data_size = ((data_size + TXM_MODULE_DATA_ALIGNMENT - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT;
start_stop_stack_size = ((start_stop_stack_size + TXM_MODULE_DATA_ALIGNMENT - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT;
callback_stack_size = ((callback_stack_size + TXM_MODULE_DATA_ALIGNMENT - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT;
/* Update the data size to include thread stacks. */
data_size = data_size + start_stop_stack_size + callback_stack_size;
-
+
/* Set the limit address (data start + data size-1), attribute index, and enable bit. */
module_instance -> txm_module_instance_mpu_registers[TXM_MODULE_MPU_DATA_INDEX].txm_module_mpu_region_limit_address = (((ULONG) module_instance -> txm_module_instance_data_start + data_size - 1) & 0xFFFFFFE0) | TXM_MODULE_ATTRIBUTE_INDEX | TXM_MODULE_ATTRIBUTE_REGION_ENABLE;
/* End of module data protection. */
-
+
/* Remaining MPU entries are disabled for now and can be used for shared memory. */
}
@@ -173,7 +165,7 @@ ALIGN_TYPE shared_memory_address_end;
{
return(TX_FALSE);
}
-
+
/* Check if the object is inside the module data. */
if ((obj_ptr >= (ALIGN_TYPE) module_instance -> txm_module_instance_data_start) &&
((obj_ptr + obj_size) <= ((ALIGN_TYPE) module_instance -> txm_module_instance_data_end + 1)))
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_port_dispatch.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_port_dispatch.c
index 1c774a1c..6f0f16e3 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_port_dispatch.c
+++ b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_port_dispatch.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 @@
/* */
/* _txm_module_manager_kernel_dispatch */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
ALIGN_TYPE _txm_module_manager_port_dispatch(TXM_MODULE_INSTANCE *module_instance, ULONG kernel_request, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
{
@@ -88,7 +83,7 @@ ALIGN_TYPE return_value = TX_NOT_AVAILABLE;
);
break;
}
-
+
case TXM_THREAD_SECURE_STACK_FREE_CALL:
{
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
@@ -102,13 +97,13 @@ ALIGN_TYPE return_value = TX_NOT_AVAILABLE;
);
break;
}
-
+
default:
{
/* Unhandled kernel request, return an error! */
break;
}
}
-
+
return(return_value);
}
diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_thread_stack_build.s b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_thread_stack_build.s
index eebe10ad..6c3e0275 100644
--- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_thread_stack_build.s
+++ b/ports_module/cortex_m33/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
**************************************************************************/
@@ -54,13 +55,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-02-2021 Scott Larson Initial Version 6.1.5 */
-/* */
/**************************************************************************/
// VOID _txm_module_manager_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(TX_THREAD *, TXM_MODULE_INSTANCE *))
// {