summaryrefslogtreecommitdiff
path: root/ports_arch/ARMv7-A
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-10-02 10:42:44 -0400
committerGitHub <[email protected]>2026-10-02 10:42:44 -0400
commit93387b0a60382a29579bbad5045c68328e3751df (patch)
tree42be790d602cb76f55090e5a7c418df7ea2b3428 /ports_arch/ARMv7-A
parent44d7c95c582d415c4ad84527180b29c93c3bf664 (diff)
parent28281cd5647d4671236ca08d19bd18ed15b2265a (diff)
Merge pull request #783 from eclipse-threadx/devv6.5.2.202603_rel
Merged changes ahead of the v6.5.2.202603 release
Diffstat (limited to 'ports_arch/ARMv7-A')
-rw-r--r--ports_arch/ARMv7-A/threadx/common/inc/tx_port.h2
-rw-r--r--ports_arch/ARMv7-A/threadx/common/src/tx_thread_system_return.S5
-rw-r--r--ports_arch/ARMv7-A/threadx/ports/ac6/example_build/sample_threadx/sample_threadx.launch2
-rw-r--r--ports_arch/ARMv7-A/threadx/ports/gnu/CMakeLists.txt34
-rw-r--r--ports_arch/ARMv7-A/threadx/ports/iar/example_build/tx.ewp2
-rwxr-xr-xports_arch/ARMv7-A/update.sh164
6 files changed, 205 insertions, 4 deletions
diff --git a/ports_arch/ARMv7-A/threadx/common/inc/tx_port.h b/ports_arch/ARMv7-A/threadx/common/inc/tx_port.h
index 15d6c3c5..798dc457 100644
--- a/ports_arch/ARMv7-A/threadx/common/inc/tx_port.h
+++ b/ports_arch/ARMv7-A/threadx/common/inc/tx_port.h
@@ -307,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.2.202603 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_arch/ARMv7-A/threadx/common/src/tx_thread_system_return.S b/ports_arch/ARMv7-A/threadx/common/src/tx_thread_system_return.S
index 1a17446b..7671bba2 100644
--- a/ports_arch/ARMv7-A/threadx/common/src/tx_thread_system_return.S
+++ b/ports_arch/ARMv7-A/threadx/common/src/tx_thread_system_return.S
@@ -9,6 +9,7 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
/**************************************************************************/
@@ -121,7 +122,9 @@ _tx_skip_solicited_vfp_save:
LDR r2, =_tx_timer_time_slice // Pickup address of time slice
LDR r1, [r2] // Pickup current time slice
- /* Save current stack and switch to system stack. */
+ /* Save the current stack pointer in the thread control block. The
+ scheduler runs on the banked SVC mode stack that the startup code
+ set up, so there is no stack switch to perform. */
STR sp, [r0, #8] // Save thread stack pointer
diff --git a/ports_arch/ARMv7-A/threadx/ports/ac6/example_build/sample_threadx/sample_threadx.launch b/ports_arch/ARMv7-A/threadx/ports/ac6/example_build/sample_threadx/sample_threadx.launch
index 0bc5b11b..df957414 100644
--- a/ports_arch/ARMv7-A/threadx/ports/ac6/example_build/sample_threadx/sample_threadx.launch
+++ b/ports_arch/ARMv7-A/threadx/ports/ac6/example_build/sample_threadx/sample_threadx.launch
@@ -124,7 +124,7 @@
<booleanAttribute key="VFS_ENABLED" value="true"/>
<stringAttribute key="VFS_LOCAL_DIR" value="${workspace_loc}"/>
<stringAttribute key="VFS_REMOTE_MOUNT" value="/writeable"/>
- <stringAttribute key="breakpoints" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;breakpoints order=&quot;ALPHA&quot;&gt;&#10;&#9;&lt;breakpoint ignorecount=&quot;0&quot; threadenabled=&quot;no&quot; core_list=&quot;&quot; continue=&quot;no&quot; verboseBreakpoints=&quot;yes&quot; kind=&quot;SOURCEPOSITION&quot;&gt;&#10;&#9;&#9;&lt;master_location index=&quot;0&quot; enabled=&quot;true&quot; version=&quot;2&quot; hostFile=&quot;C:\Users\nisohack\Documents\work\x-ware_libs\threadx_github\ports\cortex_a7\ac6\example_build\sample_threadx\tx_initialize_low_level.S&quot; line=&quot;215&quot;/&gt;&#10;&#9;&#9;&lt;location index=&quot;0&quot; enabled=&quot;true&quot; version=&quot;2&quot; address=&quot;S:0x80000314&quot; debugFile=&quot;C:/Users/nisohack/Documents/work/x-ware_libs/threadx_github/ports/cortex_a7/ac6/example_build/sample_threadx/tx_initialize_low_level.S&quot; hostFile=&quot;C:\Users\nisohack\Documents\work\x-ware_libs\threadx_github\ports\cortex_a7\ac6\example_build\sample_threadx\tx_initialize_low_level.S&quot; line=&quot;238&quot;/&gt;&#10;&#9;&lt;/breakpoint&gt;&#10;&lt;/breakpoints&gt;&#10;"/>
+ <stringAttribute key="breakpoints" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;breakpoints order=&quot;ALPHA&quot;&gt;&#10;&lt;/breakpoints&gt;&#10;"/>
<listAttribute key="com.arm.debug.views.common.AddressTracker.debugger.view.DisassemblyView.addresses">
<listEntry value="&lt;Next Instruction&gt;"/>
</listAttribute>
diff --git a/ports_arch/ARMv7-A/threadx/ports/gnu/CMakeLists.txt b/ports_arch/ARMv7-A/threadx/ports/gnu/CMakeLists.txt
new file mode 100644
index 00000000..fc215876
--- /dev/null
+++ b/ports_arch/ARMv7-A/threadx/ports/gnu/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Copyright (c) 2026 Eclipse ThreadX contributors
+# SPDX-License-Identifier: MIT
+# Portions of this file were generated with AI assistance.
+#
+# ThreadX port sources for the ARMv7-A cores, GNU tools.
+# Copied into every ARMv7-A gnu port by update.sh, so edit it here.
+
+target_sources(${PROJECT_NAME}
+ PRIVATE
+ # {{BEGIN_TARGET_SOURCES}}
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_context_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_nesting_end.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_nesting_start.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_end.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_start.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_vectored_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S
+ # {{END_TARGET_SOURCES}}
+)
+
+target_include_directories(${PROJECT_NAME}
+ SYSTEM
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/inc
+)
diff --git a/ports_arch/ARMv7-A/threadx/ports/iar/example_build/tx.ewp b/ports_arch/ARMv7-A/threadx/ports/iar/example_build/tx.ewp
index ef9fb474..72f03a7a 100644
--- a/ports_arch/ARMv7-A/threadx/ports/iar/example_build/tx.ewp
+++ b/ports_arch/ARMv7-A/threadx/ports/iar/example_build/tx.ewp
@@ -1047,7 +1047,7 @@
</option>
<option>
<name>IarchiveOutput</name>
- <state>C:\release\threadx\Debug\Exe\tx.a</state>
+ <state>###Unitialized###</state>
</option>
</data>
</settings>
diff --git a/ports_arch/ARMv7-A/update.sh b/ports_arch/ARMv7-A/update.sh
new file mode 100755
index 00000000..6272a59a
--- /dev/null
+++ b/ports_arch/ARMv7-A/update.sh
@@ -0,0 +1,164 @@
+#!/bin/bash
+##############################################################################
+# Copyright (C) 2026 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.
+#
+# AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+# The AI-generated portions may be considered public domain (CC0-1.0)
+# and not subject to the project's licence. The human contributor has
+# reviewed and verified that the code is correct.
+#
+# SPDX-License-Identifier: MIT and CC0-1.0
+##############################################################################
+
+# Update the ARMv7-A ports from the generic ARMv7-A port, generating ports and
+# examples from the common files. This is a port of update.ps1 beside it, which
+# needs PowerShell and so could only be run on Windows. The two are kept
+# equivalent: same cores, same compilers, same copy sets and the same patches.
+#
+# To update the ThreadX ports for the source tree:
+# ./update.sh --port-sets tx --copy-common-files --copy-port-files \
+# --copy-example --patch-files
+#
+# To update the ThreadX ports for the test tree:
+# ./update.sh --port-sets tx --copy-common-files --copy-port-files \
+# --copy-example --copy-validation-test --copy-regression-test \
+# --patch-files
+#
+# --copy-example, --copy-validation-test and --copy-regression-test are
+# accepted and ignored, exactly as in update.ps1, where they are declared as
+# parameters but never consulted. They are kept so that both scripts take the
+# same command line.
+
+set -eu
+
+cd "$(dirname "$(realpath "$0")")"
+
+cores="cortex_a5 cortex_a7 cortex_a8 cortex_a9 cortex_a12 cortex_a15 cortex_a17"
+compilers="ac6 gnu"
+
+port_sets=""
+copy_common_files=0
+copy_port_files=0
+patch_files=0
+
+usage() {
+ sed -n '22,35p' "$0"
+ exit "${1:-1}"
+}
+
+while [ "$#" -gt 0 ]; do
+ case "$1" in
+ --port-sets)
+ [ "$#" -ge 2 ] || { echo "Error: --port-sets needs a value" >&2; exit 1; }
+ port_sets="$(printf '%s' "$2" | tr ',' ' ')"
+ shift 2
+ ;;
+ --copy-common-files) copy_common_files=1; shift ;;
+ --copy-port-files) copy_port_files=1; shift ;;
+ --patch-files) patch_files=1; shift ;;
+ # Accepted and ignored, as in update.ps1.
+ --copy-example|--copy-validation-test|--copy-regression-test) shift ;;
+ -h|--help) usage 0 ;;
+ *) echo "Error: unknown option '$1'" >&2; usage ;;
+ esac
+done
+
+if [ -z "${port_sets}" ]; then
+ echo "Error: --port-sets is required" >&2
+ usage
+fi
+
+for port_set in ${port_sets}; do
+ case "${port_set}" in
+ tx|tx_smp|txm|txm_smp) ;;
+ *) echo "Error: invalid port set '${port_set}'" >&2; exit 1 ;;
+ esac
+done
+
+echo "Update the ARMv7-A ports"
+
+# Copy the contents of a directory over a destination, creating what is missing
+# and overwriting what is not. This mirrors Copy-Item -Recurse -Force, which
+# merges into the destination rather than replacing it.
+copy_files() {
+ source_dir="$1"
+ destination_directory="$2"
+
+ if [ -d "${source_dir}" ]; then
+ cp -Rf "${source_dir}/." "${destination_directory}/"
+ fi
+}
+
+# Replace every occurrence of a literal string in a file, leaving the file
+# alone when it does not exist. Only the files named in the patch list below
+# are ever touched.
+patch_file() {
+ path="$1"
+ original="$2"
+ substitute="$3"
+
+ [ -f "${path}" ] || return 0
+
+ original_escaped="$(printf '%s' "${original}" | sed -e 's/[][\.*^$/&]/\\&/g')"
+ substitute_escaped="$(printf '%s' "${substitute}" | sed -e 's/[\/&]/\\&/g')"
+ sed -i "s/${original_escaped}/${substitute_escaped}/g" "${path}"
+}
+
+for port_set in ${port_sets}; do
+ for core in ${cores}; do
+ case "${port_set}" in
+ tx) core_directory="../../ports/${core}" ;;
+ tx_smp) core_directory="../../ports_smp/${core}_smp" ;;
+ txm) core_directory="../../ports_module/${core}" ;;
+ txm_smp) core_directory="../../ports_module_smp/${core}_smp" ;;
+ esac
+
+ core_short="${core#cortex_}"
+ core_short_lower="$(printf '%s' "${core_short}" | tr '[:upper:]' '[:lower:]')"
+ core_short_upper="$(printf '%s' "${core_short}" | tr '[:lower:]' '[:upper:]')"
+
+ for compiler in ${compilers}; do
+ destination_directory="${core_directory}/${compiler}"
+ mkdir -p "${destination_directory}"
+
+ if [ "${copy_common_files}" -eq 1 ]; then
+ copy_files "threadx/common" "${destination_directory}"
+ fi
+
+ if [ "${copy_port_files}" -eq 1 ]; then
+ copy_files "threadx/ports/${compiler}" "${destination_directory}"
+ fi
+
+ if [ "${port_set}" = "tx_smp" ]; then
+ if [ "${copy_common_files}" -eq 1 ]; then
+ copy_files "threadx_smp/common" "${destination_directory}"
+ fi
+ if [ "${copy_port_files}" -eq 1 ]; then
+ copy_files "threadx_smp/ports/${compiler}" "${destination_directory}"
+ fi
+ fi
+
+ if [ "${patch_files}" -eq 1 ]; then
+ sample_cproject="${destination_directory}/example_build/sample_threadx/.cproject"
+ patch_file "${sample_cproject}" 'value="cortex-a7"' "value=\"cortex-${core_short_lower}\""
+ patch_file "${sample_cproject}" 'Cortex-A7.NoFPU' "Cortex-${core_short_upper}.NoFPU"
+
+ tx_cproject="${destination_directory}/example_build/tx/.cproject"
+ patch_file "${tx_cproject}" 'value="cortex-a7"' "value=\"cortex-${core_short_lower}\""
+ patch_file "${tx_cproject}" 'Cortex-A7.NoFPU' "Cortex-${core_short_upper}.NoFPU"
+
+ launch="${destination_directory}/example_build/sample_threadx/sample_threadx.launch"
+ patch_file "${launch}" 'Debug Cortex-A7' "Debug Cortex-${core_short_upper}"
+ patch_file "${launch}" 'VE_Cortex_A7x1' "VE_Cortex_${core_short_upper}x1"
+ patch_file "${launch}" 've_cortex_a7x1' "ve_cortex_${core_short_lower}x1"
+ patch_file "${launch}" 'FVP_VE_Cortex-A7x1' "FVP_VE_Cortex-${core_short_upper}x1"
+ fi
+ done
+ done
+done
+
+echo "Done."