summaryrefslogtreecommitdiff
path: root/ports_module/cortex_r4
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_r4
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_r4')
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx/.cproject168
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c48
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx/tx_initialize_low_level.S13
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module/.cproject182
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module/sample_threadx_module.c36
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module/semihosting.c6
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/.cproject168
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/module_code.c2
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx.scat12
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx_module_manager.c28
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/startup.S6
-rw-r--r--ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/tx_initialize_low_level.S13
-rw-r--r--ports_module/cortex_r4/ac6/example_build/tx/.cproject162
-rw-r--r--ports_module/cortex_r4/ac6/example_build/txm/.cproject174
-rw-r--r--ports_module/cortex_r4/ac6/inc/tx_port.h96
-rw-r--r--ports_module/cortex_r4/ac6/inc/txm_module_port.h63
-rw-r--r--ports_module/cortex_r4/ac6/module_lib/src/txm_module_initialize.S74
-rw-r--r--ports_module/cortex_r4/ac6/module_lib/src/txm_module_thread_shell_entry.c13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_restore.S21
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_save.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_restore.S19
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_save.S15
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_end.S17
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_start.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_control.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_disable.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_restore.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_end.S15
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_start.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_schedule.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_stack_build.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_system_return.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_thread_vectored_context_save.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/tx_timer_interrupt.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_alignment_adjust.c13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_external_memory_enable.c13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_handler.c13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_notify.c13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c15
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_thread_stack_build.S13
-rw-r--r--ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_user_mode_entry.S15
-rw-r--r--ports_module/cortex_r4/iar/example_build/cstartup.s6
-rw-r--r--ports_module/cortex_r4/iar/example_build/sample_threadx.c48
-rw-r--r--ports_module/cortex_r4/iar/example_build/sample_threadx_module.c64
-rw-r--r--ports_module/cortex_r4/iar/example_build/sample_threadx_module.icf8
-rw-r--r--ports_module/cortex_r4/iar/example_build/sample_threadx_module_manager.c24
-rw-r--r--ports_module/cortex_r4/iar/example_build/tx_initialize_low_level.s198
-rw-r--r--ports_module/cortex_r4/iar/example_build/txm_module_preamble.s18
-rw-r--r--ports_module/cortex_r4/iar/inc/tx_port.h102
-rw-r--r--ports_module/cortex_r4/iar/inc/txm_module_port.h57
-rw-r--r--ports_module/cortex_r4/iar/module_lib/src/txm_module_thread_shell_entry.c13
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_iar.c239
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_restore.s92
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_save.s94
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_control.s78
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_disable.s74
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_restore.s76
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_end.s94
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_start.s88
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_schedule.s142
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_stack_build.s88
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_system_return.s82
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_thread_vectored_context_save.s82
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/tx_timer_interrupt.s90
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_alignment_adjust.c163
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_external_memory_enable.c13
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_handler.c13
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_notify.c85
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c15
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_thread_stack_build.s84
-rw-r--r--ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_user_mode_entry.s84
71 files changed, 1811 insertions, 2092 deletions
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx/.cproject b/ports_module/cortex_r4/ac6/example_build/sample_threadx/.cproject
index 71818fd9..4ceb8982 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx/.cproject
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-
+
<storageModule moduleId="org.eclipse.cdt.core.settings">
-
+
<cconfiguration id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235">
-
+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-
+
<externalSettings/>
-
+
<extensions>
-
+
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
</extensions>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235" name="Debug" parent="com.arm.eclipse.build.config.v6.exe.debug.base">
-
+
<folderInfo id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235." name="/" resourcePath="">
-
+
<toolChain id="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6.804641625" name="Arm Compiler 6" superClass="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.toolchain.v6.base.options.target.cpu_fpu.1862712116" superClass="com.arm.toolchain.v6.base.options.target.cpu_fpu" value="Cortex-R4.VFPv3_D16" valueType="string"/>
-
+
<option id="com.arm.toolchain.v6.base.options.floatabi.601947014" name="Float ABI" superClass="com.arm.toolchain.v6.base.options.floatabi" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.inst.1204023733" name="Instruction set" superClass="com.arm.toolchain.v6.base.options.inst" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.debug.level.818353536" name="Debug Level" superClass="com.arm.toolchain.v6.base.options.debug.level" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<targetPlatform id="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6.804641625.385562723" name=""/>
-
+
<builder autoBuildTarget="all" buildPath="${workspace_loc:/sample_threadx_module_manager}/Debug" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="com.arm.toolchain.v6.builder.1941932380" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="8" superClass="com.arm.toolchain.v6.builder"/>
-
+
<tool id="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6.31312115" name="Arm C Compiler 6" superClass="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.target.1871497465" name="Target (--target)" superClass="com.arm.tool.c.compiler.v6.base.option.target" useByScannerDiscovery="true" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.582298517" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.2077436824" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.floatabi.1440514949" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.c.compiler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.inst.1725781447" name="Instruction set" superClass="com.arm.tool.c.compiler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.incpath.1999415170" name="Include path (-I)" superClass="com.arm.tool.c.compiler.v6.base.option.incpath" useByScannerDiscovery="false" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/inc_port}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/inc_generic}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/inc_generic_modules}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.1853971560" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<inputType id="com.arm.tool.c.compiler.v6.base.input.1194689224" superClass="com.arm.tool.c.compiler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6.1028636576" name="Arm C++ Compiler 6" superClass="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.528092979" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6.2084155435" name="Arm Assembler 6" superClass="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.assembler.v6.base.option.target.1360157853" name="Target (--target)" superClass="com.arm.tool.assembler.v6.base.option.target" useByScannerDiscovery="false" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.cpu.1037858246" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.fpu.1926125524" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.floatabi.8023587" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.assembler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.inst.661293084" name="Instruction set" superClass="com.arm.tool.assembler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.options.debug.level.460302808" name="Debug Level" superClass="com.arm.tool.assembler.v6.base.options.debug.level" useByScannerDiscovery="false" value="com.arm.tool.assembler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.arm.tool.assembler.v6.base.option.incpath.2020985046" name="Include path (-I)" superClass="com.arm.tool.assembler.v6.base.option.incpath" valueType="includePath"/>
-
+
<inputType id="com.arm.tool.assembler.v6.base.input.343891542" superClass="com.arm.tool.assembler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6.831136805" name="Arm Linker 6" superClass="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.linker.option.entry.1475419086" name="Image entry point (--entry)" superClass="com.arm.tool.c.linker.option.entry" useByScannerDiscovery="false" value="Vectors" valueType="string"/>
-
+
<option id="com.arm.tool.c.linker.option.scatter.1811442260" name="Scatter file (--scatter)" superClass="com.arm.tool.c.linker.option.scatter" useByScannerDiscovery="false" value="../sample_threadx.scat" valueType="string"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.arm.tool.c.linker.libs.2083701191" name="User library files" superClass="com.arm.tool.c.linker.libs" useByScannerDiscovery="false" valueType="libs"/>
-
+
<option id="com.arm.tool.c.linker.option.imagemap.1405130028" name="Generate image map (--map)" superClass="com.arm.tool.c.linker.option.imagemap" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
+
<option id="com.arm.tool.c.linker.option.sizes.1951623263" name="List code and data sizes of output image (--info=sizes)" superClass="com.arm.tool.c.linker.option.sizes" useByScannerDiscovery="false" value="false" valueType="boolean"/>
-
+
<option id="com.arm.tool.c.linker.option.redirectoutput.1115886571" name="Redirect diagnostics output to file (--list)" superClass="com.arm.tool.c.linker.option.redirectoutput" useByScannerDiscovery="false" value="map.map" valueType="string"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.linker.implicit.libs.790772204" name="Implicit other library files" superClass="com.arm.tool.c.linker.implicit.libs" valueType="libs">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/Debug/tx.a}&quot;"/>
-
+
</option>
-
+
</tool>
-
+
<tool id="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6.552129599" name="Arm Librarian 6" superClass="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6"/>
-
+
</toolChain>
-
+
</folderInfo>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
+
</cconfiguration>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<project id="sample_threadx.com.arm.eclipse.build.project.v6.exe.1139105725" name="Executable"/>
-
+
</storageModule>
-
+
<storageModule moduleId="scannerConfiguration">
-
+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
-
+
<storageModule moduleId="com.arm.projectSettings" version="6.0.0"/>
-
+
<storageModule moduleId="refreshScope" versionNumber="2">
-
+
<configuration configurationName="Debug">
-
+
<resource resourceType="PROJECT" workspacePath="/sample_threadx"/>
-
+
</configuration>
-
+
<configuration configurationName="Release">
-
+
<resource resourceType="PROJECT" workspacePath="/sample_threadx"/>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-
+
</cproject>
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c b/ports_module/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c
index 4a677059..f8e0cecc 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -58,7 +58,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Setup the timer. */
timer_init();
@@ -85,42 +85,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "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, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "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, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "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, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "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, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "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. */
@@ -128,23 +128,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "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, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "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, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "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. */
@@ -247,11 +247,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++;
}
@@ -310,7 +310,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. */
@@ -363,7 +363,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_r4/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports_module/cortex_r4/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 8732358f..44591770 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx/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
**************************************************************************/
@@ -103,12 +104,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_initialize_low_level(VOID)
{ */
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/.cproject b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/.cproject
index ee2634f6..68b87b4b 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/.cproject
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/.cproject
@@ -1,184 +1,184 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-
+
<storageModule moduleId="org.eclipse.cdt.core.settings">
-
+
<cconfiguration id="com.arm.eclipse.build.config.v6.exe.debug.base.1168728368">
-
+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.v6.exe.debug.base.1168728368" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-
+
<externalSettings/>
-
+
<extensions>
-
+
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
</extensions>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.v6.exe.debug.base.1168728368" name="Debug" parent="com.arm.eclipse.build.config.v6.exe.debug.base">
-
+
<folderInfo id="com.arm.eclipse.build.config.v6.exe.debug.base.1168728368." name="/" resourcePath="">
-
+
<toolChain id="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6.1663678923" name="Arm Compiler 6" superClass="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.toolchain.v6.base.options.target.cpu_fpu.1991202988" superClass="com.arm.toolchain.v6.base.options.target.cpu_fpu" value="Cortex-R4.VFPv3_D16" valueType="string"/>
-
+
<option id="com.arm.toolchain.v6.base.options.floatabi.1274338506" name="Float ABI" superClass="com.arm.toolchain.v6.base.options.floatabi" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.inst.1511937061" name="Instruction set" superClass="com.arm.toolchain.v6.base.options.inst" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.debug.level.1965802233" name="Debug Level" superClass="com.arm.toolchain.v6.base.options.debug.level" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<targetPlatform id="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6.1663678923.1404390016" name=""/>
-
+
<builder autoBuildTarget="all" buildPath="${workspace_loc:/sample_threadx_module}/Debug" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="com.arm.toolchain.v6.builder.1122747534" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="false" superClass="com.arm.toolchain.v6.builder"/>
-
+
<tool id="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6.625949355" name="Arm C Compiler 6" superClass="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.target.236318405" name="Target (--target)" superClass="com.arm.tool.c.compiler.v6.base.option.target" useByScannerDiscovery="true" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.243328208" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.969861317" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.floatabi.1709423360" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.c.compiler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.inst.1056272671" name="Instruction set" superClass="com.arm.tool.c.compiler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.incpath.147093833" name="Include path (-I)" superClass="com.arm.tool.c.compiler.v6.base.option.incpath" useByScannerDiscovery="false" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/txm/inc_generic}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/txm/inc_generic_modules}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/txm/inc_port}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.259147478" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.flags.1998485151" name="Other flags" superClass="com.arm.tool.c.compiler.v6.base.option.flags" useByScannerDiscovery="true" valueType="stringList">
-
+
<listOptionValue builtIn="false" value="-fropi"/>
-
+
<listOptionValue builtIn="false" value="-frwpi"/>
-
+
</option>
-
+
<inputType id="com.arm.tool.c.compiler.v6.base.input.1530746158" superClass="com.arm.tool.c.compiler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6.78120343" name="Arm C++ Compiler 6" superClass="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.463779808" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6.78533591" name="Arm Assembler 6" superClass="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.assembler.v6.base.option.target.360169824" name="Target (--target)" superClass="com.arm.tool.assembler.v6.base.option.target" useByScannerDiscovery="false" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.cpu.1658849082" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.fpu.1905018936" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.floatabi.481017052" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.assembler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.inst.219372062" name="Instruction set" superClass="com.arm.tool.assembler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.assembler.v6.base.option.incpath.1627515179" name="Include path (-I)" superClass="com.arm.tool.assembler.v6.base.option.incpath" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/txm}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.assembler.v6.base.options.debug.level.2023351076" name="Debug Level" superClass="com.arm.tool.assembler.v6.base.options.debug.level" useByScannerDiscovery="false" value="com.arm.tool.assembler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.assembler.v6.base.option.flags.1635887713" name="Other flags" superClass="com.arm.tool.assembler.v6.base.option.flags" useByScannerDiscovery="true" valueType="stringList">
-
+
<listOptionValue builtIn="false" value="-frwpi"/>
-
+
<listOptionValue builtIn="false" value="-fropi"/>
-
+
</option>
-
+
<inputType id="com.arm.tool.assembler.v6.base.input.981035164" superClass="com.arm.tool.assembler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6.1877762178" name="Arm Linker 6" superClass="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.linker.option.entry.1460068305" name="Image entry point (--entry)" superClass="com.arm.tool.c.linker.option.entry" useByScannerDiscovery="false" value="_txm_module_thread_shell_entry" valueType="string"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.linker.implicit.libs.112064075" name="Implicit other library files" superClass="com.arm.tool.c.linker.implicit.libs" useByScannerDiscovery="false" valueType="libs">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/txm/Debug/txm.a}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.c.linker.option.sizes.657713071" name="List code and data sizes of output image (--info=sizes)" superClass="com.arm.tool.c.linker.option.sizes" useByScannerDiscovery="false" value="false" valueType="boolean"/>
-
+
<option id="com.arm.tool.c.linker.option.totals.496513261" name="List total code and data sizes of output image (--info=totals)" superClass="com.arm.tool.c.linker.option.totals" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.linker.option.flags.1930506841" name="Other flags" superClass="com.arm.tool.c.linker.option.flags" useByScannerDiscovery="true" valueType="stringList">
-
+
<listOptionValue builtIn="false" value="--first txm_module_preamble.o"/>
-
+
<listOptionValue builtIn="false" value="--ro 0x00100000"/>
-
+
<listOptionValue builtIn="false" value="--ropi"/>
-
+
<listOptionValue builtIn="false" value="--rwpi"/>
-
+
</option>
-
+
</tool>
-
+
<tool id="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6.120897126" name="Arm Librarian 6" superClass="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6"/>
-
+
</toolChain>
-
+
</folderInfo>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
+
</cconfiguration>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<project id="sample_threadx_module.com.arm.eclipse.build.project.v6.exe.1790254349" name="Executable"/>
-
+
</storageModule>
-
+
<storageModule moduleId="scannerConfiguration">
-
+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
-
+
<storageModule moduleId="refreshScope"/>
-
+
<storageModule moduleId="com.arm.projectSettings" version="6.0.0"/>
-
+
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-
+
</cproject>
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/sample_threadx_module.c b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/sample_threadx_module.c
index feb9fb84..74eeb454 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/sample_threadx_module.c
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/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];
@@ -102,7 +102,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));
@@ -118,7 +118,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);
@@ -130,14 +130,14 @@ 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,
@@ -157,14 +157,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. */
@@ -173,7 +173,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. */
@@ -181,14 +181,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. */
@@ -236,7 +236,7 @@ UINT status;
/* Test external/shared memory. */
*(ULONG *) 0x08025000 = 0xdeadbeef;
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
@@ -246,7 +246,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);
@@ -298,11 +298,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++;
}
@@ -361,7 +361,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. */
@@ -414,7 +414,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_r4/ac6/example_build/sample_threadx_module/semihosting.c b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/semihosting.c
index 29268630..80e5f04f 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/semihosting.c
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module/semihosting.c
@@ -9,17 +9,17 @@ void use_no_semihosting(void)
__asm(".global __use_no_semihosting\n\t");
}
#endif
-
+
char *$Sub$$_sys_command_string(char *cmd, int len)
{
return 0;
}
-
+
__attribute__((noreturn)) void $Sub$$_sys_exit(int return_code)
{
while(1);
}
-
+
__attribute__((noreturn)) int $Sub$$__raise(int signal, int type)
{
while(1);
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/.cproject b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/.cproject
index 71818fd9..4ceb8982 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/.cproject
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/.cproject
@@ -1,170 +1,170 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-
+
<storageModule moduleId="org.eclipse.cdt.core.settings">
-
+
<cconfiguration id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235">
-
+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-
+
<externalSettings/>
-
+
<extensions>
-
+
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
</extensions>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235" name="Debug" parent="com.arm.eclipse.build.config.v6.exe.debug.base">
-
+
<folderInfo id="com.arm.eclipse.build.config.v6.exe.debug.base.1352491235." name="/" resourcePath="">
-
+
<toolChain id="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6.804641625" name="Arm Compiler 6" superClass="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.toolchain.v6.base.options.target.cpu_fpu.1862712116" superClass="com.arm.toolchain.v6.base.options.target.cpu_fpu" value="Cortex-R4.VFPv3_D16" valueType="string"/>
-
+
<option id="com.arm.toolchain.v6.base.options.floatabi.601947014" name="Float ABI" superClass="com.arm.toolchain.v6.base.options.floatabi" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.inst.1204023733" name="Instruction set" superClass="com.arm.toolchain.v6.base.options.inst" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.debug.level.818353536" name="Debug Level" superClass="com.arm.toolchain.v6.base.options.debug.level" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<targetPlatform id="com.arm.toolchain.v6.exe.debug.base.var.arm_compiler_6-6.804641625.385562723" name=""/>
-
+
<builder autoBuildTarget="all" buildPath="${workspace_loc:/sample_threadx_module_manager}/Debug" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="com.arm.toolchain.v6.builder.1941932380" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="8" superClass="com.arm.toolchain.v6.builder"/>
-
+
<tool id="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6.31312115" name="Arm C Compiler 6" superClass="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.target.1871497465" name="Target (--target)" superClass="com.arm.tool.c.compiler.v6.base.option.target" useByScannerDiscovery="true" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.582298517" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.2077436824" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.floatabi.1440514949" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.c.compiler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.inst.1725781447" name="Instruction set" superClass="com.arm.tool.c.compiler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.incpath.1999415170" name="Include path (-I)" superClass="com.arm.tool.c.compiler.v6.base.option.incpath" useByScannerDiscovery="false" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/inc_port}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/inc_generic}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/inc_generic_modules}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.1853971560" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<inputType id="com.arm.tool.c.compiler.v6.base.input.1194689224" superClass="com.arm.tool.c.compiler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6.1028636576" name="Arm C++ Compiler 6" superClass="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.528092979" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6.2084155435" name="Arm Assembler 6" superClass="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.assembler.v6.base.option.target.1360157853" name="Target (--target)" superClass="com.arm.tool.assembler.v6.base.option.target" useByScannerDiscovery="false" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.cpu.1037858246" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.fpu.1926125524" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.floatabi.8023587" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.assembler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.inst.661293084" name="Instruction set" superClass="com.arm.tool.assembler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.options.debug.level.460302808" name="Debug Level" superClass="com.arm.tool.assembler.v6.base.options.debug.level" useByScannerDiscovery="false" value="com.arm.tool.assembler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.arm.tool.assembler.v6.base.option.incpath.2020985046" name="Include path (-I)" superClass="com.arm.tool.assembler.v6.base.option.incpath" valueType="includePath"/>
-
+
<inputType id="com.arm.tool.assembler.v6.base.input.343891542" superClass="com.arm.tool.assembler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6.831136805" name="Arm Linker 6" superClass="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.linker.option.entry.1475419086" name="Image entry point (--entry)" superClass="com.arm.tool.c.linker.option.entry" useByScannerDiscovery="false" value="Vectors" valueType="string"/>
-
+
<option id="com.arm.tool.c.linker.option.scatter.1811442260" name="Scatter file (--scatter)" superClass="com.arm.tool.c.linker.option.scatter" useByScannerDiscovery="false" value="../sample_threadx.scat" valueType="string"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.arm.tool.c.linker.libs.2083701191" name="User library files" superClass="com.arm.tool.c.linker.libs" useByScannerDiscovery="false" valueType="libs"/>
-
+
<option id="com.arm.tool.c.linker.option.imagemap.1405130028" name="Generate image map (--map)" superClass="com.arm.tool.c.linker.option.imagemap" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
+
<option id="com.arm.tool.c.linker.option.sizes.1951623263" name="List code and data sizes of output image (--info=sizes)" superClass="com.arm.tool.c.linker.option.sizes" useByScannerDiscovery="false" value="false" valueType="boolean"/>
-
+
<option id="com.arm.tool.c.linker.option.redirectoutput.1115886571" name="Redirect diagnostics output to file (--list)" superClass="com.arm.tool.c.linker.option.redirectoutput" useByScannerDiscovery="false" value="map.map" valueType="string"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.linker.implicit.libs.790772204" name="Implicit other library files" superClass="com.arm.tool.c.linker.implicit.libs" valueType="libs">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx/Debug/tx.a}&quot;"/>
-
+
</option>
-
+
</tool>
-
+
<tool id="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6.552129599" name="Arm Librarian 6" superClass="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6"/>
-
+
</toolChain>
-
+
</folderInfo>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
+
</cconfiguration>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<project id="sample_threadx.com.arm.eclipse.build.project.v6.exe.1139105725" name="Executable"/>
-
+
</storageModule>
-
+
<storageModule moduleId="scannerConfiguration">
-
+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
-
+
<storageModule moduleId="com.arm.projectSettings" version="6.0.0"/>
-
+
<storageModule moduleId="refreshScope" versionNumber="2">
-
+
<configuration configurationName="Debug">
-
+
<resource resourceType="PROJECT" workspacePath="/sample_threadx"/>
-
+
</configuration>
-
+
<configuration configurationName="Release">
-
+
<resource resourceType="PROJECT" workspacePath="/sample_threadx"/>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-
+
</cproject>
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/module_code.c b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/module_code.c
index 6a92a2ac..78dc1538 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/module_code.c
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/module_code.c
@@ -1,4 +1,4 @@
-/*
+/*
Input ELF file: sample_threadx_module.axf
Output C Array file: module_code.c
*/
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx.scat b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx.scat
index 926647b2..9eb35ca0 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx.scat
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx.scat
@@ -18,21 +18,21 @@ SDRAM 0x0 0x40000000
* (+RO-CODE) ; Application RO code (.text)
* (+RO-DATA) ; Application RO data (.constdata)
}
-
+
IRQ_STACK +0 ALIGN 8 EMPTY 1024 {}
-
+
FIQ_STACK +0 ALIGN 8 EMPTY 512 {}
-
+
SVC_STACK +0 ALIGN 8 EMPTY 2048 {}
-
+
SYS_STACK +0 ALIGN 8 EMPTY 2048 {}
-
+
ABORT_STACK +0 ALIGN 8 EMPTY 2048 {}
; Application RW & ZI data (.data & .bss)
DATA +0 0x100000
{
- * (+RW,+ZI)
+ * (+RW,+ZI)
}
PERIPHERALS 0xA0000000 EMPTY 0x20000000 { }; Peripherals
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx_module_manager.c b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx_module_manager.c
index 99e8fa3e..2e683da2 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx_module_manager.c
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/sample_threadx_module_manager.c
@@ -47,7 +47,7 @@ VOID module_fault_handler(TX_THREAD *thread, TXM_MODULE_INSTANCE *module)
int main()
{
-
+
/* Setup the timer. */
timer_init();
@@ -60,8 +60,8 @@ int main()
void tx_application_define(void *first_unused_memory)
{
- tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
- manager_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
+ manager_stack, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
@@ -72,7 +72,7 @@ void tx_application_define(void *first_unused_memory)
void module_manager_entry(ULONG thread_input)
{
-
+
/* Initialize the module manager. */
txm_module_manager_initialize((VOID *) module_data_area, MODULE_DATA_SIZE);
@@ -80,40 +80,40 @@ 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_in_place_load(&my_module, "my module", (VOID *) 0x00100000 /*module_code*/);
-
+
/* Enable 128 byte read/write shared memory region at 0x08025000. */
txm_module_manager_external_memory_enable(&my_module, (void *) 0x08025000, 128, TXM_MODULE_MANAGER_SHARED_ATTRIBUTE_WRITE);
-
+
/* Start the module. */
txm_module_manager_start(&my_module);
/* Sleep for a while.... */
tx_thread_sleep(300);
-
+
/* Stop the module. */
txm_module_manager_stop(&my_module);
-
+
/* Unload the module. */
txm_module_manager_unload(&my_module);
/* Load the module that is already there. */
txm_module_manager_in_place_load(&my_module, "my module", (VOID *) 0x00100000);
-
+
/* Set maximum module priority to 5. */
txm_module_manager_maximum_module_priority_set(&my_module, 5);
- /* In this demo, module threads 0 and 5 will not start because their priorities
+ /* In this demo, module threads 0 and 5 will not start because their priorities
* are higher than 5. */
-
+
/* 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_r4/ac6/example_build/sample_threadx_module_manager/startup.S b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/startup.S
index cd6479d3..bbd85a4c 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/startup.S
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/startup.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2006-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//----------------------------------------------------------------
@@ -130,7 +130,7 @@ Reset_Handler:
CPS #SVC_MODE // Build SVC mode CPSR
LDR sp, =Image$$SVC_STACK$$ZI$$Limit // Setup SVC stack pointer
-
+
//----------------------------------------------------------------
// TCM Configuration
@@ -196,7 +196,7 @@ Reset_Handler:
// Enable Branch prediction
//----------------------------------------------------------------
-// In the Cortex-R4, the Z-bit of the SCTLR does not control the program flow prediction.
+// In the Cortex-R4, the Z-bit of the SCTLR does not control the program flow prediction.
// Some control bits in the ACTLR control the program flow and prefetch features instead.
// These are enabled by default, but are shown here for completeness.
diff --git a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/tx_initialize_low_level.S b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/tx_initialize_low_level.S
index 8732358f..44591770 100644
--- a/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/tx_initialize_low_level.S
+++ b/ports_module/cortex_r4/ac6/example_build/sample_threadx_module_manager/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
**************************************************************************/
@@ -103,12 +104,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_initialize_low_level(VOID)
{ */
diff --git a/ports_module/cortex_r4/ac6/example_build/tx/.cproject b/ports_module/cortex_r4/ac6/example_build/tx/.cproject
index 9dfee32b..e97c3b82 100644
--- a/ports_module/cortex_r4/ac6/example_build/tx/.cproject
+++ b/ports_module/cortex_r4/ac6/example_build/tx/.cproject
@@ -1,164 +1,164 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-
+
<storageModule moduleId="org.eclipse.cdt.core.settings">
-
+
<cconfiguration id="com.arm.eclipse.build.config.v6.lib.debug.base.1437284040">
-
+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.v6.lib.debug.base.1437284040" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-
+
<externalSettings>
-
+
<externalSetting>
-
+
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/tx"/>
-
+
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/tx/Debug"/>
-
+
<entry flags="RESOLVED" kind="libraryFile" name="tx" srcPrefixMapping="" srcRootPath=""/>
-
+
</externalSetting>
-
+
</externalSettings>
-
+
<extensions>
-
+
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
</extensions>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.v6.lib.debug.base.1437284040" name="Debug" parent="com.arm.eclipse.build.config.v6.lib.debug.base">
-
+
<folderInfo id="com.arm.eclipse.build.config.v6.lib.debug.base.1437284040." name="/" resourcePath="">
-
+
<toolChain id="com.arm.toolchain.v6.lib.debug.base.var.arm_compiler_6-6.1464787520" name="Arm Compiler 6" superClass="com.arm.toolchain.v6.lib.debug.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.toolchain.v6.base.options.target.cpu_fpu.478509717" superClass="com.arm.toolchain.v6.base.options.target.cpu_fpu" useByScannerDiscovery="false" value="Cortex-R4.VFPv3_D16" valueType="string"/>
-
+
<option id="com.arm.toolchain.v6.base.options.floatabi.1766446589" name="Float ABI" superClass="com.arm.toolchain.v6.base.options.floatabi" useByScannerDiscovery="false" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.inst.1232812151" name="Instruction set" superClass="com.arm.toolchain.v6.base.options.inst" useByScannerDiscovery="false" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.debug.level.2063441699" name="Debug Level" superClass="com.arm.toolchain.v6.base.options.debug.level" useByScannerDiscovery="false" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<targetPlatform id="com.arm.toolchain.v6.lib.debug.base.var.arm_compiler_6-6.1464787520.616520224" name=""/>
-
+
<builder autoBuildTarget="all" buildPath="${workspace_loc:/tx}/Debug" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="com.arm.toolchain.v6.builder.1272073742" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="8" superClass="com.arm.toolchain.v6.builder"/>
-
+
<tool id="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6.577265789" name="Arm C Compiler 6" superClass="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.target.266330532" name="Target (--target)" superClass="com.arm.tool.c.compiler.v6.base.option.target" useByScannerDiscovery="true" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1532500124" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.1733364152" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.floatabi.392164786" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.c.compiler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.inst.992988418" name="Instruction set" superClass="com.arm.tool.c.compiler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.incpath.798876436" name="Include path (-I)" superClass="com.arm.tool.c.compiler.v6.base.option.incpath" useByScannerDiscovery="false" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_generic}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_port}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_generic_modules}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_generic_module_manager}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.163340175" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<inputType id="com.arm.tool.c.compiler.v6.base.input.1698601388" superClass="com.arm.tool.c.compiler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6.1334734026" name="Arm C++ Compiler 6" superClass="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.873849633" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6.781097422" name="Arm Assembler 6" superClass="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.assembler.v6.base.option.cpu.658276880" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.fpu.2036512964" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.floatabi.1741694810" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.assembler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.inst.681164849" name="Instruction set" superClass="com.arm.tool.assembler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.options.debug.level.225385230" name="Debug Level" superClass="com.arm.tool.assembler.v6.base.options.debug.level" useByScannerDiscovery="false" value="com.arm.tool.assembler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.flags.1492054237" name="Other flags" superClass="com.arm.tool.assembler.v6.base.option.flags" useByScannerDiscovery="true"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.target.19749543" name="Target (--target)" superClass="com.arm.tool.assembler.v6.base.option.target" useByScannerDiscovery="false" value="arm-arm-none-eabi" valueType="string"/>
-
+
<inputType id="com.arm.tool.assembler.v6.base.input.1643966032" superClass="com.arm.tool.assembler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6.938771835" name="Arm Linker 6" superClass="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6"/>
-
+
<tool id="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6.404897694" name="Arm Librarian 6" superClass="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6"/>
-
+
</toolChain>
-
+
</folderInfo>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
+
</cconfiguration>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<project id="tx.com.arm.eclipse.build.project.v6.lib.827478944" name="Static Library"/>
-
+
</storageModule>
-
+
<storageModule moduleId="scannerConfiguration">
-
+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
-
+
<storageModule moduleId="refreshScope" versionNumber="2">
-
+
<configuration configurationName="Debug">
-
+
<resource resourceType="PROJECT" workspacePath="/tx"/>
-
+
</configuration>
-
+
<configuration configurationName="Release">
-
+
<resource resourceType="PROJECT" workspacePath="/tx"/>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="com.arm.projectSettings" version="6.0.0"/>
-
+
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-
+
</cproject>
diff --git a/ports_module/cortex_r4/ac6/example_build/txm/.cproject b/ports_module/cortex_r4/ac6/example_build/txm/.cproject
index f9012e60..1e87101d 100644
--- a/ports_module/cortex_r4/ac6/example_build/txm/.cproject
+++ b/ports_module/cortex_r4/ac6/example_build/txm/.cproject
@@ -1,176 +1,176 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-
+
<storageModule moduleId="org.eclipse.cdt.core.settings">
-
+
<cconfiguration id="com.arm.eclipse.build.config.v6.lib.debug.base.230798760">
-
+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.arm.eclipse.build.config.v6.lib.debug.base.230798760" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-
+
<externalSettings/>
-
+
<extensions>
-
+
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="com.arm.eclipse.builder.armcc.error" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
+
</extensions>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="clean" description="" id="com.arm.eclipse.build.config.v6.lib.debug.base.230798760" name="Debug" parent="com.arm.eclipse.build.config.v6.lib.debug.base">
-
+
<folderInfo id="com.arm.eclipse.build.config.v6.lib.debug.base.230798760." name="/" resourcePath="">
-
+
<toolChain id="com.arm.toolchain.v6.lib.debug.base.var.arm_compiler_6-6.1536340820" name="Arm Compiler 6" superClass="com.arm.toolchain.v6.lib.debug.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.toolchain.v6.base.options.target.cpu_fpu.1741951891" superClass="com.arm.toolchain.v6.base.options.target.cpu_fpu" value="Cortex-R4.VFPv3_D16" valueType="string"/>
-
+
<option id="com.arm.toolchain.v6.base.options.floatabi.1689884638" name="Float ABI" superClass="com.arm.toolchain.v6.base.options.floatabi" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.inst.1225515308" name="Instruction set" superClass="com.arm.toolchain.v6.base.options.inst" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.toolchain.v6.base.options.debug.level.1968329061" name="Debug Level" superClass="com.arm.toolchain.v6.base.options.debug.level" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<targetPlatform id="com.arm.toolchain.v6.lib.debug.base.var.arm_compiler_6-6.1536340820.1313521607" name=""/>
-
+
<builder autoBuildTarget="all" buildPath="${workspace_loc:/txm}/Debug" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="com.arm.toolchain.v6.builder.260938227" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="8" superClass="com.arm.toolchain.v6.builder"/>
-
+
<tool id="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6.1208624013" name="Arm C Compiler 6" superClass="com.arm.tool.c.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.target.1115561458" name="Target (--target)" superClass="com.arm.tool.c.compiler.v6.base.option.target" useByScannerDiscovery="true" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1144655284" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.1967415269" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.floatabi.1122101199" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.c.compiler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.option.inst.160831763" name="Instruction set" superClass="com.arm.tool.c.compiler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.preproc.enableToolSpecificSettings.1835839790" name="Enable tool specific settings" superClass="com.arm.tool.c.compiler.v6.base.options.preproc.enableToolSpecificSettings" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.incpath.1427518661" name="Include path (-I)" superClass="com.arm.tool.c.compiler.v6.base.option.incpath" useByScannerDiscovery="false" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_generic_modules}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_port}&quot;"/>
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc_generic}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.enableToolSpecificSettings.1243877710" name="Enable tool specific settings" superClass="com.arm.tool.c.compiler.v6.base.options.debug.enableToolSpecificSettings" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.107847485" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.c.compiler.v6.base.option.flags.1085622490" name="Other flags" superClass="com.arm.tool.c.compiler.v6.base.option.flags" useByScannerDiscovery="true" valueType="stringList">
-
+
<listOptionValue builtIn="false" value="-frwpi"/>
-
+
<listOptionValue builtIn="false" value="-fropi"/>
-
+
</option>
-
+
<inputType id="com.arm.tool.c.compiler.v6.base.input.458949030" superClass="com.arm.tool.c.compiler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6.1156571097" name="Arm C++ Compiler 6" superClass="com.arm.tool.cpp.compiler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.c.compiler.v6.base.options.debug.level.1614799872" name="Debug Level" superClass="com.arm.tool.c.compiler.v6.base.options.debug.level" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6.931954328" name="Arm Assembler 6" superClass="com.arm.tool.assembler.v6.base.var.arm_compiler_6-6">
-
+
<option id="com.arm.tool.assembler.v6.base.option.target.822853862" name="Target (--target)" superClass="com.arm.tool.assembler.v6.base.option.target" useByScannerDiscovery="false" value="arm-arm-none-eabi" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.cpu.2097623703" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-r4f" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.fpu.539486454" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="vfpv3-d16" valueType="string"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.floatabi.704479770" name="Float ABI (-mfloat-abi)" superClass="com.arm.tool.assembler.v6.base.option.floatabi" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.floatabi.soft" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.option.inst.1021631987" name="Instruction set" superClass="com.arm.tool.assembler.v6.base.option.inst" useByScannerDiscovery="true" value="com.arm.tool.c.compiler.v6.base.option.inst.arm" valueType="enumerated"/>
-
+
<option id="com.arm.tool.assembler.v6.base.options.preproc.enableToolSpecificSettings.141331325" name="Enable tool specific settings" superClass="com.arm.tool.assembler.v6.base.options.preproc.enableToolSpecificSettings" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.assembler.v6.base.option.incpath.1939038543" name="Include path (-I)" superClass="com.arm.tool.assembler.v6.base.option.incpath" valueType="includePath">
-
+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/tx}&quot;"/>
-
+
</option>
-
+
<option id="com.arm.tool.assembler.v6.base.options.debug.level.1817832391" name="Debug Level" superClass="com.arm.tool.assembler.v6.base.options.debug.level" useByScannerDiscovery="false" value="com.arm.tool.assembler.v6.base.options.debug.level.std" valueType="enumerated"/>
-
+
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.arm.tool.assembler.v6.base.option.flags.48140011" name="Other flags" superClass="com.arm.tool.assembler.v6.base.option.flags" useByScannerDiscovery="true" valueType="stringList">
-
+
<listOptionValue builtIn="false" value="-fropi"/>
-
+
<listOptionValue builtIn="false" value="-frwpi"/>
-
+
</option>
-
+
<inputType id="com.arm.tool.assembler.v6.base.input.1961843154" superClass="com.arm.tool.assembler.v6.base.input"/>
-
+
</tool>
-
+
<tool id="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6.2133616857" name="Arm Linker 6" superClass="com.arm.tool.c.linker.v6.base.var.arm_compiler_6-6"/>
-
+
<tool id="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6.346006020" name="Arm Librarian 6" superClass="com.arm.tool.librarian.v6.base.var.arm_compiler_6-6"/>
-
+
</toolChain>
-
+
</folderInfo>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
+
</cconfiguration>
-
+
</storageModule>
-
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
+
<project id="txm.com.arm.eclipse.build.project.v6.lib.837111164" name="Static Library"/>
-
+
</storageModule>
-
+
<storageModule moduleId="scannerConfiguration">
-
+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
-
+
<storageModule moduleId="refreshScope" versionNumber="2">
-
+
<configuration configurationName="Debug">
-
+
<resource resourceType="PROJECT" workspacePath="/txm"/>
-
+
</configuration>
-
+
<configuration configurationName="Release">
-
+
<resource resourceType="PROJECT" workspacePath="/txm"/>
-
+
</configuration>
-
+
</storageModule>
-
+
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-
+
<storageModule moduleId="com.arm.projectSettings" version="6.0.0"/>
-
+
</cproject>
diff --git a/ports_module/cortex_r4/ac6/inc/tx_port.h b/ports_module/cortex_r4/ac6/inc/tx_port.h
index 33b7e737..2b334d2e 100644
--- a/ports_module/cortex_r4/ac6/inc/tx_port.h
+++ b/ports_module/cortex_r4/ac6/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-R4/AC6 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R4/AC6 */
/* 6.1 */
/* */
/* 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"
@@ -78,7 +70,7 @@
#include <string.h>
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -114,12 +106,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 */
@@ -129,8 +121,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)
@@ -177,7 +169,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
@@ -189,11 +181,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; \
@@ -207,7 +199,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. */
@@ -225,11 +217,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
@@ -237,8 +229,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)
@@ -265,21 +257,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. */
@@ -299,7 +291,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -308,7 +300,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -344,8 +336,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-R4/AC6 Version 6.4.2 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/AC6 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_module/cortex_r4/ac6/inc/txm_module_port.h b/ports_module/cortex_r4/ac6/inc/txm_module_port.h
index 3e6ec271..141a307b 100644
--- a/ports_module/cortex_r4/ac6/inc/txm_module_port.h
+++ b/ports_module/cortex_r4/ac6/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 */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
-/**************************************************************************/
-/* */
-/* APPLICATION INTERFACE DEFINITION RELEASE */
-/* */
-/* txm_module_port.h Cortex-R4/MPU/ARM */
+/**************************************************************************/
+/* */
+/* APPLICATION INTERFACE DEFINITION RELEASE */
+/* */
+/* txm_module_port.h Cortex-R4/MPU/ARM */
/* 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):
@@ -89,9 +84,9 @@ The following extensions must also be defined in tx_port.h:
#define TXM_MODULE_KERNEL_STACK_SIZE 1024
#endif
-/* Defined, these options allows a memory-protected module to access kernel objects.
- For example, when a module needs to send/receive a message from a kernel queue.
- This does not allow modules to create or delete objects outside of their memory.
+/* Defined, these options allows a memory-protected module to access kernel objects.
+ For example, when a module needs to send/receive a message from a kernel queue.
+ This does not allow modules to create or delete objects outside of their memory.
Default setting for these values is undefined. */
/* #define TXM_MODULE_ENABLE_KERNEL_BLOCK_POOL_ACCESS */
/* #define TXM_MODULE_ENABLE_KERNEL_BYTE_POOL_ACCESS */
@@ -166,7 +161,7 @@ The following extensions must also be defined in tx_port.h:
#define INLINE_DECLARE inline
/* Define the number of MPU entries assigned to the code and data sections.
- On Cortex-R parts, there are 12 total entries. ThreadX uses one for access
+ On Cortex-R parts, there are 12 total entries. ThreadX uses one for access
to the kernel entry function, thus 11 remain for code and data protection. */
#define TXM_MODULE_MPU_TOTAL_ENTRIES 12
#define TXM_MODULE_MPU_CODE_ENTRIES 4
@@ -234,7 +229,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 module properties. */
@@ -248,7 +243,7 @@ typedef struct TXM_MODULE_MANAGER_MEMORY_FAULT_INFO_STRUCT
{ \
_tx_mutex_put(&_txm_module_manager_mutex); \
return(TXM_MODULE_INVALID_PROPERTIES); \
- }
+ }
/* Define the macro to check the code alignment. */
@@ -359,7 +354,7 @@ UINT _txm_module_manager_inside_data_check(TXM_MODULE_INSTANCE *module_instance
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-R4/MPU/ARM Version 6.4.2 *";
+ "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-R4/MPU/ARM Version 6.5.0.202601 *";
#endif
diff --git a/ports_module/cortex_r4/ac6/module_lib/src/txm_module_initialize.S b/ports_module/cortex_r4/ac6/module_lib/src/txm_module_initialize.S
index 051f6f66..f4a16554 100644
--- a/ports_module/cortex_r4/ac6/module_lib/src/txm_module_initialize.S
+++ b/ports_module/cortex_r4/ac6/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
@@ -43,43 +43,37 @@
.eabi_attribute Tag_ABI_PCS_R9_use, 1
.eabi_attribute Tag_ABI_PCS_RW_data, 2
.arm
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_initialize Cortex-R4/MPU/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_initialize Cortex-R4/MPU/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function initializes the module c runtime. */
-/* */
-/* INPUT */
-/* */
+/* DESCRIPTION */
+/* */
+/* This function initializes the module c runtime. */
+/* */
+/* INPUT */
+/* */
/* heap_base Pointer to bottom of heap */
/* heap_top Pointer to top of heap */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
/* __scatterload Initialize C runtime */
/* __rt_lib_init Initialize heap */
-/* */
-/* CALLED BY */
-/* */
-/* _txm_module_thread_shell_entry Start module thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* CALLED BY */
+/* */
+/* _txm_module_thread_shell_entry Start module thread */
/* */
/**************************************************************************/
/* VOID _txm_module_initialize(VOID *heap_base, VOID *heap_top) */
@@ -88,7 +82,7 @@
_txm_module_initialize:
PUSH {r0-r12,lr} // Save dregs and LR
-
+
B __scatterload // Call ARM func to initialize variables
diff --git a/ports_module/cortex_r4/ac6/module_lib/src/txm_module_thread_shell_entry.c b/ports_module/cortex_r4/ac6/module_lib/src/txm_module_thread_shell_entry.c
index b2673994..ec0d81c6 100644
--- a/ports_module/cortex_r4/ac6/module_lib/src/txm_module_thread_shell_entry.c
+++ b/ports_module/cortex_r4/ac6/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 _txm_module_initialize(VOID *heap_base, VOID *heap_top);
/* */
/* 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_r4/ac6/module_manager/src/tx_thread_context_restore.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_restore.S
index f87614c4..eaf3be37 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_restore.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -55,12 +56,12 @@
#endif
.text
.eabi_attribute Tag_ABI_align_preserved, 1
-
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
-/* _tx_thread_context_restore Cortex-R4/MPU/ARM */
+/* _tx_thread_context_restore Cortex-R4/MPU/ARM */
/* 6.1 */
/* AUTHOR */
/* */
@@ -89,12 +90,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_context_restore(VOID)
{ */
@@ -186,10 +181,10 @@ __tx_thread_preempt_restore:
STR r1, [sp, #-4]! // Save point of interrupt
STMDB sp!, {r4-r12, lr} // Save registers
MOV r4, r3 // Save SPSR in r4
-
+
CPS #IRQ_MODE // Switch back to IRQ mode
LDMIA sp!, {r0-r3} // Recover r0-r3
-
+
CPS #SYS_MODE // Switch to SYS mode to save remaining context on thread stack
STMDB sp!, {r0-r3} // Save r0-r3 on thread's stack
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_save.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_save.S
index 696dc985..68951b08 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_context_save.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -76,12 +77,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_context_save(VOID)
{ */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_restore.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_restore.S
index 94c20b72..7fbcc84a 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_restore.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -88,12 +89,6 @@
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_context_restore(VOID) */
/* { */
@@ -186,15 +181,15 @@ __tx_thread_fiq_preempt_restore:
LDMIA sp!, {r3, lr} // Recover temporarily saved registers
MOV r1, lr // Save lr (point of interrupt)
-
+
CPS #SVC_MODE // Switch to SVC mode to save context on thread stack
STR r1, [sp, #-4]! // Save point of interrupt
STMDB sp!, {r4-r12, lr} // Save upper half of registers
MOV r4, r3 // Save SPSR in r4
-
+
CPS #FIQ_MODE // Switch back to FIQ mode
LDMIA sp!, {r0-r3} // Recover r0-r3
-
+
CPS #SVC_MODE // Switch to SVC mode to save remaining context on thread stack
STMDB sp!, {r0-r3} // Save r0-r3 on thread's stack
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_save.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_save.S
index 1d85abe5..3c1333b3 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_context_save.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -76,12 +77,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_context_save(VOID) */
/* { */
@@ -90,7 +85,7 @@
.type _tx_thread_fiq_context_save, "function"
_tx_thread_fiq_context_save:
- /* Upon entry to this routine, it is assumed that IRQ interrupts are locked
+ /* Upon entry to this routine, it is assumed that IRQ interrupts are locked
out, we are in IRQ mode, and all registers are intact. */
/* Check for a nested interrupt condition. */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_end.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_end.S
index df8a4633..5abbdddf 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_end.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -77,12 +78,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_nesting_end(VOID) */
/* { */
@@ -90,13 +85,13 @@
.type _tx_thread_fiq_nesting_end, "function"
_tx_thread_fiq_nesting_end:
MOV r3, lr // Save ISR return address
-
+
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if // Disable IRQ and FIQ interrupts
#else
CPSID i // Disable IRQ interrupts
#endif
-
+
LDMIA sp!, {r1, lr} // Pickup saved lr (and r1 throw-away for
// 8-byte alignment logic)
CPS #FIQ_MODE // Switch back to FIQ mode
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_start.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_start.S
index f26d9a0c..73564d78 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_fiq_nesting_start.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -74,12 +75,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_nesting_start(VOID) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_control.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_control.S
index 11ab4e4f..83aa06c4 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_control.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -73,12 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_control(UINT new_posture) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_disable.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_disable.S
index cd7476a6..d605e034 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_disable.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -65,12 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_disable(void) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_restore.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_restore.S
index 8e966de6..f9315d7f 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_interrupt_restore.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_restore(UINT old_posture) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_end.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_end.S
index cf8e0ac1..664e02c5 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_end.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -77,12 +78,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_irq_nesting_end(VOID) */
/* { */
@@ -96,7 +91,7 @@ _tx_thread_irq_nesting_end:
#else
CPSID i // Disable IRQ interrupts
#endif
-
+
LDMIA sp!, {r1, lr} // Pickup saved lr (and r1 throw-away for
// 8-byte alignment logic)
CPS #IRQ_MODE // Switch back to IRQ mode
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_start.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_start.S
index b3ebe405..1d50b484 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_irq_nesting_start.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -74,12 +75,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_irq_nesting_start(VOID) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_schedule.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_schedule.S
index 58b94d01..38792e97 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_schedule.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -82,12 +83,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_schedule(VOID) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_stack_build.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_stack_build.S
index eb8e9a90..8f122083 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_stack_build.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -78,12 +79,6 @@
/* */
/* _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_r4/ac6/module_manager/src/tx_thread_system_return.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_system_return.S
index 2c5f11d6..048b4525 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_system_return.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -77,12 +78,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_system_return(VOID) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_vectored_context_save.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_vectored_context_save.S
index de49cc0d..dbb40aba 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_thread_vectored_context_save.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -75,12 +76,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_vectored_context_save(VOID) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/tx_timer_interrupt.S b/ports_module/cortex_r4/ac6/module_manager/src/tx_timer_interrupt.S
index d48313ef..8c3abf90 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/tx_timer_interrupt.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -84,12 +85,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_timer_interrupt(VOID) */
/* { */
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_alignment_adjust.c b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_alignment_adjust.c
index 4572adab..94a6cfdd 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_alignment_adjust.c
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -56,12 +57,6 @@
/* */
/* _txm_module_manager_alignment_adjust Adjust alignment for Cortex-R */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
ULONG _txm_power_of_two_block_size(ULONG size)
{
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_external_memory_enable.c b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_external_memory_enable.c
index a57590fa..2bd00d08 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_external_memory_enable.c
+++ b/ports_module/cortex_r4/ac6/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 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_external_memory_enable(TXM_MODULE_INSTANCE *module_instance,
VOID *start_address,
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_handler.c b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_handler.c
index 9962938d..1844c760 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_handler.c
+++ b/ports_module/cortex_r4/ac6/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_r4/ac6/module_manager/src/txm_module_manager_memory_fault_notify.c b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_notify.c
index d9ff9c7a..28439101 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_memory_fault_notify.c
+++ b/ports_module/cortex_r4/ac6/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 */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_memory_fault_notify(VOID (*notify_function)(TX_THREAD *, TXM_MODULE_INSTANCE *))
{
diff --git a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
index 8c9b8752..ea4ce4ff 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex_r4/ac6/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,12 +56,6 @@
/* */
/* _txm_module_manager_mm_register_setup */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
ULONG _txm_module_manager_region_size_get(ULONG block_size)
{
@@ -519,7 +514,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_r4/ac6/module_manager/src/txm_module_manager_thread_stack_build.S b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_thread_stack_build.S
index 4f9daad8..26bf9d51 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_thread_stack_build.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
/* 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_r4/ac6/module_manager/src/txm_module_manager_user_mode_entry.S b/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_user_mode_entry.S
index 7f23c553..f36ee23f 100644
--- a/ports_module/cortex_r4/ac6/module_manager/src/txm_module_manager_user_mode_entry.S
+++ b/ports_module/cortex_r4/ac6/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
**************************************************************************/
@@ -22,7 +23,7 @@
.global _txm_module_manager_kernel_dispatch
.global _txm_system_mode_enter
.global _txm_system_mode_exit
-
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -54,12 +55,6 @@
/* */
/* Modules in user mode */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
.text
.align 12
diff --git a/ports_module/cortex_r4/iar/example_build/cstartup.s b/ports_module/cortex_r4/iar/example_build/cstartup.s
index 6953baa8..c01a67cb 100644
--- a/ports_module/cortex_r4/iar/example_build/cstartup.s
+++ b/ports_module/cortex_r4/iar/example_build/cstartup.s
@@ -136,19 +136,19 @@ __iar_program_start:
MSR cpsr_c, r0 ; Change the mode
LDR r1, =SFE(FIQ_STACK) ; End of FIQ_STACK
BIC sp,r1,#0x7 ; Make sure SP is 8 aligned
-
+
;; Set up the SVC stack pointer.
CPS #SVC_MODE
LDR r1, =SFE(SVC_STACK) ; End of SVC_STACK
BIC sp,r1,#0x7 ; Make sure SP is 8 aligned
-
+
;; Set up the abort stack pointer.
CPS #ABT_MODE
LDR r1, =SFE(ABT_STACK) ; End of ABT_STACK
BIC sp,r1,#0x7 ; Make sure SP is 8 aligned
-
+
;; Set up the normal stack pointer.
BIC r0 ,r0, #MODE_MSK ; Clear the mode bits
diff --git a/ports_module/cortex_r4/iar/example_build/sample_threadx.c b/ports_module/cortex_r4/iar/example_build/sample_threadx.c
index 983109cc..ca92ff86 100644
--- a/ports_module/cortex_r4/iar/example_build/sample_threadx.c
+++ b/ports_module/cortex_r4/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -63,7 +63,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -87,42 +87,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "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, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "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, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "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, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "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, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "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. */
@@ -130,23 +130,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "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, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "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, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "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. */
@@ -249,11 +249,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++;
}
@@ -312,7 +312,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. */
@@ -365,7 +365,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_r4/iar/example_build/sample_threadx_module.c b/ports_module/cortex_r4/iar/example_build/sample_threadx_module.c
index 203cbba2..d4f98a30 100644
--- a/ports_module/cortex_r4/iar/example_build/sample_threadx_module.c
+++ b/ports_module/cortex_r4/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 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", 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);
@@ -263,7 +263,7 @@ UINT status;
/* This thread simply sends messages to a queue shared by thread 2. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_1_counter++;
@@ -289,18 +289,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++;
}
@@ -354,12 +354,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. */
@@ -412,7 +412,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_r4/iar/example_build/sample_threadx_module.icf b/ports_module/cortex_r4/iar/example_build/sample_threadx_module.icf
index bed79adf..69c8f600 100644
--- a/ports_module/cortex_r4/iar/example_build/sample_threadx_module.icf
+++ b/ports_module/cortex_r4/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_r4/iar/example_build/sample_threadx_module_manager.c b/ports_module/cortex_r4/iar/example_build/sample_threadx_module_manager.c
index 8c319878..a0ec49ea 100644
--- a/ports_module/cortex_r4/iar/example_build/sample_threadx_module_manager.c
+++ b/ports_module/cortex_r4/iar/example_build/sample_threadx_module_manager.c
@@ -40,7 +40,7 @@ VOID module_fault_handler(TX_THREAD *thread, TXM_MODULE_INSTANCE *module)
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -50,8 +50,8 @@ int main()
void tx_application_define(void *first_unused_memory)
{
- tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
- manager_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&module_manager, "Module Manager Thread", module_manager_entry, 0,
+ manager_stack, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
@@ -62,7 +62,7 @@ void tx_application_define(void *first_unused_memory)
void module_manager_entry(ULONG thread_input)
{
-
+
/* Initialize the module manager. */
txm_module_manager_initialize((VOID *) 0x08020000, 0x10000);
@@ -70,35 +70,35 @@ 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_in_place_load(&my_module, "my module", (VOID *) 0x00100000);
-
+
/* Enable 128 byte read/write shared memory region at 0x08025000. */
txm_module_manager_external_memory_enable(&my_module, (void *) 0x08025000, 128, TXM_MODULE_MANAGER_SHARED_ATTRIBUTE_WRITE);
-
+
/* Start the module. */
txm_module_manager_start(&my_module);
/* Sleep for a while.... */
tx_thread_sleep(300);
-
+
/* Stop the module. */
txm_module_manager_stop(&my_module);
-
+
/* Unload the module. */
txm_module_manager_unload(&my_module);
/* Load the module that is already there. */
txm_module_manager_in_place_load(&my_module, "my module", (VOID *) 0x00100000);
-
+
/* 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_r4/iar/example_build/tx_initialize_low_level.s b/ports_module/cortex_r4/iar/example_build/tx_initialize_low_level.s
index b65b7a82..dd82541b 100644
--- a/ports_module/cortex_r4/iar/example_build/tx_initialize_low_level.s
+++ b/ports_module/cortex_r4/iar/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
@@ -55,7 +55,7 @@ THUMB_MASK DEFINE 0x20 ; Thumb bit (5) of CPSR/SPSR
;
;
;
-;/* 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. */
@@ -68,45 +68,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-R4/MPU/IAR */
;/* 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)
@@ -117,7 +111,7 @@ __tx_free_memory_start
_tx_initialize_low_level
;
; /****** NOTE ****** The IAR 4.11a and above releases call main in SYS mode. */
-;
+;
; /* For modules, stay in SYS mode and disable interrupts. */
CPSID i
;
@@ -133,7 +127,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. */
@@ -166,17 +160,17 @@ 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
@@ -191,7 +185,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
@@ -210,22 +204,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
@@ -234,7 +228,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
@@ -250,41 +244,41 @@ __tx_irq_processing_return
__tx_fiq_handler
B __tx_fiq_handler ; FIQ interrupt handler
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* __tx_prefetch_handler & __tx_abort_handler Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* __tx_prefetch_handler & __tx_abort_handler Cortex-R4/MPU/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* Scott Larson, Microsoft Corporation */
;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function handles MPU 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 MPU 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 */
@@ -300,7 +294,7 @@ __tx_fiq_handler
EXTERN _txm_module_manager_memory_fault_handler
EXTERN _tx_execution_thread_exit
EXTERN _tx_thread_schedule
-
+
RSEG .text:CODE:NOROOT(2)
PUBLIC Prefetch_Handler
PUBLIC Abort_Handler
@@ -323,15 +317,15 @@ Abort_Handler
LDR r0, =_tx_thread_current_ptr ; Build current thread pointer address
LDR r1, [r0] ; Pickup the current thread pointer
STR r1, [r3, #0] ; Save current thread pointer
-
+
MRC p15, 0, r0, c6, c0, 0 ; Read DFAR
STR r0, [r3, #8] ; Save DFAR
-
+
CMP r0, #0 ; Was it a data or instruction fault?
SUBEQ lr, lr, #4 ; Adjust point of exception for instruction
SUBNE lr, lr, #8 ; Adjust point of exception for data
STR lr, [r3, #4] ; Save point of fault
-
+
MRC p15, 0, r0, c5, c0, 0 ; Read DFSR
STR r0, [r3, #12] ; Save DFSR
MRC p15, 0, r0, c6, c0, 2 ; Read IFAR
@@ -343,7 +337,7 @@ Abort_Handler
MCR p15, 0, r0, c5, c0, 0 ; Clear DFSR
MCR p15, 0, r0, c6, c0, 2 ; Clear IFAR
MCR p15, 0, r0, c5, c0, 1 ; Clear IFSR
-
+
; Save registers r0-r12
POP {r0-r2}
STR r0, [r3, #28] ; Save r0
@@ -360,7 +354,7 @@ 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
@@ -372,7 +366,7 @@ 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
@@ -387,11 +381,11 @@ 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_r4/iar/example_build/txm_module_preamble.s b/ports_module/cortex_r4/iar/example_build/txm_module_preamble.s
index 31ccca5b..9b4f1122 100644
--- a/ports_module/cortex_r4/iar/example_build/txm_module_preamble.s
+++ b/ports_module/cortex_r4/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
@@ -37,23 +37,23 @@ __txm_module_preamble:
; 1 -> User mode execution (MPU protection)
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_r4/iar/inc/tx_port.h b/ports_module/cortex_r4/iar/inc/tx_port.h
index 35f50af7..ae9421c8 100644
--- a/ports_module/cortex_r4/iar/inc/tx_port.h
+++ b/ports_module/cortex_r4/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-R4/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R4/IAR */
/* 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"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,19 +107,19 @@ 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. */
#define TX_INT_DISABLE 0x80 /* Disable IRQ interrupts */
#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)
@@ -172,7 +164,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#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
@@ -186,11 +178,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; \
@@ -221,7 +213,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. */
@@ -239,11 +231,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
@@ -253,23 +245,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)
@@ -297,8 +289,8 @@ void __iar_Initlocks(void);
#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 TX_DISABLE_INLINE
@@ -309,22 +301,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#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,8 +385,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-R4/IAR Version 6.4.2 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports_module/cortex_r4/iar/inc/txm_module_port.h b/ports_module/cortex_r4/iar/inc/txm_module_port.h
index a4014a7f..9cb72c16 100644
--- a/ports_module/cortex_r4/iar/inc/txm_module_port.h
+++ b/ports_module/cortex_r4/iar/inc/txm_module_port.h
@@ -1,45 +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 */
-/** */
-/**************************************************************************/
-/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
-/**************************************************************************/
-/* */
-/* APPLICATION INTERFACE DEFINITION RELEASE */
-/* */
-/* txm_module_port.h Cortex-R4/MPU/IAR */
+/**************************************************************************/
+/* */
+/* APPLICATION INTERFACE DEFINITION RELEASE */
+/* */
+/* txm_module_port.h Cortex-R4/MPU/IAR */
/* 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. */
/* */
/**************************************************************************/
@@ -51,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):
@@ -162,7 +157,7 @@ The following extensions must also be defined in tx_port.h:
#define INLINE_DECLARE inline
/* Define the number of MPU entries assigned to the code and data sections.
- On Cortex-R parts, there are 12 total entries. ThreadX uses one for access
+ On Cortex-R parts, there are 12 total entries. ThreadX uses one for access
to the kernel entry function, thus 11 remain for code and data protection. */
#define TXM_MODULE_MPU_TOTAL_ENTRIES 12
#define TXM_MODULE_MPU_CODE_ENTRIES 4
@@ -230,7 +225,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. */
@@ -340,7 +335,7 @@ UINT _txm_module_manager_inside_data_check(TXM_MODULE_INSTANCE *module_instance
#define TXM_MODULE_MANAGER_VERSION_ID \
CHAR _txm_module_manager_version_id[] = \
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-R4/MPU/IAR Version 6.4.2 *";
+ "Copyright (c) 2024 Microsoft Corporation. * ThreadX Module Cortex-R4/MPU/IAR Version 6.5.0.202601 *";
#endif
diff --git a/ports_module/cortex_r4/iar/module_lib/src/txm_module_thread_shell_entry.c b/ports_module/cortex_r4/iar/module_lib/src/txm_module_thread_shell_entry.c
index 42ae543c..b27e06e3 100644
--- a/ports_module/cortex_r4/iar/module_lib/src/txm_module_thread_shell_entry.c
+++ b/ports_module/cortex_r4/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
**************************************************************************/
@@ -86,12 +87,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_r4/iar/module_manager/src/tx_iar.c b/ports_module/cortex_r4/iar/module_manager/src/tx_iar.c
index 158738ea..238b485e 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_iar.c
+++ b/ports_module/cortex_r4/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_r4/iar/module_manager/src/tx_thread_context_restore.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_restore.s
index 5234d948..699cfd78 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_restore.s
+++ b/ports_module/cortex_r4/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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
@@ -38,44 +38,38 @@ THUMB_MASK DEFINE 0x20 ; Thumb bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-R4/MPU/IAR */
;/* 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)
@@ -103,13 +97,13 @@ _tx_thread_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_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
@@ -169,10 +163,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
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -182,7 +176,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_r4/iar/module_manager/src/tx_thread_context_save.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_save.s
index d8aa33a1..9589e706 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_save.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_context_save.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_system_state
@@ -26,43 +26,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-R4/IAR */
;/* 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)
@@ -79,7 +73,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
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -94,7 +88,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. */
@@ -110,7 +104,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
; }
@@ -124,13 +118,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 occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured 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. */
@@ -150,7 +144,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
@@ -160,7 +154,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
@@ -175,7 +169,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_r4/iar/module_manager/src/tx_thread_interrupt_control.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_control.s
index a6fbb0f8..3eb61e11 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_control.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_control.s
@@ -1,65 +1,59 @@
;/***************************************************************************
-; * 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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
INT_MASK DEFINE 0x80 ; Interrupt bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-R4/IAR */
;/* 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)
@@ -79,7 +73,7 @@ _tx_thread_interrupt_control
;
MSR CPSR_cxsf, r1 ; Setup new CPSR
AND r0, r3, #INT_MASK ; Return previous interrupt mask
-
+
BX lr ; Return to caller
;
;}
diff --git a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_disable.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_disable.s
index 7f9a2b2c..c05493d7 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_disable.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_disable.s
@@ -1,64 +1,58 @@
;/***************************************************************************
-; * 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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-R4/IAR */
;/* 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)
diff --git a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_restore.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_restore.s
index f862c87d..b1ab3f05 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_restore.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_interrupt_restore.s
@@ -1,61 +1,55 @@
;/***************************************************************************
-; * 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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-R4/IAR */
;/* 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 */
+;/* 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 */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_end.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_end.s
index 85c03c5f..b45a8768 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_end.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_end.s
@@ -1,73 +1,67 @@
;/***************************************************************************
-; * 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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
IRQ_MODE DEFINE 0x12 ; IRQ mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-R4/IAR */
;/* 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)
diff --git a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_start.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_start.s
index 97bc7029..0fd2c949 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_start.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_irq_nesting_start.s
@@ -1,70 +1,64 @@
;/***************************************************************************
-; * 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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
SYS_MODE DEFINE 0x1F ; System mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-R4/IAR */
;/* 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_r4/iar/module_manager/src/tx_thread_schedule.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_schedule.s
index 72270475..b6bcdfa2 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_schedule.s
+++ b/ports_module/cortex_r4/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
@@ -36,45 +36,39 @@ SYS_MODE EQU 0x1F ; SYS mode
MODE_MASK EQU 0x1F ; Mode mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-R4/MPU/IAR */
;/* 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. */
+;/* */
+;/* INPUT */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* 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)
@@ -121,7 +115,7 @@ SWI_Handler
;
; The service call is handled here
;
-
+
CMP r0, #0 ; Is it a schedule request?
BEQ _tx_handler_svc_schedule ; Yes, go there
@@ -130,7 +124,7 @@ SWI_Handler
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
@@ -148,11 +142,11 @@ _tx_handler_svc_unrecognized_loop ; We should never get here
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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)
- 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
@@ -162,13 +156,13 @@ _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 the current user mode selection 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
ORR r0, r0, #SYS_MODE ; system mode code
MSR SPSR_cxsf, r0 ; Restore the spsr
-
+
LDR r1, [r2, #0xA8] ; Load the module kernel stack pointer
CPS #SYS_MODE ; Switch to SYS mode
MOV r3, sp ; Grab thread stack pointer
@@ -182,15 +176,15 @@ _tx_handler_svc_super_enter
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
+ ; 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)
- 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
@@ -218,19 +212,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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -239,10 +233,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. */
@@ -262,7 +256,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -319,7 +313,7 @@ __tx_thread_schedule_loop
MRC p15, 0, r3, c6, c1, 0 ; Read DRBAR into r3
CMP r2, r3 ; Is module already loaded?
BEQ _tx_end_mpu_update ; Yes - skip memory protection setup
-
+
; Disable MPU before applying new regions.
MRC p15, 0, r2, c1, c0, 0 ; Read SCTLR
BIC r2, r2, #1 ; Disable MPU
@@ -343,7 +337,7 @@ _tx_mpu_loop
ADD r3, r3, #1 ; Increment loop index
CMP r3, #0xB ; Check the limit
BLE _tx_mpu_loop ; Loop if not finished
-
+
; Enable MPU with new regions.
MRC p15, 0, r2, c1, c0, 0 ; Read SCTLR
ORR r2, r2, #1 ; Enable MPU
@@ -351,18 +345,18 @@ _tx_mpu_loop
DSB
MCR p15, 0, r2, c1, c0, 0 ; Write to SCTLR
ISB
- ;
+ ;
_tx_end_mpu_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
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -375,7 +369,7 @@ _tx_end_mpu_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
@@ -384,7 +378,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?
@@ -394,7 +388,7 @@ _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
@@ -404,11 +398,11 @@ _tx_skip_solicited_vfp_restore
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; End SWI_Handler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
+
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
CPSID i ; Disable IRQ interrupts
@@ -424,7 +418,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
CPSID i ; Disable IRQ interrupts
diff --git a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_stack_build.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_stack_build.s
index 502c3529..1708ede4 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_stack_build.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_stack_build.s
@@ -1,81 +1,75 @@
;/***************************************************************************
-; * 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 */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
SYS_MODE DEFINE 0x1F ; SYS mode
CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints enabled
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-R4/MPU/IAR */
;/* 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))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
ARM
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-R4 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_r4/iar/module_manager/src/tx_thread_system_return.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_system_return.s
index af808d42..f9d4c9e3 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_system_return.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_system_return.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_current_ptr
@@ -27,44 +27,38 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-R4/IAR */
;/* 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)
@@ -97,7 +91,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
;
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
diff --git a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_vectored_context_save.s b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_vectored_context_save.s
index d5f077b2..2f075445 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_thread_vectored_context_save.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_thread_vectored_context_save.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_system_state
@@ -25,43 +25,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-R4/IAR */
;/* 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)
@@ -118,7 +112,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 occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -150,7 +144,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_r4/iar/module_manager/src/tx_timer_interrupt.s b/ports_module/cortex_r4/iar/module_manager/src/tx_timer_interrupt.s
index 5d4efcd8..7213e213 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/tx_timer_interrupt.s
+++ b/ports_module/cortex_r4/iar/module_manager/src/tx_timer_interrupt.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 */
-;/** */
-;/** Timer */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Timer */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;Define Assembly language external references...
@@ -34,46 +34,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-R4/IAR */
;/* 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)
@@ -99,7 +93,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
@@ -217,13 +211,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_r4/iar/module_manager/src/txm_module_manager_alignment_adjust.c b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_alignment_adjust.c
index 50e0c672..9876d72f 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_alignment_adjust.c
+++ b/ports_module/cortex_r4/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,42 +26,36 @@
#include "txm_module.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_power_of_two_block_size Cortex-R4/MPU/IAR */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_power_of_two_block_size Cortex-R4/MPU/IAR */
/* 6.1 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
/* */
-/* DESCRIPTION */
-/* */
-/* This function calculates a power of two size at or immediately above*/
-/* the input size and returns it to the caller. */
-/* */
-/* INPUT */
-/* */
-/* size Block size */
-/* */
-/* OUTPUT */
-/* */
-/* calculated size Rounded up to power of two */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _txm_module_manager_alignment_adjust Adjust alignment for Cortex-R */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
+/* DESCRIPTION */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* This function calculates a power of two size at or immediately above*/
+/* the input size and returns it to the caller. */
+/* */
+/* INPUT */
+/* */
+/* size Block size */
+/* */
+/* OUTPUT */
+/* */
+/* calculated size Rounded up to power of two */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _txm_module_manager_alignment_adjust Adjust alignment for Cortex-R */
/* */
/**************************************************************************/
ULONG _txm_power_of_two_block_size(ULONG size)
@@ -68,11 +63,11 @@ ULONG _txm_power_of_two_block_size(ULONG size)
/* Check for 0 size. */
if(size == 0)
return 0;
-
+
/* Minimum MPU block size is 32. */
if(size <= 32)
return 32;
-
+
/* Bit twiddling trick to round to next high power of 2
(if original size is power of 2, it will return original size. Perfect!) */
size--;
@@ -82,58 +77,58 @@ ULONG _txm_power_of_two_block_size(ULONG size)
size |= size >> 8;
size |= size >> 16;
size++;
-
+
/* Return a power of 2 size at or above the input size. */
return(size);
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _txm_module_manager_alignment_adjust Cortex-R4/MPU/IAR */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_alignment_adjust Cortex-R4/MPU/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 */
-/* */
-/* module_preamble Pointer to module preamble */
-/* 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 */
-/* */
-/* _txm_power_of_two_block_size Calculate power of two size */
-/* */
-/* CALLED BY */
-/* */
-/* Initial thread stack frame */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* DESCRIPTION */
+/* */
+/* This function adjusts the alignment and size of the code and data */
+/* section for a given module implementation. */
+/* */
+/* INPUT */
+/* */
+/* module_preamble Pointer to module preamble */
+/* 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 */
+/* */
+/* _txm_power_of_two_block_size Calculate power of two size */
+/* */
+/* CALLED BY */
+/* */
+/* Initial thread stack frame */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 Scott Larson Initial Version 6.1 */
/* */
/**************************************************************************/
-VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble,
- ULONG *code_size,
- ULONG *code_alignment,
- ULONG *data_size,
+VOID _txm_module_manager_alignment_adjust(TXM_MODULE_PREAMBLE *module_preamble,
+ ULONG *code_size,
+ ULONG *code_alignment,
+ ULONG *data_size,
ULONG *data_alignment)
{
@@ -162,7 +157,7 @@ ULONG data_size_accum;
code_size_accum = code_size_accum + (_txm_power_of_two_block_size(local_code_size - code_size_accum) >> 1);
code_size_accum = code_size_accum + _txm_power_of_two_block_size(local_code_size - code_size_accum);
local_code_size = code_size_accum;
-
+
/* Determine data block sizes. Minimize the alignment requirement.
There are 4 MPU data entries available. The following is how the data size
will be distributed:
@@ -175,9 +170,9 @@ ULONG data_size_accum;
data_size_accum = data_size_accum + (_txm_power_of_two_block_size(local_data_size - data_size_accum) >> 1);
data_size_accum = data_size_accum + _txm_power_of_two_block_size(local_data_size - data_size_accum);
local_data_size = data_size_accum;
-
+
/* Return all the information to the caller. */
- *code_size = local_code_size;
+ *code_size = local_code_size;
*code_alignment = local_code_alignment;
*data_size = local_data_size;
*data_alignment = local_data_alignment;
diff --git a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_external_memory_enable.c b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_external_memory_enable.c
index 5b61abb8..4f9ced4c 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_external_memory_enable.c
+++ b/ports_module/cortex_r4/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 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_external_memory_enable(TXM_MODULE_INSTANCE *module_instance,
VOID *start_address,
diff --git a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_handler.c b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_handler.c
index ea6c2022..e468e239 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_handler.c
+++ b/ports_module/cortex_r4/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_r4/iar/module_manager/src/txm_module_manager_memory_fault_notify.c b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_notify.c
index 5653ee37..21b4a4da 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_memory_fault_notify.c
+++ b/ports_module/cortex_r4/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-R4/MPU/IAR */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_memory_fault_notify Cortex-R4/MPU/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_r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c
index 365f2e2d..e8e28bc7 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex_r4/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
**************************************************************************/
@@ -55,12 +56,6 @@
/* */
/* _txm_module_manager_mm_register_setup */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
ULONG _txm_module_manager_region_size_get(ULONG block_size)
{
@@ -514,7 +509,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_r4/iar/module_manager/src/txm_module_manager_thread_stack_build.s b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_thread_stack_build.s
index a2aa765a..9e0efc28 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_thread_stack_build.s
+++ b/ports_module/cortex_r4/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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
THUMB_MASK DEFINE 0x20 ; THUMB bit
@@ -26,44 +26,38 @@ SYS_MODE DEFINE 0x1F ; SYS mode
CPSR_MASK DEFINE 0xBF ; Mask initial CPSR, IRQ ints enabled
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _txm_module_manager_thread_stack_build Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _txm_module_manager_thread_stack_build Cortex-R4/MPU/IAR */
;/* 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 *))
@@ -76,7 +70,7 @@ _txm_module_manager_thread_stack_build
;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-R4 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_r4/iar/module_manager/src/txm_module_manager_user_mode_entry.s b/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_user_mode_entry.s
index 263a13cb..07d81f95 100644
--- a/ports_module/cortex_r4/iar/module_manager/src/txm_module_manager_user_mode_entry.s
+++ b/ports_module/cortex_r4/iar/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 */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
EXTERN _tx_thread_current_ptr
EXTERN _txm_module_manager_kernel_dispatch
-
-
+
+
RSEG .text:CODE:NOROOT(5)
ARM
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _txm_module_manager_user_mode_entry Cortex-R4/MPU/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _txm_module_manager_user_mode_entry Cortex-R4/MPU/IAR */
;/* 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 */
;/* */
-;/* 09-30-2020 Scott Larson Initial Version 6.1 */
+;/* 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 */
;/* */
;/**************************************************************************/
PUBLIC _txm_module_manager_user_mode_entry
@@ -85,5 +79,5 @@ _txm_system_mode_exit
NOP
NOP
_txm_module_manager_user_mode_end
-
+
END