mirror of
https://github.com/eclipse-threadx/threadx.git
synced 2026-10-06 06:59:08 +08:00
Merge pull request #783 from eclipse-threadx/dev
Merged changes ahead of the v6.5.2.202603 release
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# Commits that changed file headers, copyright lines or version constants across
|
||||
# the whole tree. They carry no behavioural change, so `git blame` should look
|
||||
# through them to the commit that last touched the code itself.
|
||||
#
|
||||
# GitHub applies this file automatically. To use it locally, run once:
|
||||
#
|
||||
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
#
|
||||
# Add a commit here only when it is mechanical and repository-wide. A commit
|
||||
# that changes behaviour does not belong in this file, however large it is.
|
||||
|
||||
# 2023-10-23 Update release version to 6.3.0 and date to 10-31-2023 (#308)
|
||||
# 1366 files
|
||||
13b700fd3ed763cedcba7dbd17b859077a01aa9c
|
||||
|
||||
# 2024-01-29 Update copyright.
|
||||
# 3618 files
|
||||
8276bcf71142197e09551e29f1779299fa591ec7
|
||||
|
||||
# 2024-01-30 Update version id string.
|
||||
# 1048 files
|
||||
3e1da1f0b0973e6b833b08b10fb27c7c718835b3
|
||||
|
||||
# 2024-02-23 Update the copyright for all assembly files.
|
||||
# 798 files
|
||||
039a3463974f922f6dd6bfb8afb7ee2895eaebcf
|
||||
|
||||
# 2024-02-27 Update version number to 6.4.1
|
||||
# 237 files
|
||||
27f0ce9ca2334b975c298fd00eac1bc05ecec1f7
|
||||
|
||||
# 2025-02-24 Updated ports version to v6.4.2.
|
||||
# 235 files
|
||||
376e26be292f7d579091650a70b5670195240539
|
||||
|
||||
# 2026-03-05 Updated copyright headers and version number constants (#509)
|
||||
# 5970 files
|
||||
c3259a216026372e3833dd8996a68f77e8595fbd
|
||||
|
||||
# 2026-06-03 Release 6.5.1.202602 preparation (#543)
|
||||
# 204 files
|
||||
de1c6e9bbe13e2db480e4e0ed2d3589ebdd5db27
|
||||
|
||||
# 2026-06-06 Added copyright headers to files missing them
|
||||
# 581 files
|
||||
730b61874bc5cf40768987605ae5187fde0fa1e2
|
||||
|
||||
# 2026-06-08 Release 6.5.1.202602a preparation (#547)
|
||||
# 207 files
|
||||
df30b8b96e4c0c6d72e0bb80d2a2ec31666e5afe
|
||||
|
||||
# 2026-09-15 Normalized the AI disclosure comment to one fixed line per file (#740)
|
||||
# 455 files
|
||||
9e4c57138dfa004cd512b60259c1c5047a8b3dd1
|
||||
|
||||
# 2026-09-28 Normalized the AI disclosure comment and added a check that keeps it so (#762)
|
||||
# 158 files
|
||||
83361990cb4d03da8851e30030688ed3abb4d840
|
||||
|
||||
# 2026-09-28 Updated ThreadX version constants and port strings to 6.5.2.202603 (#781)
|
||||
# 212 files
|
||||
a7ded6a3b9e12985a6c52af4df419d2326cccc0a
|
||||
@@ -0,0 +1,91 @@
|
||||
version: 2
|
||||
|
||||
# Keeps the pinned action SHAs moving.
|
||||
#
|
||||
# Every action reference under .github/workflows is a 40-character commit SHA
|
||||
# with the version in a trailing comment. A SHA pin *without* this file is worse
|
||||
# than a floating tag: it freezes CI on whatever was current the day it was
|
||||
# written, which is how actions/cache@v1 came to sit in ci_cortex_m.yml until
|
||||
# GitHub started auto-failing every request that used it. Measured on
|
||||
# 2026-08-24, before the catch-up: download-artifact was four majors behind,
|
||||
# checkout and upload-artifact three each, cache and upload-pages-artifact two.
|
||||
# Nothing had ever reported that, because there was no configuration here -- nor
|
||||
# in netxduo, filex, guix or rtos-docs-asciidoc, so this file sets the pattern
|
||||
# rather than following one.
|
||||
#
|
||||
# Dependabot understands the SHA form and rewrites the trailing version comment
|
||||
# together with the pin, so the comment cannot drift away from the SHA it
|
||||
# describes. That is what keeps "which exact code ran in our CI" answerable from
|
||||
# the repository, which the SBOM and certification work needs on its own.
|
||||
#
|
||||
# Two things this does not fix. It reports drift, not silence: a workflow that
|
||||
# never triggers rots unnoticed no matter what is pinned in it, and the trigger
|
||||
# fixes in ci_cortex_m.yml and regression_test.yml are the cure for that. And it
|
||||
# does nothing at all until this file reaches the default branch -- see the note
|
||||
# on target-branch below.
|
||||
#
|
||||
# There is no entry for any other ecosystem, and that is a decision rather than
|
||||
# an oversight: the project forbids external dependencies, there are no
|
||||
# submodules, and the one pinned tool -- gcovr in scripts/install.sh -- lives in
|
||||
# a shell script that no Dependabot ecosystem can parse. That pin moves by hand.
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
# "/" is the only accepted value for this ecosystem; it covers
|
||||
# .github/workflows and .github/actions. The five reusable-workflow
|
||||
# references in regression_test.yml are local paths
|
||||
# (./.github/workflows/regression_template.yml) and are correctly left
|
||||
# alone -- they carry no version to move.
|
||||
directory: "/"
|
||||
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "06:00"
|
||||
timezone: "Etc/UTC"
|
||||
|
||||
# Dependabot reads this file from the repository's DEFAULT branch, which is
|
||||
# master. But master is deliberately kept behind dev, and pull requests
|
||||
# belong on dev, where the regression suites gate them. target-branch sends
|
||||
# the pull requests to dev and makes Dependabot read the workflows it is
|
||||
# updating from dev as well.
|
||||
#
|
||||
# The consequence to plan for: landing this file on dev arms it, it does not
|
||||
# fire it. Nothing happens until a release merge carries it to master.
|
||||
#
|
||||
# Setting target-branch also opts out of Dependabot *security* updates,
|
||||
# which only ever run against the default branch. For this ecosystem the
|
||||
# cost is small -- an action advisory arrives as an ordinary version bump on
|
||||
# the weekly run -- but it is a real trade and not a detail to rediscover
|
||||
# later.
|
||||
target-branch: "dev"
|
||||
|
||||
groups:
|
||||
# Patch and minor arrive together in one pull request: they are the
|
||||
# routine traffic, and reviewing them one at a time is how an update queue
|
||||
# starts being ignored, which is the failure mode this file exists to
|
||||
# prevent. Majors stay ungrouped, one pull request each, because every
|
||||
# breaking change this repository has met in an action set has been a
|
||||
# major -- download-artifact v8 defaulting digest-mismatch to error, and
|
||||
# upload-artifact v6 requiring runner 2.327.1 or newer, are both from the
|
||||
# last catch-up.
|
||||
actions-minor-and-patch:
|
||||
patterns:
|
||||
- "*"
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
||||
|
||||
# Nine distinct third-party and first-party actions are in use. Dependabot's
|
||||
# default limit of five would hold majors back with nothing saying that it
|
||||
# had; ten leaves room for a wave without becoming a silent cap.
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
labels:
|
||||
- "dependencies"
|
||||
|
||||
# Reviewers are not listed here. .github/CODEOWNERS already routes every
|
||||
# path to @eclipse-threadx/admins and Dependabot honours it.
|
||||
#
|
||||
# Commit subjects are left at Dependabot's own "Bump x from a to b" wording.
|
||||
# The project asks for a past-tense subject and still gets one: these pull
|
||||
# requests are squash-merged, and the subject is set at that point.
|
||||
@@ -1,14 +1,31 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: cortex_m
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
# Cross-compiles the Cortex-M ports with GCC.
|
||||
#
|
||||
# Two things were wrong with this workflow and both are fixed here.
|
||||
#
|
||||
# It ran on master only, for both push and pull_request, while dev is the
|
||||
# integration branch -- the same defect ports_arch_check.yml carries a comment
|
||||
# about, where it cost eight months of ports drifting unnoticed. So this
|
||||
# gated no pull request that anybody opened.
|
||||
#
|
||||
# And it had not compiled anything since at least 2026-06-08. Every run since
|
||||
# then failed in six to eight seconds, at "Prepare all required actions",
|
||||
# before checkout: GitHub automatically fails any request using
|
||||
# actions/cache@v1. Nobody noticed, because of the first defect.
|
||||
#
|
||||
# The toolchain setup now follows clang_check.yml rather than third party
|
||||
# actions: a pinned release fetched directly, verified against Arm's published
|
||||
# checksum, and cached with actions/cache@v4. That also moves the compiler
|
||||
# from 9-2019-q4 to a version matching the project's stated GCC 14 default.
|
||||
#
|
||||
# This covers four ports of the forty under ports/ that have a gnu directory.
|
||||
# Widening that to every Arm gnu port is separate work.
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ master, dev ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [ master, dev ]
|
||||
paths:
|
||||
- ".github/workflows/ci_cortex_m.yml"
|
||||
- 'common/**'
|
||||
@@ -18,60 +35,79 @@ on:
|
||||
- 'ports/cortex_m4/gnu/**'
|
||||
- 'ports/cortex_m7/gnu/**'
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
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:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
port: [0, 3, 4, 7]
|
||||
|
||||
name: Cortex M${{ matrix.port }} build
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
env:
|
||||
# Pinned deliberately, as the runner image is: a toolchain upgrade should
|
||||
# be a reviewable commit rather than something that changes underneath the
|
||||
# ports. Releases: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
|
||||
GCC_VERSION: 14.3.rel1
|
||||
GCC_TARGET: arm-none-eabi
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# Actions are pinned to a commit SHA, with the version in the trailing
|
||||
# comment. A tag can be moved; a SHA cannot, so this is what makes "which
|
||||
# code ran in CI" answerable from the repository. Dependabot moves these
|
||||
# pins and rewrites the comment with them -- see .github/dependabot.yml.
|
||||
- name: Check out the repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
# Store the arm compilers in the cache to speed up builds
|
||||
- name: Cache arm-none-eabi-gcc tools
|
||||
- name: Cache the Arm GNU toolchain
|
||||
id: cache-arm-gcc
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: $HOME/arm-none-eabi-gcc-9-2019-q4
|
||||
key: ${{ runner.os }}-arm-gcc-9-2019-q4
|
||||
path: toolchain
|
||||
key: arm-gnu-toolchain-${{ env.GCC_VERSION }}-x86_64-${{ env.GCC_TARGET }}
|
||||
|
||||
# Get the arm-non-eabi-gcc toolchain
|
||||
- name: Install arm-none-eabi-gcc
|
||||
uses: fiam/arm-none-eabi-gcc@v1
|
||||
- name: Install the Arm GNU toolchain
|
||||
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
|
||||
with:
|
||||
release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
|
||||
directory: $HOME/arm-none-eabi-gcc-9-2019-q4
|
||||
run: |
|
||||
set -eu
|
||||
base="https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_VERSION}/binrel"
|
||||
archive="arm-gnu-toolchain-${GCC_VERSION}-x86_64-${GCC_TARGET}.tar.xz"
|
||||
mkdir -p toolchain && cd toolchain
|
||||
curl -fsSLO "$base/$archive"
|
||||
curl -fsSLO "$base/$archive.sha256asc"
|
||||
sha256sum -c "$archive.sha256asc"
|
||||
tar xf "$archive"
|
||||
rm -f "$archive"
|
||||
|
||||
# Get CMake into the environment
|
||||
- name: Install cmake 3.19.1
|
||||
uses: lukka/get-cmake@v3.19.1
|
||||
- name: Put the toolchain on PATH
|
||||
run: |
|
||||
set -eu
|
||||
echo "$GITHUB_WORKSPACE/toolchain/arm-gnu-toolchain-${GCC_VERSION}-x86_64-${GCC_TARGET}/bin" >> "$GITHUB_PATH"
|
||||
|
||||
# Get Ninja into the environment
|
||||
- name: Install ninja-build
|
||||
uses: seanmiddleditch/gha-setup-ninja@v3
|
||||
# Only reaches apt if the runner image has stopped shipping ninja. This
|
||||
# repository has already paid for unguarded apt calls: scripts/install.sh
|
||||
# carries a long comment about apt-get update stalling for over two hours
|
||||
# and taking whole regression runs with it. Do not turn this into an
|
||||
# unconditional install.
|
||||
- name: Ensure ninja is available
|
||||
run: |
|
||||
set -eu
|
||||
if command -v ninja >/dev/null 2>&1; then
|
||||
ninja --version
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends ninja-build
|
||||
fi
|
||||
|
||||
- name: Report the toolchain version
|
||||
run: ${{ env.GCC_TARGET }}-gcc --version
|
||||
|
||||
# Prepare the build system
|
||||
- name: Prepare build system
|
||||
run: cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=./cmake/cortex_m${{ matrix.port }}.cmake -GNinja .
|
||||
env:
|
||||
PATH: "$HOME/arm-none-eabi-gcc-9-2019-q4/bin:$PATH"
|
||||
|
||||
- name: Compile and link
|
||||
run: cmake --build ./build
|
||||
env:
|
||||
PATH: "$HOME/arm-none-eabi-gcc-9-2019-q4/bin:$PATH"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
name: clang_check
|
||||
|
||||
# Builds the Arm ports with Arm Toolchain for Embedded, which is LLVM based and
|
||||
# is the successor to Arm Compiler 6. The gnu ports are otherwise only ever
|
||||
# built with GNU tooling, and GNU as accepts several non-canonical forms that
|
||||
# LLVM's assembler rejects; this catches those before they accumulate.
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, dev ]
|
||||
paths:
|
||||
- ".github/workflows/clang_check.yml"
|
||||
- "scripts/check_clang.sh"
|
||||
# CMakeLists.txt, cmake/ and common_smp/ were missing until 26 Aug 2026,
|
||||
# so this check did not run when the files it reads changed. The
|
||||
# ports_smp example builds compile common_smp/src and the CMake stage
|
||||
# reads the toolchain file and the top-level project. utility/ is
|
||||
# deliberately absent: the FreeRTOS and POSIX layers under it are not
|
||||
# enabled by any target this workflow builds. Keep this list and
|
||||
# gcc_check.yml's the same.
|
||||
- "CMakeLists.txt"
|
||||
- "cmake/**"
|
||||
- "common/**"
|
||||
# common_modules/ holds the portable module manager that the module
|
||||
# manager stage compiles once per Arm module port -- the larger half of
|
||||
# what that stage builds. Without it a change there leaves the stage
|
||||
# unrun, which is the same "absent from the count reads as covered" the
|
||||
# stage exists to close.
|
||||
- "common_modules/**"
|
||||
- "common_smp/**"
|
||||
- "ports/**"
|
||||
- "ports_arch/**"
|
||||
- "ports_module/**"
|
||||
- "ports_smp/**"
|
||||
|
||||
jobs:
|
||||
atfe:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
env:
|
||||
# Pinned deliberately, as the runner image is: a toolchain upgrade should
|
||||
# be a reviewable commit rather than something that changes underneath the
|
||||
# ports. Releases: https://github.com/arm/arm-toolchain/releases
|
||||
ATFE_VERSION: 22.1.0
|
||||
|
||||
steps:
|
||||
# Actions are pinned to a commit SHA, with the version in the trailing
|
||||
# comment. A tag can be moved; a SHA cannot, so this is what makes "which
|
||||
# code ran in CI" answerable from the repository. Dependabot moves these
|
||||
# pins and rewrites the comment with them -- see .github/dependabot.yml.
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Cache Arm Toolchain for Embedded
|
||||
id: cache-atfe
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: atfe
|
||||
key: atfe-${{ env.ATFE_VERSION }}-linux-x86_64
|
||||
|
||||
- name: Install Arm Toolchain for Embedded
|
||||
if: steps.cache-atfe.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -eu
|
||||
base="https://github.com/arm/arm-toolchain/releases/download/release-${ATFE_VERSION}-ATfE"
|
||||
archive="ATfE-${ATFE_VERSION}-Linux-x86_64.tar.xz"
|
||||
mkdir -p atfe && cd atfe
|
||||
curl -fsSLO "$base/$archive"
|
||||
curl -fsSLO "$base/$archive.sha256"
|
||||
sha256sum -c "$archive.sha256"
|
||||
tar xf "$archive"
|
||||
rm -f "$archive"
|
||||
|
||||
- name: Build the Arm ports with clang
|
||||
run: scripts/check_clang.sh --clang "atfe/ATfE-${ATFE_VERSION}-Linux-x86_64/bin/clang"
|
||||
@@ -0,0 +1,192 @@
|
||||
name: gcc_check
|
||||
|
||||
# Builds the Arm ports with the Arm GNU toolchain, in six stages: assemble
|
||||
# every assembly source of every Arm gnu port, assemble again the parts guarded
|
||||
# by feature macros, compile the common C sources for one core per architecture
|
||||
# profile, compile the module manager C sources once per Arm module port, then
|
||||
# link the example builds, both the script-driven ones and those driven by
|
||||
# CMake.
|
||||
#
|
||||
# Why this exists: GCC 14 on Linux is the project's default compiler, it is
|
||||
# what the gnu ports exist for, and until this workflow landed, nothing in CI
|
||||
# compiled a line of any port with it. The only cross-compilation check that
|
||||
# ran was clang_check, so the LLVM path was better guarded than the GNU one,
|
||||
# on ports whose directory is literally named gnu.
|
||||
#
|
||||
# What it covers: 840 assembly sources across 40 port families, 469 of them
|
||||
# again behind feature macros, common/src for nine cores, 302 module manager C
|
||||
# files across the nine Arm module ports, 42 script-driven example links and
|
||||
# the five Cortex-R52 CMake images. Every skip is printed by name with a reason
|
||||
# -- run scripts/check_gcc.sh --help, or read its header.
|
||||
#
|
||||
# What it does not cover: it compiles and links and **executes nothing**. The
|
||||
# Cortex-R52 FVP ctest suite is not part of it. RISC-V, MIPS, RX and ARC are
|
||||
# outside it entirely -- RISC-V deliberately, and now for a stronger reason
|
||||
# than when this was written: regression_test.yml builds both its ports and
|
||||
# runs 955 tests on them under QEMU, which is more than a compile check could
|
||||
# say. Adding them here would widen this workflow's toolchain download by about
|
||||
# a gigabyte to re-prove a subset of that.
|
||||
#
|
||||
# It does not supersede cortex_m. That workflow builds four ports *through
|
||||
# CMake*, which is the only thing exercising cmake/cortex_m*.cmake and the
|
||||
# top-level CMakeLists for the M profile; this script's CMake stage covers
|
||||
# cortex_r52 only. The overlap is the assembly and the C sources, not the build
|
||||
# system.
|
||||
on:
|
||||
# push as well as pull_request, so dev's own history has a baseline and a bad
|
||||
# squash-merge is caught rather than waiting for the next PR to notice. dev is
|
||||
# named because it is the integration branch: a workflow that triggers only on
|
||||
# master does not gate any pull request anybody opens, which is the defect
|
||||
# ports_arch_check.yml carries a comment about and which cost cortex_m three
|
||||
# months of failing in seven seconds unnoticed.
|
||||
push:
|
||||
branches: [ master, dev ]
|
||||
paths:
|
||||
- ".github/workflows/gcc_check.yml"
|
||||
- "scripts/check_gcc.sh"
|
||||
- "CMakeLists.txt"
|
||||
- "cmake/**"
|
||||
- "common/**"
|
||||
# common_modules/ holds the portable module manager that the module
|
||||
# manager stage compiles once per Arm module port -- the larger half of
|
||||
# what that stage builds. Without it a change there leaves the stage
|
||||
# unrun, which is the same "absent from the count reads as covered" the
|
||||
# stage exists to close.
|
||||
- "common_modules/**"
|
||||
- "common_smp/**"
|
||||
- "ports/**"
|
||||
- "ports_arch/**"
|
||||
- "ports_module/**"
|
||||
- "ports_smp/**"
|
||||
pull_request:
|
||||
branches: [ master, dev ]
|
||||
# The two lists are duplicated rather than shared through a YAML anchor.
|
||||
# GitHub Actions' workflow parser does not dependably honour anchors, and
|
||||
# the failure mode is the whole workflow refusing to parse -- which is the
|
||||
# cortex_m failure again, a job that dies before it does anything. Ten
|
||||
# duplicated lines are cheaper than that. **Edit both.**
|
||||
#
|
||||
# common_smp, CMakeLists.txt and cmake/ are here and are absent from
|
||||
# clang_check.yml's otherwise identical list, which is a gap in that file
|
||||
# and is fixed alongside this one: the ports_smp example builds compile
|
||||
# common_smp/src, and the CMake stage reads the toolchain file and the
|
||||
# top-level project. utility/ is deliberately absent -- the FreeRTOS and
|
||||
# POSIX layers under it are not enabled by any target this workflow builds.
|
||||
paths:
|
||||
- ".github/workflows/gcc_check.yml"
|
||||
- "scripts/check_gcc.sh"
|
||||
- "CMakeLists.txt"
|
||||
- "cmake/**"
|
||||
- "common/**"
|
||||
# common_modules/ holds the portable module manager that the module
|
||||
# manager stage compiles once per Arm module port -- the larger half of
|
||||
# what that stage builds. Without it a change there leaves the stage
|
||||
# unrun, which is the same "absent from the count reads as covered" the
|
||||
# stage exists to close.
|
||||
- "common_modules/**"
|
||||
- "common_smp/**"
|
||||
- "ports/**"
|
||||
- "ports_arch/**"
|
||||
- "ports_module/**"
|
||||
- "ports_smp/**"
|
||||
|
||||
jobs:
|
||||
gnu:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
env:
|
||||
# Pinned deliberately, as the runner image is: a toolchain upgrade should
|
||||
# be a reviewable commit rather than something that changes underneath the
|
||||
# ports. 14.3.rel1 is the GCC 14 the project builds against, and the
|
||||
# version cortex_m already pins.
|
||||
# Releases: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
|
||||
GCC_VERSION: 14.3.rel1
|
||||
|
||||
steps:
|
||||
# Actions are pinned to a commit SHA, with the version in the trailing
|
||||
# comment. A tag can be moved; a SHA cannot, so this is what makes "which
|
||||
# code ran in CI" answerable from the repository. Dependabot moves these
|
||||
# pins and rewrites the comment with them -- see .github/dependabot.yml.
|
||||
- name: Check out the repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# Two toolchains, because Arm ships AArch32 and AArch64 as separate
|
||||
# downloads and scripts/check_gcc.sh needs both -- every port maps to one of
|
||||
# exactly those two triples. One job with two cache steps rather than two
|
||||
# jobs, so the checks list stays short and a single script invocation sees
|
||||
# both compilers.
|
||||
#
|
||||
# The AArch32 path and key match cortex_m's exactly, so the two workflows
|
||||
# share one cache entry rather than each holding its own copy of the same
|
||||
# 500MB archive. Change them together or the sharing silently stops and the
|
||||
# only symptom is a slower run.
|
||||
- name: Cache the AArch32 Arm GNU toolchain
|
||||
id: cache-arm32
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: toolchain
|
||||
key: arm-gnu-toolchain-${{ env.GCC_VERSION }}-x86_64-arm-none-eabi
|
||||
|
||||
- name: Cache the AArch64 Arm GNU toolchain
|
||||
id: cache-arm64
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: toolchain64
|
||||
key: arm-gnu-toolchain-${{ env.GCC_VERSION }}-x86_64-aarch64-none-elf
|
||||
|
||||
# The checksum suffix is .sha256asc and not .sha256, and that is not a
|
||||
# stylistic choice. Arm publishes both for this release, and for
|
||||
# arm-none-eabi the .sha256 file contains a 32-character MD5 rather than a
|
||||
# SHA-256 -- verified 26 Aug 2026 -- so sha256sum -c on it fails with "no
|
||||
# properly formatted checksum lines found". .sha256asc is a plain
|
||||
# sha256sum-format line for both triples. Do not "simplify" the suffix.
|
||||
- name: Install the AArch32 Arm GNU toolchain
|
||||
if: steps.cache-arm32.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -eu
|
||||
base="https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_VERSION}/binrel"
|
||||
archive="arm-gnu-toolchain-${GCC_VERSION}-x86_64-arm-none-eabi.tar.xz"
|
||||
mkdir -p toolchain && cd toolchain
|
||||
curl -fsSLO "$base/$archive"
|
||||
curl -fsSLO "$base/$archive.sha256asc"
|
||||
sha256sum -c "$archive.sha256asc"
|
||||
tar xf "$archive"
|
||||
rm -f "$archive"
|
||||
|
||||
- name: Install the AArch64 Arm GNU toolchain
|
||||
if: steps.cache-arm64.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -eu
|
||||
base="https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_VERSION}/binrel"
|
||||
archive="arm-gnu-toolchain-${GCC_VERSION}-x86_64-aarch64-none-elf.tar.xz"
|
||||
mkdir -p toolchain64 && cd toolchain64
|
||||
curl -fsSLO "$base/$archive"
|
||||
curl -fsSLO "$base/$archive.sha256asc"
|
||||
sha256sum -c "$archive.sha256asc"
|
||||
tar xf "$archive"
|
||||
rm -f "$archive"
|
||||
|
||||
# Only reaches apt if the runner image has stopped shipping ninja, which
|
||||
# the CMake stage needs. This repository has already paid for unguarded apt
|
||||
# calls: scripts/install.sh carries a long comment about apt-get update
|
||||
# stalling for over two hours and taking whole regression runs with it. Do
|
||||
# not turn this into an unconditional install.
|
||||
- name: Ensure ninja is available
|
||||
run: |
|
||||
set -eu
|
||||
if command -v ninja >/dev/null 2>&1; then
|
||||
ninja --version
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends ninja-build
|
||||
fi
|
||||
|
||||
# The script is told where both toolchains are rather than being left to
|
||||
# find them on PATH, so nothing about the runner image can decide which
|
||||
# compiler is used. The script prints both versions it resolved, which is
|
||||
# what makes "was this really 14.3.rel1?" answerable from the log.
|
||||
- name: Build the Arm ports with GCC
|
||||
run: |
|
||||
scripts/check_gcc.sh \
|
||||
--arm-none-eabi "$GITHUB_WORKSPACE/toolchain/arm-gnu-toolchain-${GCC_VERSION}-x86_64-arm-none-eabi/bin" \
|
||||
--aarch64-none-elf "$GITHUB_WORKSPACE/toolchain64/arm-gnu-toolchain-${GCC_VERSION}-x86_64-aarch64-none-elf/bin"
|
||||
@@ -6,7 +6,10 @@ name: ports_arch_check
|
||||
# events but only for the master branch
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
# dev is included as well as master. The check only ever ran against master,
|
||||
# so eight months of port fixes merged into dev without it, and the ports
|
||||
# drifted from ports_arch unnoticed.
|
||||
branches: [ master, dev ]
|
||||
paths:
|
||||
- ".github/workflows/ports_arch_check.yml"
|
||||
- 'common/**'
|
||||
@@ -22,52 +25,60 @@ 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:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout sources recursively
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
||||
submodules: true
|
||||
# No token input: secrets are not available to pull requests from forks, so
|
||||
# passing one made this job fail at checkout with "Input required and not
|
||||
# supplied: token" and the check never evaluated anything. The default
|
||||
# GITHUB_TOKEN is enough to check out a public repository, and the
|
||||
# repository has no submodules.
|
||||
# Actions are pinned to a commit SHA, with the version in the trailing
|
||||
# comment. A tag can be moved; a SHA cannot, so this is what makes "which
|
||||
# code ran in CI" answerable from the repository. Dependabot moves these
|
||||
# pins and rewrites the comment with them -- see .github/dependabot.yml.
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# Copy ports arch
|
||||
- name: Copy ports arch
|
||||
# Check the port trees: the generated ports must be reproducible from
|
||||
# ports_arch, and no port header may be left unbalanced or carrying code
|
||||
# outside a function. The same script runs locally, so a contributor sees
|
||||
# exactly what CI sees.
|
||||
- name: Check ports
|
||||
run: scripts/check_ports.sh
|
||||
|
||||
cortex-a:
|
||||
# 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:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# No token input: secrets are not available to pull requests from forks, so
|
||||
# passing one made this job fail at checkout with "Input required and not
|
||||
# supplied: token" and the check never evaluated anything. The default
|
||||
# GITHUB_TOKEN is enough to check out a public repository, and the
|
||||
# repository has no submodules.
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# 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: |
|
||||
scripts/copy_armv7_m.sh && scripts/copy_armv8_m.sh && scripts/copy_module_armv7_m.sh
|
||||
(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 "Ports for ARM architecture is not updated"
|
||||
git status
|
||||
echo "The Cortex-A ports are not reproducible from ports_arch:"
|
||||
git status --porcelain -uno
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cortex-a:
|
||||
# Check ports for cortex-a
|
||||
runs-on: windows-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout sources recursively
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
||||
submodules: true
|
||||
|
||||
# Copy ports arch
|
||||
- name: Copy ports arch
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,24 @@
|
||||
name: regression_test
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
# Runs the ThreadX, SMP and FreeRTOS-compatibility regression suites.
|
||||
#
|
||||
# dev is included as well as master, for the same reason ports_arch_check.yml
|
||||
# names it: dev is the integration branch, so a check that runs only against
|
||||
# master gates nothing that anybody opens. Until now these suites ran on no
|
||||
# pull request that anybody actually raised, and the last dev run of any kind
|
||||
# was a manual workflow_dispatch.
|
||||
#
|
||||
# That run, on 2026-08-18, failed two tests: threadx_timer_simple_test in the
|
||||
# ThreadX suite and threadx_thread_priority_change in the SMP one. Both are
|
||||
# fixed -- the first by running the suites one test at a time (#643), the
|
||||
# second by #647 -- and both suites now pass all 1030 tests across all ten
|
||||
# build configurations. The suites were never the problem; the trigger was.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ master, dev ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [ master, dev ]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
@@ -26,6 +37,17 @@ jobs:
|
||||
cmake_path: ./test/tx/cmake
|
||||
result_affix: ThreadX
|
||||
skip_deploy: true
|
||||
# 99 is the tightest floor available below this suite's figure. The
|
||||
# merged report reads 4503/4503 lines -- 100.00% -- on the dev push run
|
||||
# of #666, and two local runs of the same green tree came in at 100.00%
|
||||
# and 99.98%: tx_thread_system_resume.c:529 is reached by timing rather
|
||||
# than by construction and flaps between runs, and #666 could not reach
|
||||
# it deliberately. So a floor of 100 is a check that fails on a race --
|
||||
# probed against the pinned action, 4502/4503 fails a floor of 100 and
|
||||
# clears one of 99 -- and the thresholds are integers, so there is
|
||||
# nothing between the two. Ratchet this to 100 if 529 is ever covered
|
||||
# by construction.
|
||||
coverage_thresholds: '99 100'
|
||||
smp:
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -41,25 +63,88 @@ jobs:
|
||||
cmake_path: ./test/smp/cmake
|
||||
result_affix: SMP
|
||||
skip_deploy: true
|
||||
# riscv: disabled — re-enable when RISC-V CI is ready
|
||||
# riscv:
|
||||
# permissions:
|
||||
# contents: read
|
||||
# issues: read
|
||||
# checks: write
|
||||
# pull-requests: write
|
||||
# pages: write
|
||||
# id-token: write
|
||||
# uses: ./.github/workflows/regression_template.yml
|
||||
# with:
|
||||
# install_script: ./scripts/install_riscv.sh
|
||||
# build_script: ./scripts/build_tx_riscv.sh
|
||||
# test_script: ./scripts/test_tx_riscv.sh
|
||||
# cmake_path: ./test/tx/cmake/riscv
|
||||
# result_affix: RISC-V
|
||||
# skip_deploy: true
|
||||
# skip_coverage: true
|
||||
# Raised from 98 with the four tests that closed 53 of the 64 lines this
|
||||
# comment used to list: the merged report goes from 5114/5178 -- 98.76% --
|
||||
# to 5167/5178, 99.79%. A floor of 99 needs 5127, so there are 40 lines of
|
||||
# headroom against a numerator measured flickering by two between runs.
|
||||
#
|
||||
# Still not 100, and not because the last eleven lines were skipped. Eight
|
||||
# are tx_byte_pool_search.c's ownership delay loop, which needs another
|
||||
# core to take the pool inside the window the search opens when it drops
|
||||
# protection every twenty blocks; this port serialises all four cores on
|
||||
# one pthread mutex and the thread that releases it wins the re-acquire
|
||||
# every time -- measured over 180,003 windows, zero handovers. The other
|
||||
# three are in tx_thread_smp_utilities.c: one is a range guard placed
|
||||
# after the shift it is meant to guard, so reaching it needs undefined
|
||||
# behaviour, and two are a priority-inheritance branch that needs the
|
||||
# mutex owner genuinely executing on another core. See #677, which
|
||||
# made these measurements and raised the floor.
|
||||
coverage_thresholds: '99 100'
|
||||
freertos:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
checks: write
|
||||
pull-requests: write
|
||||
pages: write
|
||||
id-token: write
|
||||
uses: ./.github/workflows/regression_template.yml
|
||||
with:
|
||||
build_script: ./scripts/build_freertos.sh
|
||||
test_script: ./scripts/test_freertos.sh
|
||||
cmake_path: ./test/freertos/cmake
|
||||
result_affix: FreeRTOS
|
||||
skip_deploy: true
|
||||
# No coverage build configuration yet; the suite covers the creation
|
||||
# paths of the layer rather than all of it.
|
||||
skip_coverage: true
|
||||
riscv:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
checks: write
|
||||
pull-requests: write
|
||||
pages: write
|
||||
id-token: write
|
||||
uses: ./.github/workflows/regression_template.yml
|
||||
with:
|
||||
install_script: ./scripts/install_riscv.sh
|
||||
build_script: ./scripts/build_tx_riscv.sh
|
||||
test_script: ./scripts/test_tx_riscv.sh
|
||||
cmake_path: ./test/tx/cmake/riscv
|
||||
result_affix: RISC-V
|
||||
skip_deploy: true
|
||||
# No coverage from this suite, and not for want of a build configuration.
|
||||
# These tests are bare-metal images run under QEMU with -bios none, and
|
||||
# test/tx/cmake/riscv/bsp/syscalls.c gives them _write to the UART, _exit
|
||||
# through the sifive_test device, and stubs for _close, _fstat, _isatty,
|
||||
# _lseek, _read and _sbrk -- but no _open. gcov emits a .gcda by opening
|
||||
# a path, so instrumenting these builds would produce nothing to read.
|
||||
#
|
||||
# test/tx/cmake/riscv/CMakeLists.txt is its own top-level project and does
|
||||
# not declare the TX_COVERAGE option that test/tx/cmake and test/smp/cmake
|
||||
# do, so the OFF the template exports is inert here rather than the thing
|
||||
# holding coverage off.
|
||||
#
|
||||
# Collecting it therefore needs a transport off the target -- gcov's dump
|
||||
# routines over the UART the BSP already drives, or semihosting -- and not
|
||||
# a default_build_coverage entry beside the other five configurations.
|
||||
skip_coverage: true
|
||||
deploy:
|
||||
# Publishing the coverage report stays on master. Adding dev to this
|
||||
# workflow's triggers was meant to run the suites on the branch the pull
|
||||
# requests target, not to change what gets published -- and the first
|
||||
# push to dev after that change failed here with 'Branch "dev" is not
|
||||
# allowed to deploy to github-pages due to environment protection rules',
|
||||
# while all three suites passed. The github-pages environment restricts
|
||||
# deployments to master, so the job was rejected before it ran.
|
||||
#
|
||||
# Guarding here rather than relaxing the environment rule, because the
|
||||
# rule is doing its job: it is a deliberate answer to the question of
|
||||
# which branch the published report describes. Moving that answer to dev
|
||||
# is a separate decision, and it needs the environment setting changed
|
||||
# as well as this line removed.
|
||||
if: github.ref == 'refs/heads/master'
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# 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
|
||||
###############################################################################
|
||||
|
||||
name: repo_checks
|
||||
|
||||
# Repository-wide text checks.
|
||||
#
|
||||
# THIS LIVES IN ITS OWN WORKFLOW BECAUSE IT MUST NOT BE PATH-FILTERED, and a
|
||||
# path filter is a property of a workflow rather than of a job. The check
|
||||
# selects its input with `git ls-files` and scans every tracked file, so any
|
||||
# file at all can carry a finding.
|
||||
#
|
||||
# That is not hypothetical here. The pass that introduced the fixed
|
||||
# disclosure line covered source files only, and the drift it was meant to end
|
||||
# survived for months afterwards in CMake files, toolchain files, shell and
|
||||
# PowerShell scripts, a GDB script and a Visual Studio manifest -- precisely
|
||||
# the files a source-path filter would have skipped. A workflow that gates no
|
||||
# pull request anybody opens is worse than no workflow, because it looks like
|
||||
# coverage.
|
||||
#
|
||||
# Cheap enough that running it on everything costs nothing worth measuring: it
|
||||
# is grep over a repository this size, with no toolchain, no build and no
|
||||
# cache.
|
||||
|
||||
on:
|
||||
# No `paths:` on either trigger, deliberately. See above.
|
||||
push:
|
||||
branches: [ dev, master ]
|
||||
pull_request:
|
||||
branches: [ dev, master ]
|
||||
|
||||
# A second push to the same branch makes the first answer irrelevant.
|
||||
concurrency:
|
||||
group: repo-checks-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
# Actions are pinned to a commit SHA with the version in the trailing
|
||||
# comment. A tag can be moved; a SHA cannot, which is what makes "which
|
||||
# code ran in our CI" answerable from the repository.
|
||||
- name: Check out the repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Check the AI disclosure comments
|
||||
run: scripts/check_ai_disclosure.sh
|
||||
+10
-3
@@ -3,8 +3,7 @@
|
||||
.metadata/
|
||||
.tmp/
|
||||
_deps/
|
||||
build/
|
||||
build_qemu/
|
||||
build*/
|
||||
Debug/
|
||||
CMakeFiles/
|
||||
CMakeScripts/
|
||||
@@ -25,5 +24,13 @@ CTestTestfile.cmake
|
||||
|
||||
|
||||
# Local build artifacts
|
||||
build_m7/
|
||||
.codex
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Keil uVision per-user state, regenerated when a project is opened.
|
||||
# The .uvprojx / .uvproj project files are the ones worth tracking.
|
||||
*.uvoptx
|
||||
*.uvopt
|
||||
*.uvgui
|
||||
*.uvgui.*
|
||||
|
||||
@@ -24,10 +24,24 @@ endif()
|
||||
|
||||
option(THREADX_SMP "Build ThreadX SMP version" OFF)
|
||||
|
||||
# Enable testing at the top level so that tests registered by ports and
|
||||
# example builds further down the tree are discoverable with ctest from the
|
||||
# build root. Without this, add_test() in a subdirectory still generates a
|
||||
# CTestTestfile.cmake there, but the root does not reference it and
|
||||
# "ctest --test-dir <build>" reports no tests at all.
|
||||
enable_testing()
|
||||
|
||||
if(THREADX_SMP)
|
||||
set(TX_PORT_DIR "ports_smp")
|
||||
set(TX_COMMON_DIR "common_smp")
|
||||
set(TX_ARCH_DIR "${THREADX_ARCH}_smp")
|
||||
# Most SMP ports are named <arch>_smp, but ports_smp/linux and
|
||||
# ports_smp/win64 predate that convention and carry no suffix. Fall back to
|
||||
# the bare name for them. The check only fires when the suffixed directory
|
||||
# is absent, so no port that already resolves changes.
|
||||
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${TX_PORT_DIR}/${TX_ARCH_DIR}")
|
||||
set(TX_ARCH_DIR "${THREADX_ARCH}")
|
||||
endif()
|
||||
message(STATUS "Building ThreadX SMP version")
|
||||
else()
|
||||
set(TX_PORT_DIR "ports")
|
||||
@@ -59,6 +73,7 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR})
|
||||
# Define the FreeRTOS adaptation layer
|
||||
add_library(freertos-threadx EXCLUDE_FROM_ALL)
|
||||
target_include_directories(freertos-threadx
|
||||
SYSTEM
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}/utility/rtos_compatibility_layers/FreeRTOS
|
||||
)
|
||||
@@ -68,6 +83,24 @@ target_sources(freertos-threadx
|
||||
)
|
||||
target_link_libraries(freertos-threadx PUBLIC threadx)
|
||||
|
||||
# Define the POSIX compatibility layer. It supplies its own errno.h, fcntl.h,
|
||||
# pthread.h, sched.h, signal.h and time.h, so it cannot be combined with the
|
||||
# hosted simulation ports: those build against a full C library that already
|
||||
# provides those headers, and the layer's pthread.h even shares the _PTHREAD_H
|
||||
# include guard with glibc's. Skip it there rather than offering a target that
|
||||
# could never build.
|
||||
#
|
||||
# It is also single-core by construction: px_int.h declares
|
||||
# _tx_thread_current_ptr as a plain pointer, which is a per-core array in an SMP
|
||||
# build, and the layer has no notion of which core it is running on.
|
||||
if(THREADX_ARCH MATCHES "^(linux|win32|win64)$")
|
||||
message(STATUS "POSIX compatibility layer not available for ${THREADX_ARCH}")
|
||||
elseif(THREADX_SMP)
|
||||
message(STATUS "POSIX compatibility layer not available for SMP builds")
|
||||
else()
|
||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/utility/rtos_compatibility_layers/posix)
|
||||
endif()
|
||||
|
||||
# If the user provided an override, copy it to the custom directory
|
||||
if (NOT TX_USER_FILE)
|
||||
message(STATUS "Using default tx_user.h file")
|
||||
@@ -77,6 +110,7 @@ else()
|
||||
endif()
|
||||
configure_file(${TX_USER_FILE} ${CUSTOM_INC_DIR}/tx_user.h COPYONLY)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
SYSTEM
|
||||
PUBLIC
|
||||
${CUSTOM_INC_DIR}
|
||||
)
|
||||
|
||||
+339
-43
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ Eclipse ThreadX has been integrated to the semiconductor's SDKs and development
|
||||
|
||||
We also provide [getting started guide](https://github.com/eclipse-threadx/getting-started) and [samples](https://github.com/eclipse-threadx/samples) using development boards from semiconductors you can build and test with.
|
||||
|
||||
See [Overview of Eclipse ThreadX RTOS](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/overview-threadx.md) for the high-level overview.
|
||||
See [Overview of Eclipse ThreadX RTOS](https://threadx.io/releases/6.5.1/threadx/main/overview-threadx.html) for the high-level overview.
|
||||
|
||||
## Repository Structure and Usage
|
||||
### Directory layout
|
||||
@@ -118,7 +118,7 @@ xtensa cortex_a65ae
|
||||
```
|
||||
|
||||
### ThreadX Modules
|
||||
[Eclipse ThreadX Modules](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx-modules/chapter1.md) component provides an infrastructure for applications to dynamically load modules that are built separately from the resident portion of the application.
|
||||
[Eclipse ThreadX Modules](https://threadx.io/releases/6.5.1/threadx-modules/main/chapter1.html) component provides an infrastructure for applications to dynamically load modules that are built separately from the resident portion of the application.
|
||||
```
|
||||
cortex_a35
|
||||
cortex_a35_smp
|
||||
@@ -134,7 +134,7 @@ rxv2
|
||||
```
|
||||
|
||||
### ThreadX SMP
|
||||
[Eclipse ThreadX SMP](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/threadx-smp/chapter1.md) is a high-performance real-time SMP kernel designed specifically for embedded applications.
|
||||
[Eclipse ThreadX SMP](https://threadx.io/releases/6.5.1/threadx/main/threadx-smp/chapter1.html) is a high-performance real-time SMP kernel designed specifically for embedded applications.
|
||||
```
|
||||
arc_hs_smp
|
||||
cortex_a34_smp
|
||||
@@ -210,7 +210,7 @@ License terms for using Eclipse ThreadX are defined in the LICENSE.txt file of t
|
||||
|
||||
The following are references to additional ThreadX RTOS resources:
|
||||
|
||||
- **Product introduction**: https://github.com/eclipse-threadx/rtos-docs
|
||||
- **Product introduction**: https://threadx.io/releases/latest
|
||||
- **Product issues and bugs, or feature requests**: https://github.com/eclipse-threadx/threadx/issues
|
||||
- **TraceX Installer**: https://aka.ms/azrtos-tracex-installer
|
||||
|
||||
|
||||
+442
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,44 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Shared settings for the AArch64 bare metal ports, the counterpart of
|
||||
# arm-none-eabi.cmake beside it. The two differ by more than the tool prefix:
|
||||
# AArch64 has no -marm or -mthumb to choose between, no -mfloat-abi, and
|
||||
# aarch64-none-elf-gcc rejects -mlong-calls outright, so that flag cannot simply
|
||||
# be carried across.
|
||||
#
|
||||
# The tools are named without a path, so an aarch64-none-elf toolchain must be
|
||||
# on PATH. Override CMAKE_C_COMPILER and friends on the command line to use one
|
||||
# that is not.
|
||||
|
||||
# Toolchain settings
|
||||
set(CMAKE_C_COMPILER aarch64-none-elf-gcc)
|
||||
set(CMAKE_CXX_COMPILER aarch64-none-elf-g++)
|
||||
set(AS aarch64-none-elf-as)
|
||||
set(AR aarch64-none-elf-ar)
|
||||
set(OBJCOPY aarch64-none-elf-objcopy)
|
||||
set(OBJDUMP aarch64-none-elf-objdump)
|
||||
set(SIZE aarch64-none-elf-size)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
|
||||
# Build the try-compile as a static library so no linker script or startup code
|
||||
# is needed just to test the compiler.
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
set(CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${SPEC_FLAGS} -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags")
|
||||
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -fdata-sections -ffunction-sections -fno-rtti -fno-exceptions" CACHE INTERNAL "cxx compiler flags")
|
||||
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} ${LD_FLAGS} -Wl,--gc-sections" CACHE INTERNAL "exe link flags")
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug compiler flags")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug compiler flags")
|
||||
set(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug compiler flags")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE INTERNAL "c release compiler flags")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE INTERNAL "cxx release compiler flags")
|
||||
set(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags")
|
||||
@@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for ARM11 using GNU tools. The port readme identifies the
|
||||
# target as ARM1136J-S, which is what -mcpu selects.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm1136j-s)
|
||||
|
||||
set(THREADX_ARCH "arm11")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=arm1136j-s")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for ARM9 using GNU tools. This is the oldest core in the
|
||||
# CMake build; the port readme names ARM9 itself.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm9)
|
||||
|
||||
set(THREADX_ARCH "arm9")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=arm9")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A12 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a12)
|
||||
|
||||
set(THREADX_ARCH "cortex_a12")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-a12")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A15 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a15)
|
||||
|
||||
set(THREADX_ARCH "cortex_a15")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-a15")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A17 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a17)
|
||||
|
||||
set(THREADX_ARCH "cortex_a17")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-a17")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A34 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a34)
|
||||
|
||||
set(THREADX_ARCH "cortex_a34")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a34")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A35 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a35)
|
||||
|
||||
set(THREADX_ARCH "cortex_a35")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a35")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A5 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a5)
|
||||
|
||||
set(THREADX_ARCH "cortex_a5")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-a5")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A53 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a53)
|
||||
|
||||
set(THREADX_ARCH "cortex_a53")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a53")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A55 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a55)
|
||||
|
||||
set(THREADX_ARCH "cortex_a55")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a55")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A57 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a57)
|
||||
|
||||
set(THREADX_ARCH "cortex_a57")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a57")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for the Arm Cortex-A5x SMP port using GNU tools. That port
|
||||
# targets the family rather than one core: its readme and example name A53,
|
||||
# A55 and A57, so -mcpu selects Cortex-A53, the baseline of the three.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a53)
|
||||
|
||||
set(THREADX_ARCH "cortex_a5x")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a53")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A65 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a65)
|
||||
|
||||
set(THREADX_ARCH "cortex_a65")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a65")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A65ae using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a65ae)
|
||||
|
||||
set(THREADX_ARCH "cortex_a65ae")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a65ae")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A7 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a7)
|
||||
|
||||
set(THREADX_ARCH "cortex_a7")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-a7")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A72 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a72)
|
||||
|
||||
set(THREADX_ARCH "cortex_a72")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a72")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A73 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a73)
|
||||
|
||||
set(THREADX_ARCH "cortex_a73")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a73")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A75 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a75)
|
||||
|
||||
set(THREADX_ARCH "cortex_a75")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a75")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A76 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a76)
|
||||
|
||||
set(THREADX_ARCH "cortex_a76")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a76")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A76ae using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a76ae)
|
||||
|
||||
set(THREADX_ARCH "cortex_a76ae")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a76ae")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A77 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a77)
|
||||
|
||||
set(THREADX_ARCH "cortex_a77")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a77")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A78 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a78)
|
||||
|
||||
set(THREADX_ARCH "cortex_a78")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mcpu=cortex-a78")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/aarch64-none-elf.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-A8 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-a8)
|
||||
|
||||
set(THREADX_ARCH "cortex_a8")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-a8")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-M23 using GNU tools. Armv8-M Baseline is
|
||||
# Thumb only, hence -mthumb with no Arm state alternative.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m23)
|
||||
|
||||
set(THREADX_ARCH "cortex_m23")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mthumb -mcpu=cortex-m23")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-M33 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m33)
|
||||
|
||||
set(THREADX_ARCH "cortex_m33")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mthumb -mcpu=cortex-m33")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-M52 using GNU tools.
|
||||
#
|
||||
# The FPU and the MVE unit come with the core, so the hard float ABI
|
||||
# is selected here rather than left to the caller. scripts/check_clang.sh
|
||||
# builds this core the same way.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m52)
|
||||
|
||||
set(THREADX_ARCH "cortex_m52")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
# The hard float ABI is not optional here: -mcpu=cortex-m52 implies Helium, and
|
||||
# the soft-float variant has no matching library.
|
||||
set(MCPU_FLAGS "-mthumb -mcpu=cortex-m52")
|
||||
set(VFP_FLAGS "-mfloat-abi=hard")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
|
||||
# Pin the reference cross toolchain, as cmake/cortex_r52.cmake does. This core
|
||||
# needs it rather than merely preferring it: arm-none-eabi-gcc only learned
|
||||
# -mcpu=cortex-m52 in GCC 14, so a distribution compiler on PATH is likely to
|
||||
# reject the port outright. Override with -DARM_TOOLCHAIN_PATH=<dir containing
|
||||
# arm-none-eabi-gcc> to build with a different compiler. The check leaves PATH
|
||||
# alone when the pinned directory is absent.
|
||||
#
|
||||
# As in cortex_r52.cmake, the default below serves local builds and nothing
|
||||
# else -- no CI job has that directory, so on a runner the EXISTS check falls
|
||||
# through and the compiler comes from PATH. See the longer note there.
|
||||
if(NOT DEFINED ARM_TOOLCHAIN_PATH)
|
||||
set(ARM_TOOLCHAIN_PATH
|
||||
"$ENV{HOME}/toolchains/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/bin")
|
||||
endif()
|
||||
if(EXISTS "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-gcc")
|
||||
set(CMAKE_C_COMPILER "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-gcc")
|
||||
set(CMAKE_CXX_COMPILER "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-g++")
|
||||
set(CMAKE_ASM_COMPILER "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-gcc")
|
||||
endif()
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-M55 using GNU tools.
|
||||
#
|
||||
# The FPU and the MVE unit come with the core, so the hard float ABI
|
||||
# is selected here rather than left to the caller. scripts/check_clang.sh
|
||||
# builds this core the same way.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m55)
|
||||
|
||||
set(THREADX_ARCH "cortex_m55")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mthumb -mcpu=cortex-m55")
|
||||
set(VFP_FLAGS "-mfloat-abi=hard")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-M85 using GNU tools.
|
||||
#
|
||||
# The FPU and the MVE unit come with the core, so the hard float ABI
|
||||
# is selected here rather than left to the caller. scripts/check_clang.sh
|
||||
# builds this core the same way.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m85)
|
||||
|
||||
set(THREADX_ARCH "cortex_m85")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-mthumb -mcpu=cortex-m85")
|
||||
set(VFP_FLAGS "-mfloat-abi=hard")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-R4 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r4)
|
||||
|
||||
set(THREADX_ARCH "cortex_r4")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-r4")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-R5 using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r5)
|
||||
|
||||
set(THREADX_ARCH "cortex_r5")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-r5")
|
||||
set(VFP_FLAGS "")
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-R52 (Armv8-R, AArch32) using GNU tools.
|
||||
|
||||
# Name of the target
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r52)
|
||||
|
||||
set(THREADX_ARCH "cortex_r52")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
# Floating-point ABI. Cortex-R52 always implements at least a single-precision
|
||||
# FPU -- GCC rejects "+nofp" for this core and offers only "+nofp.dp" (drop
|
||||
# double precision). There is therefore no FPU-less R52, so the soft-float
|
||||
# baseline selects the soft *ABI* rather than removing the FPU. The hard-float
|
||||
# variant with lazy VFP context save arrives with AR1 milestone M5.
|
||||
if(NOT DEFINED TX_R52_FLOAT_ABI)
|
||||
set(TX_R52_FLOAT_ABI "soft" CACHE STRING "R52 float ABI: soft | hard")
|
||||
endif()
|
||||
|
||||
set(MCPU_FLAGS "-marm -mcpu=cortex-r52")
|
||||
if(TX_R52_FLOAT_ABI STREQUAL "hard")
|
||||
set(VFP_FLAGS "-mfpu=fpv5-d16 -mfloat-abi=hard")
|
||||
else()
|
||||
set(VFP_FLAGS "-mfloat-abi=soft")
|
||||
endif()
|
||||
set(SPEC_FLAGS "--specs=nosys.specs")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
|
||||
|
||||
# Pin the project's reference cross toolchain, GCC 14 for Arm. An absolute
|
||||
# path is used deliberately, so that a build on a machine which has it does not
|
||||
# depend on PATH ordering. Override with -DARM_TOOLCHAIN_PATH=<dir containing
|
||||
# arm-none-eabi-gcc> to build with a different compiler -- for example the
|
||||
# advisory newest-compiler lane.
|
||||
#
|
||||
# The default below serves local builds and nothing else. It fires only on a
|
||||
# machine that already has that directory, and no CI job does: the workflows
|
||||
# unpack the toolchain into the workspace and put it on PATH, and
|
||||
# scripts/check_gcc.sh passes -DARM_TOOLCHAIN_PATH at every CMake call site.
|
||||
# On a runner the EXISTS check therefore falls through and the compiler comes
|
||||
# from PATH. Do not read the default as something CI depends on -- and do not
|
||||
# remove it as dead code either, because it is what makes a no-flag build work
|
||||
# on a developer machine.
|
||||
if(NOT DEFINED ARM_TOOLCHAIN_PATH)
|
||||
set(ARM_TOOLCHAIN_PATH
|
||||
"$ENV{HOME}/toolchains/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/bin")
|
||||
endif()
|
||||
if(EXISTS "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-gcc")
|
||||
set(CMAKE_C_COMPILER "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-gcc")
|
||||
set(CMAKE_CXX_COMPILER "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-g++")
|
||||
set(CMAKE_ASM_COMPILER "${ARM_TOOLCHAIN_PATH}/arm-none-eabi-gcc")
|
||||
endif()
|
||||
@@ -0,0 +1,84 @@
|
||||
# Copyright (c) 2026 Eclipse ThreadX contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Portions of this file were generated with AI assistance.
|
||||
#
|
||||
# Toolchain file for Arm Cortex-R52 (Armv8-R, AArch32) using Arm Toolchain for
|
||||
# Embedded, which is LLVM based and is the successor to Arm Compiler 6.
|
||||
#
|
||||
# There is no separate clang port directory: this builds the gnu port sources
|
||||
# with a different compiler, which is the same thing scripts/check_clang.sh does
|
||||
# for every other Arm port. THREADX_TOOLCHAIN stays "gnu" for that reason.
|
||||
#
|
||||
# cmake -S . -B build -G Ninja \
|
||||
# -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_r52_clang.cmake \
|
||||
# -DTX_R52_BUILD_FVP_EXAMPLE=ON
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR cortex-r52)
|
||||
|
||||
set(THREADX_ARCH "cortex_r52")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
|
||||
# Tool names as found on PATH, which is what CI uses: the workflow unpacks the
|
||||
# toolchain into the workspace and scripts/check_clang.sh passes its location
|
||||
# through as ATFE_TOOLCHAIN_PATH.
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
set(CMAKE_ASM_COMPILER clang)
|
||||
set(CMAKE_AR llvm-ar)
|
||||
set(CMAKE_RANLIB llvm-ranlib)
|
||||
set(OBJCOPY llvm-objcopy)
|
||||
set(OBJDUMP llvm-objdump)
|
||||
set(SIZE llvm-size)
|
||||
|
||||
# Then pin a specific install if one is present, the way cortex_r52.cmake pins
|
||||
# the GNU toolchain and for the same reason: a local build should not depend on
|
||||
# PATH ordering. Absent that directory this falls back to the names above rather
|
||||
# than failing, so the file works on a machine that keeps clang elsewhere.
|
||||
# Override with -DATFE_TOOLCHAIN_PATH=<dir containing clang>.
|
||||
if(NOT DEFINED ATFE_TOOLCHAIN_PATH)
|
||||
set(ATFE_TOOLCHAIN_PATH "$ENV{HOME}/toolchains/ATfE-22.1.0-Linux-x86_64/bin")
|
||||
endif()
|
||||
if(EXISTS "${ATFE_TOOLCHAIN_PATH}/clang")
|
||||
set(CMAKE_C_COMPILER "${ATFE_TOOLCHAIN_PATH}/clang")
|
||||
set(CMAKE_CXX_COMPILER "${ATFE_TOOLCHAIN_PATH}/clang++")
|
||||
set(CMAKE_ASM_COMPILER "${ATFE_TOOLCHAIN_PATH}/clang")
|
||||
set(CMAKE_AR "${ATFE_TOOLCHAIN_PATH}/llvm-ar")
|
||||
set(CMAKE_RANLIB "${ATFE_TOOLCHAIN_PATH}/llvm-ranlib")
|
||||
set(OBJCOPY "${ATFE_TOOLCHAIN_PATH}/llvm-objcopy")
|
||||
set(OBJDUMP "${ATFE_TOOLCHAIN_PATH}/llvm-objdump")
|
||||
set(SIZE "${ATFE_TOOLCHAIN_PATH}/llvm-size")
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
|
||||
# Link the try-compile as a static library, so probing the compiler does not
|
||||
# need a linker script or a target C library.
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
if(NOT DEFINED TX_R52_FLOAT_ABI)
|
||||
set(TX_R52_FLOAT_ABI "soft" CACHE STRING "R52 float ABI: soft | hard")
|
||||
endif()
|
||||
|
||||
set(MCPU_FLAGS "--target=arm-none-eabi -marm -mcpu=cortex-r52")
|
||||
if(TX_R52_FLOAT_ABI STREQUAL "hard")
|
||||
set(VFP_FLAGS "-mfpu=fpv5-d16 -mfloat-abi=hard")
|
||||
else()
|
||||
set(VFP_FLAGS "-mfloat-abi=soft")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -fdata-sections -ffunction-sections -mlong-calls" CACHE INTERNAL "c compiler flags")
|
||||
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -fdata-sections -ffunction-sections -fno-rtti -fno-exceptions -mlong-calls" CACHE INTERNAL "cxx compiler flags")
|
||||
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -fuse-ld=lld -Wl,--gc-sections" CACHE INTERNAL "exe link flags")
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "c debug compiler flags")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "cxx debug compiler flags")
|
||||
set(CMAKE_ASM_FLAGS_DEBUG "-g" CACHE INTERNAL "asm debug compiler flags")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE INTERNAL "c release compiler flags")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE INTERNAL "cxx release compiler flags")
|
||||
set(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags")
|
||||
+19
-2
@@ -1,8 +1,25 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(CMAKE_C_COMPILER gcc)
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
# Let the compiler be chosen on the command line or from the environment, for example
|
||||
# -DCMAKE_C_COMPILER=gcc-14 or CC=gcc-14. CMake reads a toolchain file before it consults
|
||||
# CC and CXX, so setting these unconditionally would quietly override both and leave no
|
||||
# way to build with anything but the distribution's default gcc.
|
||||
if(NOT DEFINED CMAKE_C_COMPILER)
|
||||
if(DEFINED ENV{CC})
|
||||
set(CMAKE_C_COMPILER $ENV{CC})
|
||||
else()
|
||||
set(CMAKE_C_COMPILER gcc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
if(DEFINED ENV{CXX})
|
||||
set(CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
else()
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
endif()
|
||||
endif()
|
||||
set(AS as)
|
||||
set(AR ar)
|
||||
set(OBJCOPY objcopy)
|
||||
|
||||
@@ -20,7 +20,7 @@ set(CMAKE_CXX_FLAGS "${CXXFLAGS}" CACHE INTERNAL "cxx compiler flags")
|
||||
if(DEFINED SOFT_FLOAT)
|
||||
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
|
||||
else()
|
||||
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__ -D__riscv_float_abi_single" CACHE INTERNAL "asm compiler flags")
|
||||
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
|
||||
endif()
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
|
||||
|
||||
@@ -5,7 +5,7 @@ set(THREADX_ARCH "risc-v32")
|
||||
set(THREADX_TOOLCHAIN "gnu")
|
||||
if(DEFINED SOFT_FLOAT)
|
||||
set(ARCH_FLAGS "-g -march=rv32ima_zicsr -mabi=ilp32 -mcmodel=medany")
|
||||
set(CACHE{SOFT_FLOAT} FORCE 1)
|
||||
set(SOFT_FLOAT 1 CACHE BOOL "build the soft-float rv32ima_zicsr/ilp32 configuration" FORCE)
|
||||
else()
|
||||
set(ARCH_FLAGS "-g -march=rv32gc -mabi=ilp32d -mcmodel=medany -mrelax")
|
||||
endif()
|
||||
|
||||
+90
-62
File diff suppressed because it is too large
Load Diff
+18
-9
@@ -8,6 +8,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
@@ -452,7 +453,7 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start
|
||||
|
||||
|
||||
#define TX_TRACE_INITIALIZE _tx_trace_initialize();
|
||||
#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (CHAR *) (n), (ULONG) (a), (ULONG) (b));
|
||||
#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (n), (ULONG) (a), (ULONG) (b));
|
||||
#define TX_TRACE_OBJECT_UNREGISTER(o) _tx_trace_object_unregister((VOID *) (o));
|
||||
#ifndef TX_TRACE_IN_LINE_INSERT
|
||||
#define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,e) \
|
||||
@@ -508,12 +509,27 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(TX_ENABLE_EVENT_TRACE) && defined(TX_MISRA_ENABLE)
|
||||
|
||||
/* Define the MISRA-specific conversion routines. These are defined in tx_misra.c, which is the
|
||||
one source file in the kernel that does not compile as ThreadX source code, so the prototypes
|
||||
cannot sit behind TX_SOURCE_CODE. */
|
||||
|
||||
UCHAR *_tx_misra_object_to_uchar_pointer_convert(TX_TRACE_OBJECT_ENTRY *pointer);
|
||||
TX_TRACE_OBJECT_ENTRY *_tx_misra_uchar_to_object_pointer_convert(UCHAR *pointer);
|
||||
TX_TRACE_HEADER *_tx_misra_uchar_to_header_pointer_convert(UCHAR *pointer);
|
||||
TX_TRACE_BUFFER_ENTRY *_tx_misra_uchar_to_entry_pointer_convert(UCHAR *pointer);
|
||||
UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TX_SOURCE_CODE
|
||||
|
||||
/* Define internal function prototypes of the trace component, only if compiling ThreadX source code. */
|
||||
|
||||
VOID _tx_trace_initialize(VOID);
|
||||
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2);
|
||||
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2);
|
||||
VOID _tx_trace_object_unregister(VOID *object_ptr);
|
||||
|
||||
|
||||
@@ -525,13 +541,6 @@ VOID _tx_trace_object_unregister(VOID *object_ptr);
|
||||
|
||||
/* Define MISRA-specific routines. */
|
||||
|
||||
UCHAR *_tx_misra_object_to_uchar_pointer_convert(TX_TRACE_OBJECT_ENTRY *pointer);
|
||||
TX_TRACE_OBJECT_ENTRY *_tx_misra_uchar_to_object_pointer_convert(UCHAR *pointer);
|
||||
TX_TRACE_HEADER *_tx_misra_uchar_to_header_pointer_convert(UCHAR *pointer);
|
||||
TX_TRACE_BUFFER_ENTRY *_tx_misra_uchar_to_entry_pointer_convert(UCHAR *pointer);
|
||||
UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer);
|
||||
|
||||
|
||||
#define TX_OBJECT_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_object_to_uchar_pointer_convert((a))
|
||||
#define TX_UCHAR_TO_OBJECT_POINTER_CONVERT(a) _tx_misra_uchar_to_object_pointer_convert((a))
|
||||
#define TX_UCHAR_TO_HEADER_POINTER_CONVERT(a) _tx_misra_uchar_to_header_pointer_convert((a))
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -107,6 +109,12 @@
|
||||
#define TX_TIMER_TICKS_PER_SECOND (100UL)
|
||||
*/
|
||||
|
||||
/* Define this option to qualify object names as pointers to const. */
|
||||
|
||||
/*
|
||||
#define TX_ENABLE_CONST_NAMES
|
||||
*/
|
||||
|
||||
/* Determine if there is a FileX pointer in the thread control block.
|
||||
By default, the pointer is there for legacy/backwards compatibility.
|
||||
The pointer must also be there for applications using FileX.
|
||||
@@ -295,4 +303,3 @@
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -66,7 +68,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size,
|
||||
UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size,
|
||||
VOID *pool_start, ULONG pool_size)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -69,7 +71,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks,
|
||||
UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks,
|
||||
ULONG *total_blocks, TX_THREAD **first_suspended,
|
||||
ULONG *suspended_count, TX_BLOCK_POOL **next_pool)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -65,7 +67,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size)
|
||||
UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -69,7 +71,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes,
|
||||
UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes,
|
||||
ULONG *fragments, TX_THREAD **first_suspended,
|
||||
ULONG *suspended_count, TX_BYTE_POOL **next_pool)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -64,7 +66,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr)
|
||||
UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -71,7 +73,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags,
|
||||
UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count,
|
||||
TX_EVENT_FLAGS_GROUP **next_group)
|
||||
{
|
||||
|
||||
+17
-3
@@ -820,15 +820,29 @@ UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer)
|
||||
/***********************************************************************************************/
|
||||
/***********************************************************************************************/
|
||||
/** */
|
||||
/** UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer); */
|
||||
/** const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer); */
|
||||
/** */
|
||||
/***********************************************************************************************/
|
||||
/***********************************************************************************************/
|
||||
UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer)
|
||||
const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer)
|
||||
{
|
||||
|
||||
/* Return a UCHAR pointer. */
|
||||
return((UCHAR *) ((VOID *) pointer));
|
||||
return((const UCHAR *) ((const VOID *) pointer));
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************************/
|
||||
/***********************************************************************************************/
|
||||
/** */
|
||||
/** const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *ptr, ULONG amount); */
|
||||
/** */
|
||||
/***********************************************************************************************/
|
||||
/***********************************************************************************************/
|
||||
const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *ptr, ULONG amount)
|
||||
{
|
||||
ptr = ptr + amount;
|
||||
return(ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -65,7 +67,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit)
|
||||
UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner,
|
||||
UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count,
|
||||
TX_MUTEX **next_mutex)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -66,7 +68,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
|
||||
UINT _tx_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size,
|
||||
VOID *queue_start, ULONG queue_size)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -69,7 +71,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage,
|
||||
UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -64,7 +66,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count)
|
||||
UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -69,7 +71,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value,
|
||||
UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count,
|
||||
TX_SEMAPHORE **next_semaphore)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -76,7 +78,7 @@
|
||||
/* _tx_timer_initialize Create system timer thread */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input,
|
||||
UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input,
|
||||
VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold,
|
||||
ULONG time_slice, UINT auto_start)
|
||||
{
|
||||
@@ -93,18 +95,26 @@ UCHAR *temp_ptr;
|
||||
ALIGN_TYPE new_stack_start;
|
||||
ALIGN_TYPE updated_stack_start;
|
||||
#endif
|
||||
#if defined(TX_ENABLE_RANDOM_NUMBER_STACK_FILLING) && defined(TX_ENABLE_STACK_CHECKING) && !defined(TX_DISABLE_STACK_FILLING)
|
||||
ULONG stack_fill_value;
|
||||
#endif
|
||||
|
||||
#ifndef TX_DISABLE_STACK_FILLING
|
||||
#if defined(TX_ENABLE_RANDOM_NUMBER_STACK_FILLING) && defined(TX_ENABLE_STACK_CHECKING)
|
||||
|
||||
/* Initialize the stack fill value to a 8-bit random value. */
|
||||
thread_ptr -> tx_thread_stack_fill_value = ((ULONG) TX_RAND()) & 0xFFUL;
|
||||
stack_fill_value = ((ULONG) TX_RAND()) & 0xFFUL;
|
||||
|
||||
/* Duplicate the random value in each of the 4 bytes of the stack fill value. */
|
||||
thread_ptr -> tx_thread_stack_fill_value = thread_ptr -> tx_thread_stack_fill_value |
|
||||
(thread_ptr -> tx_thread_stack_fill_value << 8) |
|
||||
(thread_ptr -> tx_thread_stack_fill_value << 16) |
|
||||
(thread_ptr -> tx_thread_stack_fill_value << 24);
|
||||
stack_fill_value = stack_fill_value |
|
||||
(stack_fill_value << 8) |
|
||||
(stack_fill_value << 16) |
|
||||
(stack_fill_value << 24);
|
||||
|
||||
/* Store the fill value in the control block so that the stack fill below picks it up
|
||||
through the TX_STACK_FILL macro. The control block is cleared further down in this
|
||||
function, so the value is stored again once that has been done. */
|
||||
thread_ptr -> tx_thread_stack_fill_value = stack_fill_value;
|
||||
#endif
|
||||
|
||||
/* Set the thread stack to a pattern prior to creating the initial
|
||||
@@ -150,6 +160,14 @@ ALIGN_TYPE updated_stack_start;
|
||||
/* Initialize thread control block to all zeros. */
|
||||
TX_MEMSET(thread_ptr, 0, (sizeof(TX_THREAD)));
|
||||
|
||||
#if defined(TX_ENABLE_RANDOM_NUMBER_STACK_FILLING) && defined(TX_ENABLE_STACK_CHECKING) && !defined(TX_DISABLE_STACK_FILLING)
|
||||
|
||||
/* Clearing the control block reset the stack fill value, so store the value that was
|
||||
actually used to fill the stack again. Otherwise the stack checking and stack analyze
|
||||
routines would look for a pattern that is not the one present in the stack. */
|
||||
thread_ptr -> tx_thread_stack_fill_value = stack_fill_value;
|
||||
#endif
|
||||
|
||||
/* Place the supplied parameters into the thread's control block. */
|
||||
thread_ptr -> tx_thread_name = name_ptr;
|
||||
thread_ptr -> tx_thread_entry = entry_function;
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -95,6 +97,31 @@ UINT status;
|
||||
}
|
||||
}
|
||||
|
||||
/* The state is terminal, but a terminal state on its own is not authorization to
|
||||
release the control block. Both paths that produce one -- thread completion in
|
||||
_tx_thread_shell_entry and thread termination in _tx_thread_terminate -- publish
|
||||
TX_COMPLETED or TX_TERMINATED, and then run this thread's exit notification
|
||||
callback, before the thread has been detached from the ready list and before
|
||||
those services have finished with the pointer they hold to it. The suspending
|
||||
flag is set for exactly that interval, so a thread whose flag is still set is
|
||||
part-way through the transition. */
|
||||
if (status == TX_SUCCESS)
|
||||
{
|
||||
|
||||
/* Is the completion or termination transition still in progress? */
|
||||
if (thread_ptr -> tx_thread_suspending == TX_TRUE)
|
||||
{
|
||||
|
||||
/* Restore interrupts. */
|
||||
TX_RESTORE
|
||||
|
||||
/* Yes, refuse the delete rather than unlink a thread the scheduler is
|
||||
still holding. The condition is transient: the caller may retry once
|
||||
the transition has finished. */
|
||||
status = TX_DELETE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine if the delete operation is okay. */
|
||||
if (status == TX_SUCCESS)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -72,7 +74,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count,
|
||||
UINT _tx_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count,
|
||||
UINT *priority, UINT *preemption_threshold, ULONG *time_slice,
|
||||
TX_THREAD **next_thread, TX_THREAD **next_suspended_thread)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -104,6 +106,28 @@ UINT status;
|
||||
status = TX_NOT_DONE;
|
||||
}
|
||||
}
|
||||
|
||||
/* The state is terminal, but a terminal state on its own is not authorization
|
||||
to rebuild the stack and move the thread back to TX_SUSPENDED. Both paths
|
||||
that produce one -- thread completion in _tx_thread_shell_entry and thread
|
||||
termination in _tx_thread_terminate -- publish TX_COMPLETED or
|
||||
TX_TERMINATED, and then run this thread's exit notification callback, before
|
||||
the thread has been detached from the ready list. The suspending flag is
|
||||
set for exactly that interval. Resetting inside it would also defeat the
|
||||
protection _tx_thread_system_resume relies on, which refuses to cancel a
|
||||
suspension only while the state is still terminal. */
|
||||
if (status == TX_SUCCESS)
|
||||
{
|
||||
|
||||
/* Is the completion or termination transition still in progress? */
|
||||
if (thread_ptr -> tx_thread_suspending == TX_TRUE)
|
||||
{
|
||||
|
||||
/* Yes, refuse the reset. The condition is transient: the caller may
|
||||
retry once the transition has finished. */
|
||||
status = TX_NOT_DONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Is the request valid? */
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -134,6 +136,17 @@ VOID (*entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type);
|
||||
|
||||
#ifdef TX_NOT_INTERRUPTABLE
|
||||
|
||||
/* Set the suspending flag, so that the completion transition is marked as in
|
||||
progress for the same interval it is marked in the interruptable
|
||||
configuration below. Nothing in this configuration needs the flag to cancel
|
||||
an interrupted suspension -- interrupts stay disabled through the whole
|
||||
transition -- but the notification callback and the completion extension
|
||||
below are application code, reached by a direct call, and interrupt lockout
|
||||
does not stop either of them from calling a thread lifecycle service on this
|
||||
same control block. The flag is what _tx_thread_delete and _tx_thread_reset
|
||||
test in order to refuse one. */
|
||||
thread_ptr -> tx_thread_suspending = TX_TRUE;
|
||||
|
||||
#ifndef TX_DISABLE_NOTIFY_CALLBACKS
|
||||
|
||||
/* Determine if an application callback routine is specified. */
|
||||
@@ -148,6 +161,15 @@ VOID (*entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type);
|
||||
/* Perform any additional activities for tool or user purpose. */
|
||||
TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
|
||||
|
||||
/* Clear the suspending flag. It has to be cleared here rather than after the
|
||||
call below, because _tx_thread_system_ni_suspend returns to the scheduler for
|
||||
a thread that is the current thread, which this one is, and so does not come
|
||||
back. Clearing it afterwards would leave a normally completed thread marked
|
||||
as transitioning for ever and therefore permanently undeletable. Clearing it
|
||||
here loses nothing: everything from this point to the detachment runs with
|
||||
interrupts disabled and calls no application code. */
|
||||
thread_ptr -> tx_thread_suspending = TX_FALSE;
|
||||
|
||||
/* Call actual non-interruptable thread suspension routine. */
|
||||
_tx_thread_system_ni_suspend(thread_ptr, ((ULONG) 0));
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -155,6 +156,9 @@ TX_THREAD *thread_ptr;
|
||||
|
||||
#ifdef TX_NOT_INTERRUPTABLE
|
||||
|
||||
/* Initialize the status to successful. */
|
||||
thread_ptr -> tx_thread_suspend_status = TX_SUCCESS;
|
||||
|
||||
/* Call actual non-interruptable thread suspension routine. */
|
||||
_tx_thread_system_ni_suspend(thread_ptr, timer_ticks);
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,6 +72,10 @@ TX_INTERRUPT_SAVE_AREA
|
||||
ULONG *stack_ptr;
|
||||
ULONG *stack_lowest;
|
||||
ULONG *stack_highest;
|
||||
ULONG *probe_ptr;
|
||||
ULONG *stack_limit;
|
||||
ULONG probe_count;
|
||||
UINT fill_present;
|
||||
ULONG size;
|
||||
|
||||
|
||||
@@ -94,10 +100,16 @@ ULONG size;
|
||||
/* Pickup the highest stack pointer. */
|
||||
stack_highest = TX_VOID_TO_ULONG_POINTER_CONVERT(thread_ptr -> tx_thread_stack_highest_ptr);
|
||||
|
||||
/* Determine if the pointer is null. */
|
||||
if (stack_highest != TX_NULL)
|
||||
/* Determine if the pointer is null or if the highest stack pointer is not above the
|
||||
start of the stack. The latter indicates a stack overflow or a corrupted thread
|
||||
control block, and the unsigned pointer arithmetic in the binary search below would
|
||||
wrap around and never converge, hanging the caller. */
|
||||
if ((stack_highest != TX_NULL) && (stack_highest > stack_lowest))
|
||||
{
|
||||
|
||||
/* Remember the upper bound of the search so the scan below cannot run past it. */
|
||||
stack_limit = stack_highest;
|
||||
|
||||
/* Restore interrupts. */
|
||||
TX_RESTORE
|
||||
|
||||
@@ -110,8 +122,49 @@ ULONG size;
|
||||
size = (ULONG) (TX_ULONG_POINTER_DIF(stack_highest, stack_lowest))/((ULONG) 2);
|
||||
stack_ptr = TX_ULONG_POINTER_ADD(stack_lowest, size);
|
||||
|
||||
/* Determine if the pattern is still there. */
|
||||
if (*stack_ptr != TX_STACK_FILL)
|
||||
/* Determine if the pattern is still there. To avoid stopping on an
|
||||
unwritten hole inside an otherwise used region, require several
|
||||
consecutive fill words, working towards the lowest address. The scan
|
||||
stops at the lowest known fill location, since everything at or below
|
||||
that point is already known to hold the fill pattern. */
|
||||
fill_present = TX_TRUE;
|
||||
probe_ptr = stack_ptr;
|
||||
probe_count = TX_THREAD_STACK_ANALYZE_FILL_WORDS;
|
||||
while (probe_count != ((ULONG) 0))
|
||||
{
|
||||
|
||||
/* Determine if this word still holds the fill pattern. */
|
||||
if (*probe_ptr != TX_STACK_FILL)
|
||||
{
|
||||
|
||||
/* No, the probe location is in use. */
|
||||
fill_present = TX_FALSE;
|
||||
probe_count = ((ULONG) 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Yes, account for this word. */
|
||||
probe_count--;
|
||||
|
||||
/* Determine if the lowest known fill location has been reached. */
|
||||
if (probe_ptr <= stack_lowest)
|
||||
{
|
||||
|
||||
/* Yes, nothing further to check. */
|
||||
probe_count = ((ULONG) 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Position to the previous word in the stack. */
|
||||
probe_ptr = TX_ULONG_POINTER_SUB(probe_ptr, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine if the probe location is in use. */
|
||||
if (fill_present == TX_FALSE)
|
||||
{
|
||||
|
||||
/* Update the stack highest, since we need to look in the upper half now. */
|
||||
@@ -127,7 +180,7 @@ ULONG size;
|
||||
} while(size > ((ULONG) 1));
|
||||
|
||||
/* Position to first used word - at this point we are within a few words. */
|
||||
while (*stack_ptr == TX_STACK_FILL)
|
||||
while ((stack_ptr < stack_limit) && (*stack_ptr == TX_STACK_FILL))
|
||||
{
|
||||
|
||||
/* Position to next word in stack. */
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -133,6 +135,16 @@ ULONG suspension_sequence;
|
||||
|
||||
#ifdef TX_NOT_INTERRUPTABLE
|
||||
|
||||
/* Set the suspending flag, so that the termination transition is marked
|
||||
as in progress for the same interval it is marked in the interruptable
|
||||
configuration below. Nothing in this configuration needs the flag to
|
||||
cancel an interrupted suspension -- interrupts stay disabled through
|
||||
the whole transition -- but the notification callback below is
|
||||
application code, reached by a direct call, and interrupt lockout does
|
||||
not stop it from calling a thread lifecycle service on this same
|
||||
control block. The flag is cleared in the common tail below. */
|
||||
thread_ptr -> tx_thread_suspending = TX_TRUE;
|
||||
|
||||
#ifndef TX_DISABLE_NOTIFY_CALLBACKS
|
||||
|
||||
/* Determine if an application callback routine is specified. */
|
||||
@@ -225,20 +237,13 @@ ULONG suspension_sequence;
|
||||
(suspend_cleanup)(thread_ptr, suspension_sequence);
|
||||
}
|
||||
|
||||
#ifndef TX_NOT_INTERRUPTABLE
|
||||
|
||||
/* Disable interrupts. */
|
||||
TX_DISABLE
|
||||
#endif
|
||||
|
||||
/* Clear the suspending flag. */
|
||||
thread_ptr -> tx_thread_suspending = TX_FALSE;
|
||||
|
||||
#ifndef TX_NOT_INTERRUPTABLE
|
||||
|
||||
/* Restore interrupts. */
|
||||
TX_RESTORE
|
||||
#endif
|
||||
/* The suspending flag deliberately stays set here. It used to be
|
||||
cleared at this point, which left the terminated extension and the
|
||||
notification callback below -- both application code -- free to delete
|
||||
or reset this control block while this service still held a pointer to
|
||||
it and still had mutex-release processing to do. It is now cleared
|
||||
once, in the common tail below, after the last dereference of the
|
||||
target. */
|
||||
|
||||
/* Perform any additional activities for tool or user purpose. */
|
||||
TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
|
||||
@@ -282,6 +287,20 @@ ULONG suspension_sequence;
|
||||
TX_DISABLE
|
||||
#endif
|
||||
|
||||
/* Clear the suspending flag. This is the one place the end of the
|
||||
termination transition is published, and it is reached from both branches
|
||||
above, after the notification callback and after the mutex-release
|
||||
processing, which is the last thing in this service to dereference the
|
||||
target. Until this store, _tx_thread_delete and _tx_thread_reset refuse
|
||||
the target. In the interruptable ready branch the flag is already false,
|
||||
because _tx_thread_system_suspend cleared it when it detached the thread,
|
||||
so this is a second store of a value the flag already holds; that is
|
||||
cheaper than testing for it and it keeps the transition to a single clear
|
||||
site. No suspension-initiating service can have set it again in between:
|
||||
every one of them acts on a thread that is ready or suspended, and this
|
||||
thread is terminated. */
|
||||
thread_ptr -> tx_thread_suspending = TX_FALSE;
|
||||
|
||||
/* Enable preemption. */
|
||||
_tx_thread_preempt_disable--;
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -67,7 +69,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr,
|
||||
UINT _tx_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr,
|
||||
VOID (*expiration_function)(ULONG id), ULONG expiration_input,
|
||||
ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -68,7 +70,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
|
||||
UINT _tx_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks,
|
||||
ULONG *reschedule_ticks, TX_TIMER **next_timer)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -66,7 +68,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2)
|
||||
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2)
|
||||
{
|
||||
|
||||
#ifdef TX_ENABLE_EVENT_TRACE
|
||||
@@ -75,6 +77,7 @@ UINT i, entries;
|
||||
UINT found, loop_break;
|
||||
TX_THREAD *thread_ptr;
|
||||
UCHAR *work_ptr;
|
||||
const UCHAR *name_ptr;
|
||||
TX_TRACE_OBJECT_ENTRY *entry_ptr;
|
||||
|
||||
|
||||
@@ -211,21 +214,21 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr;
|
||||
for (i = ((ULONG) 0); i < (((ULONG) TX_TRACE_OBJECT_REGISTRY_NAME)-((ULONG) 1)); i++)
|
||||
{
|
||||
|
||||
/* Setup work pointer to the object name character. */
|
||||
work_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name);
|
||||
work_ptr = TX_UCHAR_POINTER_ADD(work_ptr, i);
|
||||
/* Setup name pointer to the object name character. */
|
||||
name_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name);
|
||||
name_ptr = TX_CONST_UCHAR_POINTER_ADD(name_ptr, i);
|
||||
|
||||
/* Determine if object_name (work_ptr) is null. */
|
||||
if (work_ptr == TX_NULL)
|
||||
/* Determine if object_name (name_ptr) is null. */
|
||||
if (name_ptr == TX_NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
/* Copy a character of the name. */
|
||||
entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *work_ptr;
|
||||
entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *name_ptr;
|
||||
|
||||
/* Determine if we are at the end. */
|
||||
if (*work_ptr == ((UCHAR) 0))
|
||||
if (*name_ptr == ((UCHAR) 0))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -74,7 +76,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size,
|
||||
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size,
|
||||
VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks,
|
||||
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks,
|
||||
ULONG *total_blocks, TX_THREAD **first_suspended,
|
||||
ULONG *suspended_count, TX_BLOCK_POOL **next_pool)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -73,7 +75,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes,
|
||||
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes,
|
||||
ULONG *fragments, TX_THREAD **first_suspended,
|
||||
ULONG *suspended_count, TX_BYTE_POOL **next_pool)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size)
|
||||
UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -72,7 +74,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags,
|
||||
UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count,
|
||||
TX_EVENT_FLAGS_GROUP **next_group)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -71,7 +73,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
|
||||
UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -71,7 +73,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner,
|
||||
UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count,
|
||||
TX_MUTEX **next_mutex)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -72,7 +74,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
|
||||
UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size,
|
||||
VOID *queue_start, ULONG queue_size, UINT queue_control_block_size)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage,
|
||||
UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
|
||||
UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -70,7 +72,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value,
|
||||
UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value,
|
||||
TX_THREAD **first_suspended, ULONG *suspended_count,
|
||||
TX_SEMAPHORE **next_semaphore)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -79,7 +81,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
|
||||
UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr,
|
||||
VOID (*entry_function)(ULONG id), ULONG entry_input,
|
||||
VOID *stack_start, ULONG stack_size,
|
||||
UINT priority, UINT preempt_threshold,
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -74,7 +76,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count,
|
||||
UINT _txe_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count,
|
||||
UINT *priority, UINT *preemption_threshold, ULONG *time_slice,
|
||||
TX_THREAD **next_thread, TX_THREAD **next_suspended_thread)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -26,8 +28,6 @@
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_initialize.h"
|
||||
#include "tx_thread.h"
|
||||
#include "tx_timer.h"
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
/* */
|
||||
/* TX_TIMER_ERROR Invalid application timer pointer */
|
||||
/* TX_TICK_ERROR Invalid initial tick value of 0 */
|
||||
/* TX_CALLER_ERROR Invalid caller of this function */
|
||||
/* status Actual completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
@@ -98,13 +97,6 @@ UINT status;
|
||||
status = TX_TICK_ERROR;
|
||||
}
|
||||
|
||||
/* Check for invalid caller of this function. */
|
||||
else if (TX_THREAD_GET_SYSTEM_STATE() >= TX_INITIALIZE_IN_PROGRESS)
|
||||
{
|
||||
|
||||
/* Invalid caller of this function, return appropriate error code. */
|
||||
status = TX_CALLER_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -74,7 +76,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr,
|
||||
UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr,
|
||||
VOID (*expiration_function)(ULONG id), ULONG expiration_input,
|
||||
ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -69,7 +71,7 @@
|
||||
/* Application Code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
|
||||
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks,
|
||||
ULONG *reschedule_ticks, TX_TIMER **next_timer)
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
// Portions of this file were generated with AI assistance.
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -569,6 +571,7 @@ VOID _txm_module_usbx_duo_callback_request(TXM_MODULE_CALLBACK_MESSAGE *callbac
|
||||
|
||||
#define txm_module_manager_initialize _txm_module_manager_initialize
|
||||
#define txm_module_manager_absolute_load _txm_module_manager_absolute_load
|
||||
#define txm_module_manager_absolute_load_extended _txm_module_manager_absolute_load_extended
|
||||
#define txm_module_manager_in_place_load _txm_module_manager_in_place_load
|
||||
#define txm_module_manager_file_load _txm_module_manager_file_load
|
||||
#define txm_module_manager_memory_load _txm_module_manager_memory_load
|
||||
@@ -606,6 +609,7 @@ UINT _txm_module_manager_file_load(TXM_MODULE_INSTANCE *module_instance, CHAR *
|
||||
#endif
|
||||
UINT _txm_module_manager_initialize(VOID *module_memory_start, ULONG module_memory_size);
|
||||
UINT _txm_module_manager_absolute_load(TXM_MODULE_INSTANCE *module_instance, CHAR *name, VOID *module_location);
|
||||
UINT _txm_module_manager_absolute_load_extended(TXM_MODULE_INSTANCE *module_instance, CHAR *name, VOID *module_location, VOID *module_data_location);
|
||||
UINT _txm_module_manager_in_place_load(TXM_MODULE_INSTANCE *module_instance, CHAR *name, VOID *module_location);
|
||||
UINT _txm_module_manager_internal_load(TXM_MODULE_INSTANCE *module_instance, CHAR *name, VOID *module_location,
|
||||
ULONG code_size, VOID *code_allocation_ptr, ULONG code_allocation_size);
|
||||
@@ -620,7 +624,7 @@ UINT _txm_module_manager_memory_load(TXM_MODULE_INSTANCE *module_instance, CHAR
|
||||
UINT _txm_module_manager_properties_get(TXM_MODULE_INSTANCE *module_instance, ULONG *module_properties_ptr);
|
||||
UINT _txm_module_manager_start(TXM_MODULE_INSTANCE *module_instance);
|
||||
UINT _txm_module_manager_stop(TXM_MODULE_INSTANCE *module_instance);
|
||||
UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, CHAR *name, VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *),
|
||||
UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name, VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *),
|
||||
VOID (*entry_function)(ULONG), ULONG entry_input,
|
||||
VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold,
|
||||
ULONG time_slice, UINT auto_start, UINT thread_control_block_size, TXM_MODULE_INSTANCE *module_instance);
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -64,7 +66,7 @@
|
||||
/* Module application code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
{
|
||||
|
||||
UINT return_value;
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -64,7 +66,7 @@
|
||||
/* Module application code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool)
|
||||
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool)
|
||||
{
|
||||
|
||||
UINT return_value;
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -63,7 +65,7 @@
|
||||
/* Module application code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
|
||||
{
|
||||
|
||||
UINT return_value;
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
/* Portions of this file were generated with AI assistance. */
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
@@ -64,7 +66,7 @@
|
||||
/* Module application code */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool)
|
||||
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool)
|
||||
{
|
||||
|
||||
UINT return_value;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user