mirror of
https://github.com/eclipse-threadx/threadx.git
synced 2026-10-06 06:59:08 +08:00
Added bash A profile update scripts and restored ports_arch as their source (#592)
The ARMv7-A and ARMv8-A ports are generated by update.ps1, which needs PowerShell, so the cortex-a job in ports_arch_check ran on a Windows image and nobody could reproduce it locally on Linux. Add update.sh beside each update.ps1, with the same cores, compilers, copy sets and patches, and move the job to the same Linux image as everything else. The bash scripts were checked against the PowerShell ones by comparing what each reports as drifted. They agree exactly on the 63 files the Windows job last reported, and differ on 12 more, which turn out to be a defect in update.ps1 rather than in the port. Its two .cproject patterns are written as 'value=`"cortex-a7`"' with backticks that survive into the pattern, so that replacement has never matched, while the neighbouring Cortex-A7.NoFPU pattern has no backticks and always worked. The result is that the AC6 example builds for the A5, A8, A9, A12, A15 and A17 cores name cortex-a7 as their CPU while their FPU string is correct. The bash scripts do what the PowerShell ones intended, so regenerating corrects those twelve files. Restore ports_arch as the source for the rest. The implementation of _tx_thread_smp_time_get from #555 was applied to the twenty four generated SMP ports and never to ports_arch, which still held MOV x0, #0 with a FIXME comment, so regenerating would have replaced a working generic timer read with a stub. That implementation now lives in the source. The remaining differences are cosmetic and resolve in favour of the source: a trailing blank line in 38 copies of tx_thread_schedule.S and comment spacing in one tx_port.h. Note that the Cortex-A VFP fix is already present in ports_arch and was never at risk, contrary to what the description of the port consistency checks change said before this was measured. Extend scripts/check_ports.sh to run the A profile generators too, and make it fail when a generator fails or is missing rather than reporting a clean tree, which would have been a false pass. Pin every workflow to ubuntu-24.04. ubuntu-latest already resolves to that image, so nothing changes today, but a future migration becomes a deliberate commit rather than something that happens underneath the -m32 builds. Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
# Check ports for cortex-m
|
||||
cortex-m:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
@@ -46,8 +46,10 @@ jobs:
|
||||
run: scripts/check_ports.sh
|
||||
|
||||
cortex-a:
|
||||
# Check ports for cortex-a
|
||||
runs-on: windows-latest
|
||||
# Check ports for cortex-a. This ran on Windows because the A profile
|
||||
# tooling was PowerShell only; update.sh beside each update.ps1 means it
|
||||
# runs on the same image as every other job now.
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
@@ -60,18 +62,19 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Copy ports arch
|
||||
- name: Copy ports arch
|
||||
# Regenerate the A profile ports and fail if anything changed, which means
|
||||
# a generated port was edited directly instead of ports_arch.
|
||||
- name: Check the Cortex-A ports
|
||||
run: |
|
||||
cd ports_arch/ARMv7-A
|
||||
pwsh -Command ./update.ps1 -PortSets tx -CopyCommonFiles -CopyPortFiles -CopyExample -PatchFiles
|
||||
cd ../../ports_arch/ARMv8-A
|
||||
pwsh -Command ./update.ps1 -PortSets tx,tx_smp -CopyCommonFiles -CopyPortFiles -CopyExample -PatchFiles
|
||||
if ((git status --porcelain -uno) -ne $null) {
|
||||
Write-Host "Ports for ARM architecture is not updated"
|
||||
git status
|
||||
Exit 1
|
||||
}
|
||||
(cd ports_arch/ARMv7-A && ./update.sh --port-sets tx \
|
||||
--copy-common-files --copy-port-files --copy-example --patch-files)
|
||||
(cd ports_arch/ARMv8-A && ./update.sh --port-sets tx,tx_smp \
|
||||
--copy-common-files --copy-port-files --copy-example --patch-files)
|
||||
if [[ -n $(git status --porcelain -uno) ]]; then
|
||||
echo "The Cortex-A ports are not reproducible from ports_arch:"
|
||||
git status --porcelain -uno
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
path: ${{ inputs.cmake_path }}/coverage_report/${{ inputs.coverage_name }}
|
||||
|
||||
deploy_code_coverage:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
if: ((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && !inputs.skip_coverage && !inputs.skip_deploy && !failure() && !cancelled()
|
||||
needs: run_tests
|
||||
environment:
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.665260895" 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.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a12" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.633771589" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.748329430" 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.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a12" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.2069861530" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.2070983899" 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.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a12" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.90247954" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.1068198178" 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.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a12" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.1016536584" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.665260895" 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.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a15" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.633771589" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.748329430" 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.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a15" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.2069861530" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.2070983899" 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.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a15" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.90247954" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.1068198178" 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.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a15" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.1016536584" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.665260895" 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.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a17" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.633771589" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.748329430" 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.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a17" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.2069861530" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.2070983899" 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.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a17" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.90247954" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.1068198178" 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.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a17" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.1016536584" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.665260895" 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.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a5" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.633771589" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.748329430" 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.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a5" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.2069861530" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.2070983899" 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.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a5" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.90247954" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.1068198178" 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.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a5" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.1016536584" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ _skip_solicited_fp_restore:
|
||||
MSR DAIF, x4 // Recover DAIF
|
||||
RET // Return to caller
|
||||
// }
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.665260895" 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.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a8" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.633771589" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.748329430" 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.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a8" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.2069861530" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.2070983899" 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.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a8" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.90247954" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.1068198178" 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.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a8" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.1016536584" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.665260895" 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.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.2102538095" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a9" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.633771589" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.748329430" 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.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.289232043" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a9" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.2069861530" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.target.2070983899" 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.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.cpu.1346103117" name="CPU (-mcpu)" superClass="com.arm.tool.c.compiler.v6.base.option.cpu" useByScannerDiscovery="true" value="cortex-a9" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.c.compiler.v6.base.option.fpu.90247954" name="FPU (-mfpu)" superClass="com.arm.tool.c.compiler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.target.1068198178" 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.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a7" valueType="string"/>
|
||||
<option id="com.arm.tool.assembler.v6.base.option.cpu.452335018" name="CPU (-mcpu)" superClass="com.arm.tool.assembler.v6.base.option.cpu" useByScannerDiscovery="false" value="cortex-a9" valueType="string"/>
|
||||
|
||||
<option id="com.arm.tool.assembler.v6.base.option.fpu.1016536584" name="FPU (-mfpu)" superClass="com.arm.tool.assembler.v6.base.option.fpu" useByScannerDiscovery="true" value="none" valueType="string"/>
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -251,4 +251,3 @@ no_fiq:
|
||||
BX lr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Executable
+164
@@ -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."
|
||||
@@ -9,6 +9,7 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Some portions generated by Codex (GPT-5).
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -60,5 +61,5 @@
|
||||
.global _tx_thread_smp_time_get
|
||||
.type _tx_thread_smp_time_get, @function
|
||||
_tx_thread_smp_time_get:
|
||||
MOV x0, #0 // FIXME: Get timer
|
||||
MRS x0, CNTPCT_EL0 // Read generic timer physical count
|
||||
RET
|
||||
|
||||
Executable
+169
@@ -0,0 +1,169 @@
|
||||
#!/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 ARMv8-A ports from the generic ARMv8-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_a35 cortex_a53 cortex_a55 cortex_a57 cortex_a65 cortex_a65ae cortex_a72 \
|
||||
cortex_a73 cortex_a75 cortex_a76 cortex_a76ae cortex_a77"
|
||||
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 ARMv8-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
|
||||
neon='Cortex-A35.AArch64.ARMv8.Neon.Crypto'
|
||||
|
||||
sample_cproject="${destination_directory}/example_build/sample_threadx/.cproject"
|
||||
patch_file "${sample_cproject}" 'value="cortex-a35"' "value=\"cortex-${core_short_lower}\""
|
||||
patch_file "${sample_cproject}" "${neon}" "Cortex-${core_short_upper}.AArch64.ARMv8.Neon.Crypto"
|
||||
|
||||
tx_cproject="${destination_directory}/example_build/tx/.cproject"
|
||||
patch_file "${tx_cproject}" 'value="cortex-a35"' "value=\"cortex-${core_short_lower}\""
|
||||
patch_file "${tx_cproject}" "${neon}" "Cortex-${core_short_upper}.AArch64.ARMv8.Neon.Crypto"
|
||||
|
||||
launch="${destination_directory}/example_build/sample_threadx/sample_threadx.launch"
|
||||
patch_file "${launch}" 'Debug Cortex-A35' "Debug Cortex-${core_short_upper}"
|
||||
for count in 1 2 4; do
|
||||
patch_file "${launch}" "Base_A35x${count}" "Base_${core_short_upper}x${count}"
|
||||
patch_file "${launch}" "base_A35x${count}" "base_${core_short_lower}x${count}"
|
||||
patch_file "${launch}" "FVP_Base_Cortex-A35x${count}" "FVP_Base_Cortex-${core_short_upper}x${count}"
|
||||
done
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
@@ -187,7 +187,7 @@ typedef unsigned long long ALIGN_TYPE;
|
||||
/* Define various constants for the ThreadX ARM port. */
|
||||
|
||||
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
|
||||
#define TX_INT_ENABLE 0x00 /* Enable IRQ & FIQ interrupts */
|
||||
#define TX_INT_ENABLE 0x00 /* Enable IRQ & FIQ interrupts */
|
||||
|
||||
|
||||
/* Define the clock source for trace event entry time stamp. The following two item are port specific.
|
||||
|
||||
+17
-3
@@ -78,9 +78,23 @@ elif ! command -v git >/dev/null 2>&1; then
|
||||
elif [ -n "$(git status --porcelain -uno)" ]; then
|
||||
fail "the working tree has uncommitted changes; commit or stash them, or pass --no-regen"
|
||||
else
|
||||
./scripts/copy_armv7_m.sh >/dev/null 2>&1
|
||||
./scripts/copy_armv8_m.sh >/dev/null 2>&1
|
||||
./scripts/copy_module_armv7_m.sh >/dev/null 2>&1
|
||||
# A generator that fails or is missing must not leave the tree looking
|
||||
# clean, which would be a false pass.
|
||||
generator_failed=0
|
||||
run_generator() {
|
||||
if ! "$@" >/dev/null 2>&1; then
|
||||
fail "generator failed: $*"
|
||||
generator_failed=1
|
||||
fi
|
||||
}
|
||||
|
||||
run_generator ./scripts/copy_armv7_m.sh
|
||||
run_generator ./scripts/copy_armv8_m.sh
|
||||
run_generator ./scripts/copy_module_armv7_m.sh
|
||||
run_generator env -C ports_arch/ARMv7-A ./update.sh --port-sets tx \
|
||||
--copy-common-files --copy-port-files --copy-example --patch-files
|
||||
run_generator env -C ports_arch/ARMv8-A ./update.sh --port-sets tx,tx_smp \
|
||||
--copy-common-files --copy-port-files --copy-example --patch-files
|
||||
|
||||
drift="$(git status --porcelain -uno)"
|
||||
if [ -n "$drift" ]; then
|
||||
|
||||
Reference in New Issue
Block a user