diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..3b36e8329 --- /dev/null +++ b/.git-blame-ignore-revs @@ -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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..1091a2d6b --- /dev/null +++ b/.github/dependabot.yml @@ -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. diff --git a/.github/workflows/ci_cortex_m.yml b/.github/workflows/ci_cortex_m.yml index 149490be5..933c950fb 100644 --- a/.github/workflows/ci_cortex_m.yml +++ b/.github/workflows/ci_cortex_m.yml @@ -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" - - diff --git a/.github/workflows/clang_check.yml b/.github/workflows/clang_check.yml new file mode 100644 index 000000000..53b60bfeb --- /dev/null +++ b/.github/workflows/clang_check.yml @@ -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" diff --git a/.github/workflows/gcc_check.yml b/.github/workflows/gcc_check.yml new file mode 100644 index 000000000..cd340a0e9 --- /dev/null +++ b/.github/workflows/gcc_check.yml @@ -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" diff --git a/.github/workflows/ports_arch_check.yml b/.github/workflows/ports_arch_check.yml index 4a99c032d..334a53864 100644 --- a/.github/workflows/ports_arch_check.yml +++ b/.github/workflows/ports_arch_check.yml @@ -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 - run: | - scripts/copy_armv7_m.sh && scripts/copy_armv8_m.sh && scripts/copy_module_armv7_m.sh - if [[ -n $(git status --porcelain -uno) ]]; then - echo "Ports for ARM architecture is not updated" - git status - exit 1 - fi + # 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 - runs-on: windows-latest + # Check ports for cortex-a. This ran on Windows because the A profile + # tooling was PowerShell only; update.sh beside each update.ps1 means it + # runs on the same image as every other job now. + runs-on: ubuntu-24.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: # 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. + - name: Checkout sources + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - # Copy ports arch - - name: Copy ports arch + # Regenerate the A profile ports and fail if anything changed, which means + # a generated port was edited directly instead of ports_arch. + - name: Check the Cortex-A ports run: | - cd ports_arch/ARMv7-A - pwsh -Command ./update.ps1 -PortSets tx -CopyCommonFiles -CopyPortFiles -CopyExample -PatchFiles - cd ../../ports_arch/ARMv8-A - pwsh -Command ./update.ps1 -PortSets tx,tx_smp -CopyCommonFiles -CopyPortFiles -CopyExample -PatchFiles - if ((git status --porcelain -uno) -ne $null) { - Write-Host "Ports for ARM architecture is not updated" - git status - Exit 1 - } + (cd ports_arch/ARMv7-A && ./update.sh --port-sets tx \ + --copy-common-files --copy-port-files --copy-example --patch-files) + (cd ports_arch/ARMv8-A && ./update.sh --port-sets tx,tx_smp \ + --copy-common-files --copy-port-files --copy-example --patch-files) + if [[ -n $(git status --porcelain -uno) ]]; then + echo "The Cortex-A ports are not reproducible from ports_arch:" + git status --porcelain -uno + exit 1 + fi diff --git a/.github/workflows/r52_fvp.yml b/.github/workflows/r52_fvp.yml new file mode 100644 index 000000000..60861d49b --- /dev/null +++ b/.github/workflows/r52_fvp.yml @@ -0,0 +1,335 @@ +name: r52_fvp + +# Builds every Cortex-R52 CMake image in both supported configurations and +# EXECUTES them on the Armv8-R AEM FVP, asserting each image's self-reported +# result. +# +# Why this exists: until this workflow landed, nothing in CI ran a single +# instruction of any ThreadX port. gcc_check compiles and links -- its own +# header says so, "it compiles and links and **executes nothing**" -- and its +# CMake stage covers exactly one R52 configuration, the base FVP example with +# -DTX_R52_ENABLE_MPU=ON. So a change that assembles cleanly and links cleanly +# and then hangs on the first context switch passes every required check. +# +# That gap matters more for cortex_r52 than for the other ports, because the +# R52 is the foundation the partitioning work is sequenced behind: the EL2 boot +# path in entry.S, the MPU programming, and the generic-timer plumbing are all +# things later work attaches to rather than replaces. A regression in any of +# them has to be caught by an execution test; there is no static check for +# "the scheduler still schedules". +# +# What it covers: +# +# - the default configuration -- the images gcc_check's CMake stage builds, +# but run rather than merely linked; +# - the feature configuration -- VFP with the hard float ABI, FIQ, IRQ +# nesting and FIQ nesting. Those four options gate whole assembly blocks +# (the VMRS/VSTMDB/VLDMIA sequences, the FIQ context paths, the nesting +# start/end pairs) that the default configuration never assembles, let +# alone runs. +# +# What it does not cover: the module manager port and the S32Z280 targets are +# not on dev yet -- they are PR #639. When that merges, add their lanes here +# rather than starting a second workflow; the matrix already has the shape. +# +# The S32Z280 targets will be build-only in CI regardless. They need silicon, +# and a hosted runner has none. + +on: + # push as well as pull_request, for the reason gcc_check.yml states at + # length: dev needs its own baseline so a bad squash-merge is caught then + # rather than by whoever opens the next pull request. + push: + branches: [ master, dev ] + paths: + - ".github/workflows/r52_fvp.yml" + - "CMakeLists.txt" + - "cmake/cortex_r52*.cmake" + - "common/**" + - "ports/cortex_r52/**" + - "ports_module/cortex_r52/**" + pull_request: + branches: [ master, dev ] + # Duplicated rather than shared through a YAML anchor. GitHub Actions' + # parser does not dependably honour anchors and the failure mode is the + # whole workflow refusing to parse -- a job that dies before it does + # anything, which is the exact defect gcc_check.yml carries a comment + # about. **Edit both.** + paths: + - ".github/workflows/r52_fvp.yml" + - "CMakeLists.txt" + - "cmake/cortex_r52*.cmake" + - "common/**" + - "ports/cortex_r52/**" + - "ports_module/cortex_r52/**" + +jobs: + # One job rather than one per configuration, for the reason gcc_check.yml + # gives for folding its two toolchains together: the checks list stays short, + # and a single run sees every configuration so a cross-configuration + # regression shows up in one log instead of two. + r52: + runs-on: ubuntu-24.04 + + env: + # Pinned deliberately. Matches gcc_check.yml and ci_cortex_m.yml so all + # three share one cache entry rather than each holding its own copy of + # the same archive; change them together or the sharing silently stops. + # 14.3.rel1 is the project's GCC 14 default. + GCC_VERSION: 14.3.rel1 + + # Where the Armv8-R AEM FVP comes from. + # + # Arm distributes it free of charge but behind a click-through licence, + # with no stable unauthenticated download URL we can hard-code -- the + # permalink forms under developer.arm.com/-/cdn-downloads all 404 for + # this model. So the URL is a repository variable rather than a literal + # here, and the maintainer sets it once to a location the runner can + # reach (an Eclipse-hosted mirror, a release asset, or Arm's own URL if + # a durable one appears). + # + # Set FVP_AEMV8R_URL to a .tgz/.tar.gz of the model, and optionally + # FVP_AEMV8R_SHA256 to its checksum. With the checksum set the download + # is verified; without it the run says so rather than pretending. + # + # When the variable is unset the build lanes still run and still gate the + # pull request -- only execution is skipped, loudly, in the log and in + # the job summary. A silent green here would recreate the exact hole this + # workflow exists to close. + FVP_URL: ${{ vars.FVP_AEMV8R_URL }} + FVP_SHA256: ${{ vars.FVP_AEMV8R_SHA256 }} + + steps: + # Actions are pinned to a commit SHA with the version in the trailing + # comment. A tag can be moved; a SHA cannot. Dependabot moves these pins + # and rewrites the comments -- see .github/dependabot.yml. + - name: Check out the repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + # Path and key match gcc_check.yml's AArch32 entry exactly, so the two + # workflows share one cache entry. Only the AArch32 toolchain is needed + # here: cortex_r52 is Armv8-R AArch32, and nothing this workflow builds + # targets aarch64. + - 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 + + # The checksum suffix is .sha256asc and not .sha256. Arm publishes both, + # and for arm-none-eabi the .sha256 file contains a 32-character MD5, so + # sha256sum -c on it fails with "no properly formatted checksum lines + # found". Do not "simplify" the suffix. (Same note as gcc_check.yml, which + # is where it was first paid for.) + - 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" + + # 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 make this + # unconditional. + - 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 cache key has to move when the model does, and stay put when it does + # not. hashFiles() reads files, so it cannot hash a variable: pointing it + # at this workflow keyed the cache on the file's own contents, which is + # wrong twice over -- repointing FVP_AEMV8R_URL kept serving the old model, + # and editing anything here forced a needless refetch of a large archive. + # The URL is hashed here instead, so the key tracks exactly what it names. + - name: Key the FVP cache on the download URL + id: fvp-key + if: env.FVP_URL != '' + run: | + set -eu + printf 'hash=%s\n' "$(printf '%s' "$FVP_URL" | sha256sum | cut -d' ' -f1)" >>"$GITHUB_OUTPUT" + + - name: Cache the Armv8-R AEM FVP + id: cache-fvp + if: env.FVP_URL != '' + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: fvp + key: fvp-aemv8r-${{ steps.fvp-key.outputs.hash }}-${{ env.FVP_SHA256 || 'nosum' }} + + - name: Install the Armv8-R AEM FVP + if: env.FVP_URL != '' && steps.cache-fvp.outputs.cache-hit != 'true' + run: | + set -eu + mkdir -p fvp && cd fvp + curl -fsSL -o fvp.tgz "$FVP_URL" + if [ -n "${FVP_SHA256:-}" ]; then + echo "$FVP_SHA256 fvp.tgz" | sha256sum -c - + else + echo "::warning::FVP_AEMV8R_SHA256 is not set; the download was not verified." + fi + tar xf fvp.tgz + rm -f fvp.tgz + + # The model links against libatomic. Everything else it needs + # (libstdc++, libgcc_s, librt, libpthread) is already on the runner image, + # and its own libscxframework/libsystemc ship inside the tarball. The + # runner usually has libatomic1 by way of gcc, so this is guarded for the + # same reason the ninja step is. + - name: Ensure the FVP's runtime dependencies are present + if: env.FVP_URL != '' + run: | + set -eu + if ldconfig -p | grep -q 'libatomic\.so\.1'; then + echo "libatomic1 present" + else + sudo apt-get update + sudo apt-get install -y --no-install-recommends libatomic1 + fi + + # Resolve the model once and hand its absolute path to CMake below. + # + # ports/cortex_r52/gnu/example_build/fvp_baser_aemv8r/CMakeLists.txt finds + # it with find_program(... HINTS $ENV{HOME}/FVP_Base_AEMv8R_11.32_19/bin), + # a hint that is right on a developer's machine and meaningless here, so + # the path is passed explicitly. find_program caches into FVP_BASER_AEMV8R, + # which means -DFVP_BASER_AEMV8R= overrides it with no change to the + # CMake files. + # + # FVP_PRESENT, not a bare "did the variable exist", so that a URL which + # downloads something that is not the model fails here rather than + # silently skipping every test later. + - name: Locate the FVP + id: fvp + run: | + set -eu + if [ -z "${FVP_URL:-}" ]; then + echo "present=false" >>"$GITHUB_OUTPUT" + echo "::warning::FVP_AEMV8R_URL is not set for this repository, so the Cortex-R52 images were built but NOT executed. Set the repository variable to enable the execution lanes." + { + echo "### Cortex-R52 FVP execution: SKIPPED" + echo "" + echo "\`FVP_AEMV8R_URL\` is not set, so this run built the images but executed none of them." + echo "Set the repository variable (Settings -> Secrets and variables -> Actions -> Variables)" + echo "to a download URL for the Armv8-R AEM FVP to turn the execution lanes on." + } >>"$GITHUB_STEP_SUMMARY" + exit 0 + fi + binary="$(find fvp -type f -name FVP_BaseR_AEMv8R -perm -u+x | head -1)" + if [ -z "$binary" ]; then + echo "FVP_AEMV8R_URL was set, but no FVP_BaseR_AEMv8R binary was found in the archive." >&2 + find fvp -maxdepth 3 -type d | sed 's/^/ /' >&2 + exit 1 + fi + binary="$(cd "$(dirname "$binary")" && pwd)/$(basename "$binary")" + echo "present=true" >>"$GITHUB_OUTPUT" + echo "binary=$binary" >>"$GITHUB_OUTPUT" + "$binary" --version + + # Both configurations are configured, built and (when the model is here) + # run by one script, so that adding a configuration is one line rather + # than three near-identical blocks of YAML. + # + # Every image is named explicitly from the generated ninja graph rather + # than from a list kept here. The images are EXCLUDE_FROM_ALL -- a bare + # "cmake --build" reports "no work to do" and would compare nothing -- + # and reading the graph means a target added to CMakeLists.txt cannot + # escape this check by nobody remembering to list it. This is the same + # technique, and the same reasoning, as scripts/check_gcc.sh's CMake stage. + # + # TX_R52_FLOAT_ABI=hard is not optional alongside TX_R52_ENABLE_VFP: the + # port's CMakeLists.txt refuses the combination outright (#686), because + # TX_ENABLE_VFP_SUPPORT enables VMRS/VSTMDB/VLDMIA blocks that a soft + # float ABI leaves the assembler unable to accept. + - name: Build and run the Cortex-R52 images + run: | + set -eu + export PATH="$GITHUB_WORKSPACE/toolchain/arm-gnu-toolchain-${GCC_VERSION}-x86_64-arm-none-eabi/bin:$PATH" + arm-none-eabi-gcc --version | head -1 + + fvp_present='${{ steps.fvp.outputs.present }}' + fvp_binary='${{ steps.fvp.outputs.binary }}' + + fvp_arg="" + if [ "$fvp_present" = "true" ]; then + fvp_arg="-DFVP_BASER_AEMV8R=$fvp_binary" + fi + + status=0 + + run_configuration() { + name="$1"; shift + build="build/$name" + + echo "" + echo "==============================================================" + echo "== $name" + echo "==============================================================" + + if ! cmake -S . -B "$build" -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_r52.cmake \ + $fvp_arg "$@"; then + echo "::error::$name: CMake configure failed" + status=1 + return + fi + + images="$(ninja -C "$build" -t targets all 2>/dev/null \ + | grep -oE '^[A-Za-z0-9_]+\.elf' \ + | grep -v '^cmake_' | sort -u)" + if [ -z "$images" ]; then + echo "::error::$name: no .elf targets found in the CMake graph" + status=1 + return + fi + + echo "$name: building $(echo "$images" | wc -l) images" + # shellcheck disable=SC2086 + if ! cmake --build "$build" --target $images; then + echo "::error::$name: one or more images did not build" + status=1 + return + fi + + if [ "$fvp_present" != "true" ]; then + echo "$name: built, not executed (no FVP configured)" + return + fi + + # --no-tests=error, because ctest's default is to report success + # when it finds nothing to run. The example registers its tests + # inside if(FVP found) and if(Python3_FOUND), so either one going + # unmet would leave this stage green having executed nothing -- the + # very hole this workflow exists to close. + if ! ctest --test-dir "$build" --output-on-failure --no-tests=error; then + echo "::error::$name: one or more images failed on the FVP, or no tests were registered" + status=1 + fi + } + + run_configuration default \ + -DTX_R52_BUILD_FVP_EXAMPLE=ON + + run_configuration feature \ + -DTX_R52_BUILD_FVP_EXAMPLE=ON \ + -DTX_R52_ENABLE_VFP=ON \ + -DTX_R52_FLOAT_ABI=hard \ + -DTX_R52_ENABLE_FIQ=ON \ + -DTX_R52_ENABLE_IRQ_NESTING=ON \ + -DTX_R52_ENABLE_FIQ_NESTING=ON + + exit $status diff --git a/.github/workflows/regression_template.yml b/.github/workflows/regression_template.yml index 205eb5a8c..064f2ebea 100644 --- a/.github/workflows/regression_template.yml +++ b/.github/workflows/regression_template.yml @@ -21,6 +21,26 @@ on: default: './test/cmake' required: false type: string + # Minutes for the install step. Ten suits a consumer that only installs + # packages, which is all of them bar GUIX: measured install steps run 0.2 + # to 0.5 minutes, and NetX Duo's secure interoperability job, which builds + # OpenSSL and wolfSSL from source, takes 2.1 to 2.8. GUIX also builds a + # configuration here, because its regression suite is staged across the + # install, build and test steps to fit their limits, so it needs longer. + # The default keeps every other consumer exactly where it was. + install_timeout_minutes: + default: 10 + required: false + type: number + # Minutes for the build step, on the same reasoning as the install step + # above. Fifteen suits a consumer that builds once: measured build steps + # are 0.5 minutes for LevelX, 1.1 for FileX and 6.4 for USBX. GUIX builds + # five configurations here as part of its staging and reaches 11.8, which + # is 79 per cent of the cap and shrinking as tests are added. + build_timeout_minutes: + default: 15 + required: false + type: number skip_test: default: false required: false @@ -29,8 +49,40 @@ on: default: false required: false type: boolean + # The merged report, not one configuration's. Every configuration is + # instrumented now (TX_COVERAGE below) and coverage.sh --merge unions + # them; default_build_coverage was one build of five, and the code the + # other four select was absent from its denominator rather than uncovered + # in it. coverage_name: - default: 'default_build_coverage' + default: 'merged' + required: false + type: string + # The lower and upper threshold percentages handed to + # CodeCoverageSummary, lower first. The lower one is a hard floor: the + # step below sets fail_below_min, so a run whose merged line rate falls + # under it turns the job red. + # + # Both must be whole numbers. Probed against the pinned action on a + # runner, 26 Aug 2026: '99.9 100' is rejected with + # 'System.ArgumentException - Threshold parameter set incorrectly.' and + # the step fails whether or not fail_below_min is set, because the action + # parses each half with an integer parse. So a floor can be 99 or 100 and + # nothing between, and the intended 99.9 is not expressible. + # + # The floor is compared against the LINE rate only -- not the branch + # rate, and not the lower of the two. Probed on the same run: the + # ThreadX report at 100.00% lines and 77.67% branches passes a floor of + # 99. Worth knowing, because branch coverage is around 78% in both + # suites while the project asks for 100%, and a floor set from the + # headline line figure says nothing about it. + # + # Each suite sets its own in regression_test.yml, because they do not + # sit at the same figure. The default here is the action's own, low + # enough to be no floor at all in practice -- a caller that collects + # coverage is expected to name its number. + coverage_thresholds: + default: '50 75' required: false type: string skip_deploy: @@ -58,26 +110,45 @@ jobs: pull-requests: write # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: + # 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.2.2 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: submodules: true + # apt and PyPI have stalled this step twice, for 55 minutes and for over two + # hours, against a normal 27 to 152 seconds. Nothing here had a timeout, so a + # stall ran until the six hour job limit and cost a whole run rather than + # failing and being retried. - name: Install softwares + timeout-minutes: ${{ inputs.install_timeout_minutes }} run: ${{ inputs.install_script }} + # TX_COVERAGE instruments every build configuration rather than only the one + # whose name ends in _coverage. It has to be set for the build as well as the + # test: the build is where -fprofile-arcs is decided, and the test run is + # where the reports are collected and merged. - name: Build + timeout-minutes: ${{ inputs.build_timeout_minutes }} + env: + TX_COVERAGE: ${{ inputs.skip_coverage && 'OFF' || 'ON' }} run: ${{ inputs.build_script }} - name: Test + timeout-minutes: 60 + env: + TX_COVERAGE: ${{ inputs.skip_coverage && 'OFF' || 'ON' }} run: ${{ inputs.test_script }} - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2.11.0 + uses: EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0 if: always() with: check_name: Test Results ${{ inputs.result_affix }} @@ -86,7 +157,7 @@ jobs: - name: Upload Test Results if: success() || failure() - uses: actions/upload-artifact@v4.6.2 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: test_reports ${{ inputs.result_affix }} path: | @@ -95,27 +166,48 @@ jobs: ${{ inputs.cmake_path }}/build/**/regression/output_files/*.bin - name: Configure GitHub Pages - uses: actions/configure-pages@v5.0.0 + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + # The coverage steps below run even when a test failed. cmake_bootstrap.sh + # now produces the report in that case, and the run whose behaviour changed + # is the one whose coverage is worth reading; previously a single flaky test + # suppressed the report for the whole run. !cancelled() rather than always(), + # so a cancelled run still stops promptly -- the same idiom the + # deploy_code_coverage job below already uses. The ${{ }} is required: a bare + # ! opens a YAML tag, and the expression will not parse without it. + # + # fail_below_min turns the summary into a gate. Until now coverage could + # fall from any figure to any other and no check went red, against a + # project target of 100% -- a stated requirement measured with a gauge + # that could not fail. + # + # One thing the floor does not defend, and it is the likeliest way for + # coverage to break: an empty report reads as 100%. gcovr writes + # line-rate="1.0" beside lines-valid="0" when it finds no data, and the + # action reports 'Line Rate = 100% (0 / 0)' and passes any floor -- + # probed on a runner, 26 Aug 2026. The check that catches that is the + # emptiness assertion in each suite's coverage.sh, not this one. - name: Generate Code Coverage Results Summary - if: (!inputs.skip_coverage) - uses: irongut/CodeCoverageSummary@v1.3.0 + if: ${{ !cancelled() && (!inputs.skip_coverage) }} + uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0 with: filename: ${{ inputs.cmake_path }}/coverage_report/${{ inputs.coverage_name }}.xml format: markdown badge: true hide_complexity: true output: file + thresholds: ${{ inputs.coverage_thresholds }} + fail_below_min: true - name: Write Code Coverage Summary - if: (!inputs.skip_coverage) + if: ${{ !cancelled() && (!inputs.skip_coverage) }} run: | echo "## Coverage Report ${{ inputs.result_affix }}" >> $GITHUB_STEP_SUMMARY cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY - name: Create CheckRun for Code Coverage - if: ((github.event_name == 'push') || (github.event_name == 'workflow_dispatch') || (github.event.pull_request.head.repo.full_name == github.repository)) && (!inputs.skip_coverage) - uses: LouisBrunner/checks-action@v2.0.0 + if: ${{ !cancelled() && ((github.event_name == 'push') || (github.event_name == 'workflow_dispatch') || (github.event.pull_request.head.repo.full_name == github.repository)) && (!inputs.skip_coverage) }} + uses: LouisBrunner/checks-action@937cbbcde3259005b50746dc91cde29098aac2ff # v3.1.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: Code Coverage ${{ inputs.result_affix }} @@ -125,15 +217,15 @@ jobs: output_text_description_file: code-coverage-results.md - name: Add Code Coverage PR Comment - if: ((github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == github.repository)) && (!inputs.skip_coverage) - uses: marocchino/sticky-pull-request-comment@v2.9.4 + if: ${{ !cancelled() && ((github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == github.repository)) && (!inputs.skip_coverage) }} + uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5 with: header: Code Coverage ${{ inputs.result_affix }} path: code-coverage-results.md # Add sudo to move coverage folder created by root user - name: Prepare Coverage GitHub Pages - if: (!inputs.skip_coverage) + if: ${{ !cancelled() && (!inputs.skip_coverage) }} run: >- if [ "${{ inputs.result_affix }}" != "" ] && ${{ inputs.skip_deploy }}; then sudo mv ${{ inputs.cmake_path }}/coverage_report/${{ inputs.coverage_name }} \ @@ -142,25 +234,45 @@ jobs: - name: Coverage Report name id: artifact - if: (!inputs.skip_coverage) + if: ${{ !cancelled() && (!inputs.skip_coverage) }} run: echo "coverage_report=coverage_report-$(date +%s)" >> $GITHUB_OUTPUT + # per_configuration is excluded deliberately. deploy_code_coverage downloads + # every coverage_report-* artifact with merge-multiple, so whatever is in + # here lands on the published site -- and each suite's per-configuration + # directories carry the same names, so ThreadX's would overwrite SMP's. + # The top level therefore holds only the suite directory and the merged XML, + # which is the shape the deploy already expects. - name: Upload Code Coverage Artifacts - uses: actions/upload-artifact@v4.6.2 - if: (inputs.skip_deploy && !inputs.skip_coverage) + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: ${{ !cancelled() && (inputs.skip_deploy && !inputs.skip_coverage) }} with: name: ${{ steps.artifact.outputs.coverage_report }} - path: ${{ inputs.cmake_path }}/coverage_report + path: | + ${{ inputs.cmake_path }}/coverage_report + !${{ inputs.cmake_path }}/coverage_report/per_configuration/** + retention-days: 1 + + # The per-configuration reports, kept separately so they are downloadable + # when the merged number moves and the question is which configuration moved + # it. The name deliberately does not match coverage_report-*, so the deploy + # job's pattern does not pick it up and it never reaches the published site. + - name: Upload Per-Configuration Coverage + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: ${{ !cancelled() && (!inputs.skip_coverage) }} + with: + name: coverage_detail ${{ inputs.result_affix }} + path: ${{ inputs.cmake_path }}/coverage_report/per_configuration retention-days: 1 - name: Upload Code Coverage Pages - uses: actions/upload-pages-artifact@v3.0.1 - if: (!inputs.skip_deploy && !inputs.skip_coverage) + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + if: ${{ !cancelled() && (!inputs.skip_deploy && !inputs.skip_coverage) }} with: path: ${{ inputs.cmake_path }}/coverage_report/${{ inputs.coverage_name }} deploy_code_coverage: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && !inputs.skip_coverage && !inputs.skip_deploy && !failure() && !cancelled() needs: run_tests environment: @@ -171,26 +283,61 @@ jobs: id-token: write steps: - - uses: actions/download-artifact@v4.3.0 + # Selects the coverage artifacts by pattern rather than by name. + # + # This used to ask for ${{ steps.artifact.outputs.coverage_report }}, + # which is set by the "Coverage Report name" step of run_tests -- a + # different job. The steps context does not cross jobs, so that + # expression evaluated to the empty string and the action fell back to + # its documented behaviour for an unspecified name: "No input name, + # artifact-ids or pattern filtered specified, downloading all + # artifacts". It pulled down four, the two coverage reports and the two + # test_reports bundles of JUnit XML, each into a directory named after + # the artifact -- so the published site carried the test reports as well + # as the coverage, under paths containing a run timestamp that changed + # on every publish. + # + # merge-multiple puts the contents of both coverage artifacts directly + # into coverage_report rather than under a directory named for each + # artifact. Each one holds a single directory named for its suite, + # ThreadX or SMP, renamed from merged by the "Prepare Coverage GitHub + # Pages" step, so the merge yields exactly the two suite directories the + # deploy expects, and the artifact name -- with its timestamp -- stops + # appearing in the published path at all. + # + # The two artifacts also each carry a merged.xml -- it was + # default_build_coverage.xml until #665 instrumented every configuration + # and unioned them -- and the merge means one overwrites the other. + # Verified on the runner: both hold merged.xml. That file is consumed by + # CodeCoverageSummary back in run_tests and is not read here, so this is + # untidy rather than wrong. + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 if: ${{ inputs.skip_test }} with: - name: ${{ steps.artifact.outputs.coverage_report }} + pattern: coverage_report-* + merge-multiple: true path: ${{ inputs.cmake_path }}/coverage_report - name: Upload Code Coverage Pages - uses: actions/upload-pages-artifact@v3.0.1 + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 if: ${{ inputs.skip_test }} with: path: . + # The artifacts are named coverage_report- by run_tests, so the + # bare name matched nothing: useGlob defaults to true in this action, and + # as a glob "coverage_report" matches only the literal string. The step + # has therefore been deleting nothing. It does not fail on a miss, which + # is why that went unnoticed; retention-days: 1 on the upload is what has + # actually been clearing these up. - name: Delete Duplicate Code Coverage Artifact - uses: geekyeggo/delete-artifact@v5.1.0 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: - name: coverage_report + name: coverage_report-* - name: Deploy GitHub Pages site id: deployment - uses: actions/deploy-pages@v4.0.5 + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 - name: Write Code Coverage Report URL run: >- diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index ee5519fdb..7b5724ac5 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -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 diff --git a/.github/workflows/repo_checks.yml b/.github/workflows/repo_checks.yml new file mode 100644 index 000000000..955e6ddd1 --- /dev/null +++ b/.github/workflows/repo_checks.yml @@ -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 diff --git a/.gitignore b/.gitignore index 47438c97a..087f0e67e 100644 --- a/.gitignore +++ b/.gitignore @@ -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.* diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f6be6d25..940717df9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 " 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 _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} ) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7dfafcacc..e340d3d75 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,69 +4,365 @@ Thanks for your interest in this project. ## Project description -Eclipse ThreadX provides a vendor-neutral, open source, safety certified OS for -real-time applications published on under a permissive license. The Eclipse -ThreadX suite encompasses: -* ThreadX - advanced real-time operating system (RTOS) designed specifically for deeply embedded applications -* NetX Duo - advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications -* FileX - high-performance, FAT-compatible file system that’s fully integrated with ThreadX kernel -* GUIX - provides a complete, embedded graphical user interface (GUI) library -* USBX - high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with ThreadX kernel -* LevelX - Flash Wear Leveling for FileX and stand-alone purposes -* GuiX Studio - design environment, facilitating the creation and maintenance of all graphical elements for GUIX -* TraceX - analysis tool that provides a graphical view of real-time system events to better understand the behavior of real-time systems - -Project site: https://projects.eclipse.org/projects/iot.threadx +Eclipse ThreadX provides a vendor-neutral, open source, safety-certified OS for real-time applications, published under a permissive license. The Eclipse ThreadX suite encompasses: + +* **ThreadX** - advanced real-time operating system (RTOS) designed specifically for deeply embedded applications +* **NetX Duo** - advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications +* **FileX** - high-performance, FAT-compatible file system that is fully integrated with the ThreadX kernel +* **GUIX** - complete, embedded graphical user interface (GUI) library +* **GUIX Studio** - design environment, facilitating the creation and maintenance of all graphical elements for GUIX +* **USBX** - high-performance USB host, device, and on-the-go (OTG) embedded stack, fully integrated with the ThreadX kernel +* **LevelX** - flash wear levelling for FileX and stand-alone purposes +* **TraceX** - analysis tool that provides a graphical view of real-time system events to better understand the behaviour of real-time systems +* **ZoneX** - deterministic partitioning hypervisor for mixed-criticality embedded systems +* **SampleX** - samples and demos for the components above + +Project websites: + +* https://threadx.io +* https://projects.eclipse.org/projects/iot.threadx + +This file describes how to contribute to **ThreadX**. General contribution conventions are shared across the Eclipse ThreadX repositories; build and test instructions differ by component. ## Terms of Use -This repository is subject to the Terms of Use of the Eclipse Foundation -https://www.eclipse.org/legal/termsofuse.php +This repository is subject to the Terms of Use of the Eclipse Foundation: https://www.eclipse.org/legal/termsofuse.php -## Developer resources +## New contributors -Information regarding source code management, builds, coding standards, and more. -https://projects.eclipse.org/projects/iot.threadx/developer +Welcome. Here is the shortest path from zero to a merged pull request. -The project maintains the following source code repositories +1. **Create an Eclipse Foundation account.** https://accounts.eclipse.org/user/register -* https://github.com/eclipse-threadx/.github -* https://github.com/eclipse-threadx/cmsis-packs -* https://github.com/eclipse-threadx/filex -* https://github.com/eclipse-threadx/getting-started -* https://github.com/eclipse-threadx/guix -* https://github.com/eclipse-threadx/levelx -* https://github.com/eclipse-threadx/netxduo -* https://github.com/eclipse-threadx/rtos-docs -* https://github.com/eclipse-threadx/samples -* https://github.com/eclipse-threadx/threadx -* https://github.com/eclipse-threadx/threadx-learn-samples -* https://github.com/eclipse-threadx/tracex -* https://github.com/eclipse-threadx/usbx + The email address on that account matters: it must be the same address you use as the `Author` of your Git commits. If the two do not match, the ECA check on your pull request will fail. + +2. **Sign the Eclipse Contributor Agreement (ECA).** See the section below. This is a one-time step and covers every Eclipse Foundation project. + +
+ +3. **Configure Git accordingly.** + + ``` + git config user.name "Your Name" + git config user.email "the-address-on-your-eclipse-account@example.org" + ``` + +4. **Pick something to work on.** Open issues are fair game, including ones nobody has assigned. Please leave a comment on the issue saying you intend to work on it, so two people do not solve the same problem twice. If an issue carries a `good first issue` label, it is a reasonable starting point. + +5. **Have an idea for a new feature? Discuss it first.** Open a thread in [GitHub Discussions](https://github.com/orgs/eclipse-threadx/discussions) or raise it on the [developer mailing list](https://accounts.eclipse.org/mailing-list/threadx-dev) before writing code. Kernel APIs and port changes can affect many applications, so discuss the shape of a feature before submitting a finished implementation. + +Bug fixes and documentation corrections need no prior discussion. Send them straight in. ## Eclipse Development Process -This Eclipse Foundation open project is governed by the Eclipse Foundation -Development Process and operates under the terms of the Eclipse IP Policy. +This Eclipse Foundation open project is governed by the Eclipse Foundation Development Process and operates under the terms of the Eclipse IP Policy. * https://eclipse.org/projects/dev_process * https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf ## Eclipse Contributor Agreement -In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA). -https://www.eclipse.org/legal/ECA.php +In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA): https://www.eclipse.org/legal/ECA.php + +The ECA provides the Eclipse Foundation with a permanent record that you agree that each of your contributions will comply with the commitments documented in the Developer Certificate of Origin (DCO). Having an ECA on file associated with the email address matching the "Author" field of your contribution's Git commits fulfills the DCO's requirement that you sign-off on your contributions. + +For more information, please see the Eclipse Committer Handbook: https://www.eclipse.org/projects/handbook/#resources-commit + +## Required tooling + +Build and test ThreadX with CMake and Ninja. The Windows simulator uses MSVC from the Visual Studio Build Tools; a full Visual Studio installation is not required. + +| Tool | Requirement | +| ---- | ----------- | +| CMake | 3.13 or later (the minimum declared by the root build) | +| Ninja | any recent release | +| Git | any recent release | +| Python | 3.x, with `gcovr` 8.6 for coverage reports | + +The reference host compiler is GCC 14 on Linux and MSVC on Windows. Arm port CI pins Arm GNU Toolchain **14.3.rel1** (`arm-none-eabi` and `aarch64-none-elf`) and Arm Toolchain for Embedded **22.1.0**. Use GCC syntax for assembly built with GNU toolchains. Other ports may require their own vendor toolchain; check the port's build files. + +ThreadX code is C99-compatible. The kernel, SMP, and FreeRTOS compatibility test projects declare C99 explicitly. + +## Building and testing + +The scripts below are thin entry points to the CMake and CTest projects under `test/`. On Ubuntu, `scripts/install.sh` installs the dependencies used by the host regression jobs. + +| Scripts | What they cover | +| ------- | --------------- | +| `scripts/build_tx.sh`, `scripts/test_tx.sh` | The single-core kernel regression suite across its build configurations. | +| `scripts/build_smp.sh`, `scripts/test_smp.sh` | The SMP kernel regression suite across its build configurations. | +| `scripts/build_freertos.sh`, `scripts/test_freertos.sh` | The FreeRTOS compatibility layer. | +| `scripts/build_tx_riscv.sh`, `scripts/test_tx_riscv.sh` | The RISC-V kernel port; install its toolchain with `scripts/install_riscv.sh`. | +| `scripts/build_posix.sh`, `scripts/test_posix.sh` | The POSIX compatibility layer on RISC-V. | +| `scripts/build_tx.ps1`, `scripts/test_tx.ps1` | The Windows single-core simulator (`win32` or `win64`). | +| `scripts/build_smp.ps1`, `scripts/test_smp.ps1` | The Windows SMP simulator (`win64`). | + +For the Linux suites, run the matching build script before its test script. The test scripts use CTest and run the timing-sensitive simulator tests serially. The Windows scripts also configure CMake with Ninja; run them from a PowerShell environment with the Visual Studio Build Tools installed. + +For Arm port changes, `scripts/check_gcc.sh` and `scripts/check_clang.sh` assemble and compile the supported port sources and link examples; they do not execute target code. `scripts/check_ports.sh` checks generated-port reproducibility and other port-tree rules. The Cortex-R52 FVP workflow executes images on the Armv8-R AEM FVP when the model is configured. Build-only checks cannot establish that a port runs correctly, so report target execution separately. + +The kernel and SMP CI jobs instrument all five host build configurations and merge their coverage. They currently enforce a **99% line coverage floor** on each merged report. The project goal is 100% test coverage, and new behaviour needs regression tests. The existing CI floor does not establish full coverage: it does not gate branch coverage, and the FreeRTOS and RISC-V jobs do not collect coverage. Explain any gap relevant to your change in the pull request. + +Describe what you ran and what passed. A successful build alone does not verify runtime behaviour. + +## Continuous integration + +ThreadX has six directly triggered GitHub Actions workflows and one reusable regression workflow. They do not all have the same triggers: some run for pushes and pull requests to `dev` and `master`, while others run only for pull requests. Most build and port checks have path filters; `regression_test.yml` is unfiltered. + +| Workflow | What it checks | +| -------- | -------------- | +| `regression_test.yml` | Single-core kernel, SMP, FreeRTOS compatibility, and RISC-V regression suites through `regression_template.yml`; kernel and SMP merged line coverage floors. | +| `gcc_check.yml` | Arm port assembly, C compilation, example links, and invalid Cortex-R52 option combinations with Arm GNU Toolchain. | +| `clang_check.yml` | Arm port assembly, C compilation, and example links with Arm Toolchain for Embedded. | +| `ci_cortex_m.yml` | CMake and Ninja cross-builds for selected Cortex-M ports. | +| `ports_arch_check.yml` | Generated-port consistency and port-tree checks. | +| `r52_fvp.yml` | Cortex-R52 builds and FVP execution when the model is configured. | + +The Armv8-R AEM FVP is distributed behind a click-through licence. If the `FVP_AEMV8R_URL` repository variable is unset, the Cortex-R52 workflow builds the images but reports that it did not execute them. A green build in that state is not a runtime test. + +## Pull request acceptance criteria + +**Pull requests must target the `dev` branch.** `master` holds the latest release; see [Release model and support](#release-model-and-support) below. A pull request opened against `master` will be asked to retarget. + +Before requesting a review, check your contribution against this list. + +**Process** + +* The branch is a feature branch based on `dev`. Never commit directly to `master` or `dev`. +* Your ECA is signed and the commit `Author` email matches your Eclipse account. +* The pull request is one logical change. Unrelated fixes belong in separate pull requests. +* Commit subject lines start with a past-tense verb, for example `Fixed the memory allocator`. +* The pull request explains what changed and why, and how you verified it. + +**Code** + +* The code is C99-compatible. +* It follows the coding style of the surrounding code. +* New functions and structures are documented in comments, as in existing code. +* MISRA C rules are followed as closely as practical, taking MISRA C 2004, 2012 and 2023 into account. Any deviation is explicit, names the rule being circumvented, and justifies it in a comment. +* `goto` is not used. +* No new external dependencies. This is a hard rule. +* When implementing an industry standard, code is not copied from an existing implementation. Existing implementations may inform your work, but you must identify those sources clearly. +* Code is written with ThreadX's priorities in mind: runtime speed and small code size. +* New C and assembly files, and edited C and assembly files, carry the appropriate header and attribution (see below). + +**Verification** + +* All applicable CI checks are green. +* The change builds without new warnings on the reference toolchains. +* Regression tests covering the change are added or updated. The project targets 100% test coverage; a pull request that lowers coverage needs a stated reason. The current host CI floor is 99% merged line coverage for each kernel suite. +* API or behaviour changes come with a matching documentation pull request against [rtos-docs-asciidoc](https://github.com/eclipse-threadx/rtos-docs-asciidoc). + +**Security** + +If you discover a security issue while working on a change, do not describe it in a public pull request. Follow [SECURITY.md](SECURITY.md) instead. + +## AI-assisted contributions + +**AI-assisted contributions are welcome**, provided they are attributed. + +Two things are non-negotiable: + +1. **Attribution.** Mark AI-assisted C and assembly files as described below, and identify the tool and model in the commit message. +2. **Human responsibility.** The human contributor submitting the pull request is responsible for the contribution - technically and legally. Signing the ECA means *you* certify the contribution's provenance. An AI tool cannot sign the ECA and cannot hold that responsibility. Review what the tool produced, understand it, and verify that it is correct and that you have the right to contribute it. "The model wrote it" is not a defence. + +This is consistent with the Eclipse Foundation's [Generative AI Usage Guidelines](https://www.eclipse.org/projects/guidelines/genai/) and the [Eclipse Project Handbook](https://www.eclipse.org/projects/handbook/#genai). Please read them before submitting AI-assisted work. + +### Using a coding agent + +Give a coding agent this contribution guide and the build instructions for the area it changes. Review its output against the same acceptance criteria as any other contribution. In particular, check C99 compatibility, surrounding style, test coverage, and the correct port or simulator for runtime verification. + +### Header for new files + +Add this header when creating a new C or assembly (`.S`) file: + +```c +/*************************************************************************** + * Copyright (c) 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 (). + * 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 + **************************************************************************/ +``` + +Substitute the current year, product name, and model and version. If a file was written without AI assistance, omit the AI Disclosure paragraph and use `SPDX-License-Identifier: MIT`. + +### Header for existing files + +When editing an existing C or assembly file whose copyright is from 2025 or earlier, and which does not already mention Eclipse ThreadX contributors, add this line to the header: + +```c + * Copyright (c) Eclipse ThreadX contributors +``` + +It goes *below* the older copyright. All copyright lines must stay in chronological order. For example: + +```c +/*************************************************************************** + * Copyright (c) 2024 Microsoft Corporation + * 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. + * + * SPDX-License-Identifier: MIT + **************************************************************************/ +``` + +If the edit was AI-assisted and the file does not already carry an AI disclosure line, add this line just under the header: + +```c +// Portions of this file were generated with AI assistance. +``` -The ECA provides the Eclipse Foundation with a permanent record that you agree -that each of your contributions will comply with the commitments documented in -the Developer Certificate of Origin (DCO). Having an ECA on file associated with -the email address matching the "Author" field of your contribution's Git commits -fulfills the DCO's requirement that you sign-off on your contributions. +Use the comment marker already used by the file. Keep an existing disclosure line unchanged and never add a second one. If you copy an existing file to get started on a new one, treat the result as a new file: use the new-file header, do not carry the old one over. -For more information, please see the Eclipse Committer Handbook: -https://www.eclipse.org/projects/handbook/#resources-commit +### Commit attribution + +Attribute AI assistance with an `Assisted-by` trailer in each commit that contains AI-assisted changes: + +```text +Fixed the thread resume status + +A suspended thread could report an out-of-date status after resuming. + +The resume path now returns the status set by the operation that woke it. + +The single-core regression suite passed all tests. + +Assisted-by: () +``` + +Use the product's accepted name (`Claude Code`, `Copilot`, `Codex`, or `Gemini`) and the model string reported by the tool. Do not use `Co-Authored-By` for AI attribution. Commit subjects and pull request titles start with a past-tense verb and stay within 72 characters. The message body states the cause, fix, and test result in that order; wrap commit bodies at 88 characters. Pull request descriptions use one line per paragraph. + +## Release model and support + +This section summarises the project's [Release Model and Support Policy](https://github.com/eclipse-threadx/rtos-docs-asciidoc/blob/main/rtos-docs/home/modules/ROOT/pages/releases-and-support.adoc), which is the authoritative version. + +### Version numbers + +Eclipse ThreadX releases generally follow [Semantic Versioning](https://semver.org/). Given a version number **X.Y.Z.Bh**, for example `6.5.0.202601a`: + +* **X** increases for a *milestone release*. Components currently stay at version 6. +* **Y** increases for a *feature release* adding a major feature. +* **Z** increases for a *maintenance release* of minor fixes and improvements. +* **B** is a *build number* identifying the quarter of publication - `202601` is Q1 2026. +* **h** denotes a *hotfix release*, identified by a letter. Hotfix releases are component-specific. + +### Release cadence + +The project adopted a predictable quarterly release model in September 2025 and has published a release every quarter since. + +Quarterly releases ship new versions of every component, whether or not that component saw code changes, so that version numbers do not drift apart between components. A release shipping no code changes for a component says so in its release notes. + +Urgent fixes between quarterly releases ship as *hotfix* releases. Those contain only security fixes, or fixes for serious problems that prevent building or testing applications. + +### Branches + +The project runs a time-based release train on trunk-based development. There are no long-term support branches and no backports to older releases. + +* `master` always contains the latest quarterly or hotfix release. +* `dev` is the integration branch. Pull requests are merged there during the quarter. Track `dev` if you want to test new features and fixes ahead of a release. +* A quarterly release is performed by merging `dev` into `master`. + +### Support policy + +Issues in the codebase are fixed on a best-effort basis, and pull requests fixing existing or new issues are gladly accepted. + +Security vulnerabilities disclosed confidentially are handled under the [Eclipse Foundation's security policy](https://www.eclipse.org/security/policy/). Once a candidate vulnerability is confirmed, the team works to deliver a fix as soon as possible, shipping it in the next quarterly release or as a hotfix depending on timing. Resolved vulnerabilities are disclosed immediately after a release containing the fix becomes available. The team aims to resolve newly confirmed vulnerabilities within three months; that period may be extended by the Project Leadership Chain together with the Eclipse Foundation Security team where appropriate. + +See [SECURITY.md](SECURITY.md) for how to report a vulnerability. + +### Roadmap + +The project team plans its work on a [public GitHub project board](https://github.com/orgs/eclipse-threadx/projects/2/views/2). + +### A note on older releases + +Microsoft contributed only the Azure RTOS codebase v6.x to the Eclipse Foundation. Older ThreadX releases (v5.x and lower) sold by Express Logic were never made open source, and Microsoft has discontinued sales and support for them. Users of ThreadX 5.x and lower should upgrade to the latest release of Eclipse ThreadX as soon as possible. + +## Documentation + +The documentation is published at **https://threadx.io**. PDF manuals for every component, in A4 and US Letter formats, are attached as assets to each GitHub release. + +### The stack + +Documentation is written in [AsciiDoc](https://asciidoc.org/) and built with [Antora](https://antora.org/). PDF manuals are produced by the [Antora Assembler](https://docs.antora.org/assembler/latest/) with `asciidoctor-pdf`. + +### The workflow + +1. The single source of truth is [rtos-docs-asciidoc](https://github.com/eclipse-threadx/rtos-docs-asciidoc). All documentation changes are made there, as pull requests, following the same branch rules as the code repositories. +2. At release time the site is generated from that source into [rtos-docs-html](https://github.com/eclipse-threadx/rtos-docs-html), which holds the rendered HTML and exists solely for website integration. Do not edit it by hand - your changes will be overwritten by the next build. +3. The website then serves the generated content from `rtos-docs-html`. + +The older `rtos-docs` repository, which held the documentation in Markdown, is archived and superseded by `rtos-docs-asciidoc`. Do not send changes there. + +If your contribution adds or changes an API or a feature, open a matching pull request against `rtos-docs-asciidoc`. + +## Developer resources + +Information regarding source code management, builds, coding standards, and more: https://projects.eclipse.org/projects/iot.threadx/developer + +The project maintains the following repositories: + +**Components** + +* https://github.com/eclipse-threadx/threadx +* https://github.com/eclipse-threadx/netxduo +* https://github.com/eclipse-threadx/filex +* https://github.com/eclipse-threadx/guix +* https://github.com/eclipse-threadx/usbx +* https://github.com/eclipse-threadx/levelx +* https://github.com/eclipse-threadx/tracex +* https://github.com/eclipse-threadx/zonex + +**Samples and platforms** + +* https://github.com/eclipse-threadx/samplex +* https://github.com/eclipse-threadx/supported-platforms + +**Documentation** + +* https://github.com/eclipse-threadx/rtos-docs-asciidoc +* https://github.com/eclipse-threadx/rtos-docs-html + +**Community and process** + +* https://github.com/eclipse-threadx/discussions +* https://github.com/eclipse-threadx/trustedx +* https://github.com/eclipse-threadx/.github ## Contact -Contact the project developers via the project's "dev" list. +### GitHub Discussions + +https://github.com/orgs/eclipse-threadx/discussions + +Q&A, feedback, and announcements. Decisions taken by the project team are documented here as well. This is usually the fastest way to reach both the team and other users. + +### Main ThreadX mailing list + +https://accounts.eclipse.org/mailing-list/threadx + +News and updates about the ThreadX project and the ThreadX Alliance. + +### Developer mailing list + https://accounts.eclipse.org/mailing-list/threadx-dev + +Project team conversations. Feel free to jump in and ask non-technical questions there. + +### User mailing list + +https://accounts.eclipse.org/mailing-list/threadx-users + +Ask your technical questions and discuss issues here. diff --git a/README.md b/README.md index 260a77a30..256162ae4 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build-all.log b/build-all.log new file mode 100644 index 000000000..dbdac9452 --- /dev/null +++ b/build-all.log @@ -0,0 +1,442 @@ +[1/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_performance_info_get.c.o +[2/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_thread_context_save.c.o +[3/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_timer_interrupt.c.o +[4/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_info_get.c.o +[5/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_reset.c.o +[6/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_delete.c.o +[7/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_cleanup.c.o +[8/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_thread_interrupt_control.c.o +[9/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_delete.c.o +[10/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_allocate.c.o +[11/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_initialize.c.o +[12/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_performance_system_info_get.c.o +[13/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_thread_context_restore.c.o +[14/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_thread_system_return.c.o +[15/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_thread_stack_build.c.o +[16/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_create.c.o +[17/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_thread_schedule.c.o +[18/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_initialize.c.o +[19/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_pool_prioritize.c.o +[20/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_performance_system_info_get.c.o +[21/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_block_release.c.o +[22/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_create.c.o +[23/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_delete.c.o +[24/441] Building C object threadx/CMakeFiles/threadx.dir/ports/linux/gnu/src/tx_initialize_low_level.c.o +[25/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_info_get.c.o +[26/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_cleanup.c.o +[27/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_cleanup.c.o +[28/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_create.c.o +[29/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_prioritize.c.o +[30/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_search.c.o +[31/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_delete.c.o +[32/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_release.c.o +[33/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_allocate.c.o +[34/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_byte_pool_performance_info_get.c.o +[35/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_get.c.o +[36/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_performance_info_get.c.o +[37/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_info_get.c.o +[38/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_initialize.c.o +[39/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_performance_system_info_get.c.o +[40/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_initialize_high_level.c.o +[41/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_misra.c.o +[42/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_create.c.o +[43/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_set.c.o +[44/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_initialize_kernel_setup.c.o +[45/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_initialize_kernel_enter.c.o +[46/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_cleanup.c.o +[47/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_initialize.c.o +[48/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_get.c.o +[49/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_event_flags_set_notify.c.o +[50/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_info_get.c.o +[51/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_performance_info_get.c.o +[52/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_performance_system_info_get.c.o +[53/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_delete.c.o +[54/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_priority_change.c.o +[55/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_prioritize.c.o +[56/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_initialize.c.o +[57/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_create.c.o +[58/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_cleanup.c.o +[59/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_delete.c.o +[60/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_flush.c.o +[61/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_front_send.c.o +[62/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_performance_system_info_get.c.o +[63/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_performance_info_get.c.o +[64/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_prioritize.c.o +[65/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_ceiling_put.c.o +[66/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_send.c.o +[67/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_info_get.c.o +[68/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_mutex_put.c.o +[69/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_initialize.c.o +[70/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_get.c.o +[71/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_create.c.o +[72/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_delete.c.o +[73/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_info_get.c.o +[74/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_performance_system_info_get.c.o +[75/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_send_notify.c.o +[76/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_cleanup.c.o +[77/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_queue_receive.c.o +[78/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_performance_info_get.c.o +[79/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_prioritize.c.o +[80/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_create.c.o +[81/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_put.c.o +[82/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_semaphore_put_notify.c.o +[83/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_entry_exit_notify.c.o +[84/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_identify.c.o +[85/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_performance_info_get.c.o +[86/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_performance_system_info_get.c.o +[87/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_relinquish.c.o +[88/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_preemption_change.c.o +[89/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_priority_change.c.o +[90/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_resume.c.o +[91/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_shell_entry.c.o +[92/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_stack_error_handler.c.o +[93/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_sleep.c.o +[94/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_stack_analyze.c.o +[95/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_initialize.c.o +[96/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_info_get.c.o +[97/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_stack_error_notify.c.o +[98/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_time_slice.c.o +[99/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_time_get.c.o +[100/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_terminate.c.o +[101/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_activate.c.o +[102/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_timeout.c.o +[103/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_system_resume.c.o +[104/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_suspend.c.o +[105/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_time_slice_change.c.o +[106/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_create.c.o +[107/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_delete.c.o +[108/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_change.c.o +[109/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_deactivate.c.o +[110/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_wait_abort.c.o +[111/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_system_preempt_check.c.o +[112/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_info_get.c.o +[113/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_thread_system_suspend.c.o +[114/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_time_set.c.o +[115/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_system_deactivate.c.o +[116/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_initialize.c.o +[117/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_performance_info_get.c.o +[118/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_performance_system_info_get.c.o +[119/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_expiration_process.c.o +[120/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_system_activate.c.o +[121/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_disable.c.o +[122/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_enable.c.o +[123/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_event_filter.c.o +[124/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_interrupt_control.c.o +[125/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_buffer_full_notify.c.o +[126/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_initialize.c.o +[127/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_isr_exit_insert.c.o +[128/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_timer_thread_entry.c.o +[129/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_event_unfilter.c.o +[130/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_isr_enter_insert.c.o +[131/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_object_unregister.c.o +[132/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_block_pool_prioritize.c.o +[133/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_object_register.c.o +[134/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_block_pool_delete.c.o +[135/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/tx_trace_user_event_insert.c.o +[136/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_block_pool_info_get.c.o +[137/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_block_allocate.c.o +[138/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_byte_allocate.c.o +[139/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_block_release.c.o +[140/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_block_pool_create.c.o +[141/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_byte_pool_create.c.o +[142/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_byte_pool_delete.c.o +[143/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_byte_pool_prioritize.c.o +[144/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_byte_pool_info_get.c.o +[145/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_byte_release.c.o +[146/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_event_flags_create.c.o +[147/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_event_flags_info_get.c.o +[148/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_event_flags_delete.c.o +[149/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_event_flags_get.c.o +[150/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_event_flags_set.c.o +[151/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_event_flags_set_notify.c.o +[152/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_mutex_info_get.c.o +[153/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_mutex_get.c.o +[154/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_mutex_delete.c.o +[155/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_mutex_prioritize.c.o +[156/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_mutex_put.c.o +[157/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_delete.c.o +[158/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_create.c.o +[159/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_front_send.c.o +[160/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_prioritize.c.o +[161/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_receive.c.o +[162/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_mutex_create.c.o +[163/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_flush.c.o +[164/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_info_get.c.o +[165/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_send.c.o +[166/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_queue_send_notify.c.o +[167/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_delete.c.o +[168/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_get.c.o +[169/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_prioritize.c.o +[170/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_info_get.c.o +[171/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_put_notify.c.o +[172/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_ceiling_put.c.o +[173/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_put.c.o +[174/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_entry_exit_notify.c.o +[175/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_semaphore_create.c.o +[176/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_delete.c.o +[177/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_info_get.c.o +[178/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_preemption_change.c.o +[179/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_priority_change.c.o +[180/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_create.c.o +[181/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_reset.c.o +[182/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_relinquish.c.o +[183/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_time_slice_change.c.o +[184/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_suspend.c.o +[185/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_wait_abort.c.o +[186/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_resume.c.o +[187/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_timer_activate.c.o +[188/441] Building C object regression/CMakeFiles/test_weak_defaults.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/shared/regression/testcontrol_weak_defaults.c.o +[189/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_timer_change.c.o +[190/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_thread_terminate.c.o +[191/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_timer_delete.c.o +[192/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_timer_deactivate.c.o +[193/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_shell_entry.c.o +[194/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_timer_create.c.o +[195/441] Building C object samples/CMakeFiles/sample_threadx.dir/fake.c.o +[196/441] Building C object regression/CMakeFiles/threadx_initialize_kernel_setup_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_initialize_kernel_setup_test.c.o +[197/441] Building C object samples/CMakeFiles/sample_threadx.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/ports/linux/gnu/example_build/sample_threadx.c.o +[198/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_delete.c.o +[199/441] Building C object threadx/CMakeFiles/threadx.dir/common/src/txe_timer_info_get.c.o +[200/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_delete.c.o +[201/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/thread_transition/threadx_thread_transition_configuration_test.c.o +[202/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_terminate.c.o +[203/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_terminate.c.o +[204/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_reset.c.o +[205/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_initialize.c.o +[206/441] Building C object thread_transition/CMakeFiles/tx_tt_ni.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_reset.c.o +[207/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_shell_entry.c.o +[208/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_delete.c.o +[209/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_terminate.c.o +[210/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_reset.c.o +[211/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/thread_transition/threadx_thread_transition_configuration_test.c.o +[212/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_reset.c.o +[213/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_delete.c.o +[214/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_shell_entry.c.o +[215/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_terminate.c.o +[216/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_terminate.c.o +[217/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_initialize.c.o +[218/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_delete.c.o +[219/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_delete.c.o +[220/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_reset.c.o +[221/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_terminate.c.o +[222/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_reset.c.o +[223/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/thread_transition/threadx_thread_transition_configuration_test.c.o +[224/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_shell_entry.c.o +[225/441] Building C object thread_transition/CMakeFiles/tx_tt_ni_no_notify.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_initialize.c.o +[226/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_delete.c.o +[227/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_terminate.c.o +[228/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_reset.c.o +[229/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/thread_transition/threadx_thread_transition_configuration_test.c.o +[230/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_terminate.c.o +[231/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_reset.c.o +[232/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/tx_thread_initialize.c.o +[233/441] Building C object thread_transition/CMakeFiles/tx_tt_no_error_checking.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/common/src/txe_thread_delete.c.o +[234/441] Linking C executable thread_transition/tx_tt_ni +[235/441] Linking C executable thread_transition/tx_tt_ni_no_error_checking +[236/441] Linking C executable thread_transition/tx_tt_ni_no_notify +[237/441] Linking C executable thread_transition/tx_tt_no_error_checking +[238/441] Linking C shared library threadx/libthreadx.so +[239/441] Generating tx_initialize_low_level.c for test +[240/441] Building C object regression/CMakeFiles/threadx_block_memory_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_thread_terminate_test.c.o +[241/441] Building C object regression/CMakeFiles/threadx_block_memory_error_detection_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_error_detection_test.c.o +[242/441] Building C object regression/CMakeFiles/threadx_byte_memory_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_suspension_test.c.o +[243/441] Building C object regression/CMakeFiles/threadx_block_memory_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_information_test.c.o +[244/441] Building C object regression/CMakeFiles/threadx_block_memory_prioritize_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_prioritize_test.c.o +[245/441] Building C object regression/CMakeFiles/threadx_block_memory_suspension_timeout_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_suspension_timeout_test.c.o +[246/441] Building C object regression/CMakeFiles/threadx_byte_memory_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_information_test.c.o +[247/441] Building C object regression/CMakeFiles/threadx_block_memory_basic_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_basic_test.c.o +[248/441] Building C object regression/CMakeFiles/threadx_block_memory_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_block_memory_suspension_test.c.o +[249/441] Building C object regression/CMakeFiles/threadx_byte_memory_suspension_timeout_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_suspension_timeout_test.c.o +[250/441] Building C object regression/CMakeFiles/threadx_byte_memory_prioritize_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_prioritize_test.c.o +[251/441] Building C object regression/CMakeFiles/threadx_byte_memory_basic_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_basic_test.c.o +[252/441] Building C object regression/CMakeFiles/test_utility.dir/tx_initialize_low_level.c.o +[253/441] Building C object regression/CMakeFiles/threadx_byte_memory_thread_contention_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_thread_contention_test.c.o +[254/441] Building C object regression/CMakeFiles/test_utility.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/testcontrol.c.o +[255/441] Building C object regression/CMakeFiles/threadx_byte_memory_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_byte_memory_thread_terminate_test.c.o +[256/441] Building C object regression/CMakeFiles/threadx_interrupt_control_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_interrupt_control_test.c.o +[257/441] Building C object regression/CMakeFiles/threadx_event_flag_suspension_different_bits_consume_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_suspension_different_bits_consume_test.c.o +[258/441] Building C object regression/CMakeFiles/threadx_event_flag_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_suspension_test.c.o +[259/441] Building C object regression/CMakeFiles/threadx_event_flag_isr_wait_abort_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_isr_wait_abort_test.c.o +[260/441] Building C object regression/CMakeFiles/threadx_event_flag_isr_set_clear_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_isr_set_clear_test.c.o +[261/441] Building C object regression/CMakeFiles/threadx_event_flag_basic_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_basic_test.c.o +[262/441] Building C object regression/CMakeFiles/threadx_event_flag_suspension_consume_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_suspension_consume_test.c.o +[263/441] Building C object regression/CMakeFiles/threadx_event_flag_single_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_single_thread_terminate_test.c.o +[264/441] Building C object regression/CMakeFiles/threadx_event_flag_suspension_different_bits_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_suspension_different_bits_test.c.o +[265/441] Building C object regression/CMakeFiles/threadx_event_flag_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_thread_terminate_test.c.o +[266/441] Building C object regression/CMakeFiles/threadx_event_flag_suspension_timeout_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_suspension_timeout_test.c.o +[267/441] Building C object regression/CMakeFiles/threadx_event_flag_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_event_flag_information_test.c.o +[268/441] Building C object regression/CMakeFiles/threadx_mutex_delete_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_delete_test.c.o +[269/441] Building C object regression/CMakeFiles/threadx_mutex_basic_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_basic_test.c.o +[270/441] Linking C executable samples/sample_threadx +[271/441] Linking C executable regression/threadx_initialize_kernel_setup_test +[272/441] Linking C executable regression/threadx_block_memory_suspension_test +[273/441] Linking C executable regression/threadx_block_memory_basic_test +[274/441] Linking C executable regression/threadx_block_memory_error_detection_test +[275/441] Linking C executable regression/threadx_block_memory_information_test +[276/441] Linking C executable regression/threadx_byte_memory_suspension_timeout_test +[277/441] Linking C executable regression/threadx_byte_memory_prioritize_test +[278/441] Linking C executable regression/threadx_block_memory_thread_terminate_test +[279/441] Linking C executable regression/threadx_byte_memory_information_test +[280/441] Linking C executable regression/threadx_byte_memory_suspension_test +[281/441] Linking C executable regression/threadx_event_flag_basic_test +[282/441] Linking C executable regression/threadx_byte_memory_basic_test +[283/441] Linking C executable regression/threadx_byte_memory_thread_contention_test +[284/441] Linking C executable regression/threadx_block_memory_suspension_timeout_test +[285/441] Linking C executable regression/threadx_block_memory_prioritize_test +[286/441] Linking C executable regression/threadx_event_flag_information_test +[287/441] Linking C executable regression/threadx_byte_memory_thread_terminate_test +[288/441] Building C object regression/CMakeFiles/threadx_mutex_preemption_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_preemption_test.c.o +[289/441] Building C object regression/CMakeFiles/threadx_mutex_no_preemption_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_no_preemption_test.c.o +[290/441] Linking C executable regression/threadx_event_flag_isr_set_clear_test +[291/441] Linking C executable regression/threadx_event_flag_isr_wait_abort_test +[292/441] Building C object regression/CMakeFiles/threadx_mutex_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_information_test.c.o +[293/441] Building C object regression/CMakeFiles/threadx_mutex_nested_priority_inheritance_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c.o +[294/441] Building C object regression/CMakeFiles/threadx_mutex_priority_inheritance_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_priority_inheritance_test.c.o +[295/441] Building C object regression/CMakeFiles/threadx_mutex_proritize_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_proritize_test.c.o +[296/441] Building C object regression/CMakeFiles/threadx_mutex_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_thread_terminate_test.c.o +[297/441] Building C object regression/CMakeFiles/threadx_mutex_suspension_timeout_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_mutex_suspension_timeout_test.c.o +[298/441] Linking C executable regression/threadx_event_flag_suspension_consume_test +[299/441] Linking C executable regression/threadx_event_flag_single_thread_terminate_test +[300/441] Linking C executable regression/threadx_event_flag_suspension_different_bits_consume_test +[301/441] Linking C executable regression/threadx_event_flag_suspension_timeout_test +[302/441] Linking C executable regression/threadx_interrupt_control_test +[303/441] Linking C executable regression/threadx_event_flag_suspension_test +[304/441] Linking C executable regression/threadx_event_flag_thread_terminate_test +[305/441] Linking C executable regression/threadx_mutex_basic_test +[306/441] Linking C executable regression/threadx_event_flag_suspension_different_bits_test +[307/441] Linking C executable regression/threadx_mutex_delete_test +[308/441] Building C object regression/CMakeFiles/threadx_queue_basic_four_word_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_basic_four_word_test.c.o +[309/441] Building C object regression/CMakeFiles/threadx_queue_basic_eight_word_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_basic_eight_word_test.c.o +[310/441] Building C object regression/CMakeFiles/threadx_queue_basic_one_word_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_basic_one_word_test.c.o +[311/441] Linking C executable regression/threadx_mutex_no_preemption_test +[312/441] Linking C executable regression/threadx_mutex_preemption_test +[313/441] Building C object regression/CMakeFiles/threadx_queue_flush_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_flush_test.c.o +[314/441] Building C object regression/CMakeFiles/threadx_queue_empty_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_empty_suspension_test.c.o +[315/441] Building C object regression/CMakeFiles/threadx_queue_flush_no_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_flush_no_suspension_test.c.o +[316/441] Building C object regression/CMakeFiles/threadx_queue_basic_max_message_size_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_basic_max_message_size_test.c.o +[317/441] Building C object regression/CMakeFiles/threadx_queue_basic_two_word_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_basic_two_word_test.c.o +[318/441] Building C object regression/CMakeFiles/threadx_queue_basic_sixteen_word_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_basic_sixteen_word_test.c.o +[319/441] Linking C executable regression/threadx_mutex_nested_priority_inheritance_test +[320/441] Linking C executable regression/threadx_mutex_priority_inheritance_test +[321/441] Building C object regression/CMakeFiles/threadx_queue_front_send_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_front_send_test.c.o +[322/441] Building C object regression/CMakeFiles/threadx_queue_full_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_full_suspension_test.c.o +[323/441] Building C object regression/CMakeFiles/threadx_queue_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_information_test.c.o +[324/441] Linking C executable regression/threadx_mutex_information_test +[325/441] Linking C executable regression/threadx_mutex_suspension_timeout_test +[326/441] Building C object regression/CMakeFiles/threadx_queue_suspension_timeout_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_suspension_timeout_test.c.o +[327/441] Building C object regression/CMakeFiles/threadx_queue_prioritize.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_prioritize.c.o +[328/441] Linking C executable regression/threadx_mutex_thread_terminate_test +[329/441] Linking C executable regression/threadx_mutex_proritize_test +[330/441] Building C object regression/CMakeFiles/threadx_queue_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_queue_thread_terminate_test.c.o +[331/441] Building C object regression/CMakeFiles/threadx_semaphore_basic_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_basic_test.c.o +[332/441] Building C object regression/CMakeFiles/threadx_semaphore_ceiling_put_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_ceiling_put_test.c.o +[333/441] Building C object regression/CMakeFiles/threadx_semaphore_delete_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_delete_test.c.o +[334/441] Linking C executable regression/threadx_queue_basic_eight_word_test +[335/441] Linking C executable regression/threadx_queue_basic_four_word_test +[336/441] Linking C executable regression/threadx_queue_basic_one_word_test +[337/441] Linking C executable regression/threadx_queue_flush_no_suspension_test +[338/441] Linking C executable regression/threadx_queue_empty_suspension_test +[339/441] Linking C executable regression/threadx_queue_basic_max_message_size_test +[340/441] Linking C executable regression/threadx_queue_basic_two_word_test +[341/441] Linking C executable regression/threadx_queue_flush_test +[342/441] Linking C executable regression/threadx_queue_basic_sixteen_word_test +[343/441] Building C object regression/CMakeFiles/threadx_semaphore_non_preemption_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_non_preemption_test.c.o +[344/441] Building C object regression/CMakeFiles/threadx_semaphore_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_information_test.c.o +[345/441] Building C object regression/CMakeFiles/threadx_semaphore_preemption_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_preemption_test.c.o +[346/441] Linking C executable regression/threadx_queue_full_suspension_test +[347/441] Linking C executable regression/threadx_queue_front_send_test +[348/441] Building C object regression/CMakeFiles/threadx_semaphore_timeout_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_timeout_test.c.o +[349/441] Building C object regression/CMakeFiles/threadx_semaphore_thread_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_thread_terminate_test.c.o +[350/441] Building C object regression/CMakeFiles/threadx_thread_basic_time_slice_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_basic_time_slice_test.c.o +[351/441] Building C object regression/CMakeFiles/threadx_semaphore_prioritize.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_semaphore_prioritize.c.o +[352/441] Building C object regression/CMakeFiles/threadx_thread_basic_execution_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_basic_execution_test.c.o +[353/441] Linking C executable regression/threadx_queue_suspension_timeout_test +[354/441] Linking C executable regression/threadx_queue_information_test +[355/441] Building C object regression/CMakeFiles/threadx_thread_completed_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_completed_test.c.o +[356/441] Building C object regression/CMakeFiles/threadx_thread_create_preemption_threshold_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_create_preemption_threshold_test.c.o +[357/441] Building C object regression/CMakeFiles/threadx_thread_delayed_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_delayed_suspension_test.c.o +[358/441] Linking C executable regression/threadx_queue_prioritize +[359/441] Linking C executable regression/threadx_semaphore_basic_test +[360/441] Linking C executable regression/threadx_queue_thread_terminate_test +[361/441] Linking C executable regression/threadx_semaphore_ceiling_put_test +[362/441] Building C object regression/CMakeFiles/threadx_thread_misaligned_stack_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_misaligned_stack_test.c.o +[363/441] Linking C executable regression/threadx_semaphore_delete_test +[364/441] Building C object regression/CMakeFiles/threadx_thread_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_information_test.c.o +[365/441] Building C object regression/CMakeFiles/threadx_thread_multiple_sleep_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_multiple_sleep_test.c.o +[366/441] Building C object regression/CMakeFiles/threadx_thread_multiple_non_current_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_multiple_non_current_test.c.o +[367/441] Building C object regression/CMakeFiles/threadx_thread_multiple_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_multiple_suspension_test.c.o +[368/441] Building C object regression/CMakeFiles/threadx_thread_multiple_time_slice_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_multiple_time_slice_test.c.o +[369/441] Building C object regression/CMakeFiles/threadx_thread_multi_level_preemption_threshold_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_multi_level_preemption_threshold_test.c.o +[370/441] Linking C executable regression/threadx_semaphore_non_preemption_test +[371/441] Linking C executable regression/threadx_semaphore_information_test +[372/441] Linking C executable regression/threadx_semaphore_timeout_test +[373/441] Linking C executable regression/threadx_semaphore_preemption_test +[374/441] Linking C executable regression/threadx_semaphore_thread_terminate_test +[375/441] Linking C executable regression/threadx_semaphore_prioritize +[376/441] Linking C executable regression/threadx_thread_basic_time_slice_test +[377/441] Building C object regression/CMakeFiles/threadx_thread_preemptable_suspension_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_preemptable_suspension_test.c.o +[378/441] Linking C executable regression/threadx_thread_basic_execution_test +[379/441] Linking C executable regression/threadx_thread_completed_test +[380/441] Building C object regression/CMakeFiles/threadx_thread_preemption_change_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_preemption_change_test.c.o +[381/441] Linking C executable regression/threadx_thread_delayed_suspension_test +[382/441] Linking C executable regression/threadx_thread_create_preemption_threshold_test +[383/441] Building C object regression/CMakeFiles/threadx_thread_reset_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_reset_test.c.o +[384/441] Building C object regression/CMakeFiles/threadx_thread_relinquish_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_relinquish_test.c.o +[385/441] Building C object regression/CMakeFiles/threadx_thread_priority_change.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_priority_change.c.o +[386/441] Building C object regression/CMakeFiles/threadx_thread_simple_sleep_non_clear_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_simple_sleep_non_clear_test.c.o +[387/441] Linking C executable regression/threadx_thread_misaligned_stack_test +[388/441] Building C object regression/CMakeFiles/threadx_thread_simple_sleep_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_simple_sleep_test.c.o +[389/441] Building C object regression/CMakeFiles/threadx_thread_simple_suspend_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_simple_suspend_test.c.o +[390/441] Building C object regression/CMakeFiles/threadx_thread_sleep_for_100ticks_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c.o +[391/441] Building C object regression/CMakeFiles/threadx_thread_sleep_terminate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_sleep_terminate_test.c.o +[392/441] Building C object regression/CMakeFiles/threadx_thread_stack_checking_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_stack_checking_test.c.o +[393/441] Linking C executable regression/threadx_thread_multiple_non_current_test +[394/441] Linking C executable regression/threadx_thread_multiple_suspension_test +[395/441] Building C object regression/CMakeFiles/threadx_thread_stack_fill_value_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_stack_fill_value_test.c.o +[396/441] Linking C executable regression/threadx_thread_multiple_sleep_test +[397/441] Linking C executable regression/threadx_thread_information_test +[398/441] Linking C executable regression/threadx_thread_multiple_time_slice_test +[399/441] Building C object regression/CMakeFiles/threadx_thread_time_slice_change_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_time_slice_change_test.c.o +[400/441] Building C object regression/CMakeFiles/threadx_thread_terminate_delete_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_terminate_delete_test.c.o +[401/441] Building C object regression/CMakeFiles/threadx_thread_wait_abort_and_isr_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_wait_abort_and_isr_test.c.o +[402/441] Building C object regression/CMakeFiles/threadx_thread_wait_abort_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_wait_abort_test.c.o +[403/441] Linking C executable regression/threadx_thread_multi_level_preemption_threshold_test +[404/441] Building C object regression/CMakeFiles/threadx_thread_exit_callback_transition_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_thread_exit_callback_transition_test.c.o +[405/441] Linking C executable regression/threadx_thread_preemptable_suspension_test +[406/441] Building C object regression/CMakeFiles/threadx_time_get_set_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_time_get_set_test.c.o +[407/441] Linking C executable regression/threadx_thread_preemption_change_test +[408/441] Linking C executable regression/threadx_thread_reset_test +[409/441] Linking C executable regression/threadx_thread_priority_change +[410/441] Linking C executable regression/threadx_thread_relinquish_test +[411/441] Linking C executable regression/threadx_thread_simple_suspend_test +[412/441] Linking C executable regression/threadx_thread_simple_sleep_test +[413/441] Building C object regression/CMakeFiles/threadx_timer_activate_deactivate_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_activate_deactivate_test.c.o +[414/441] Linking C executable regression/threadx_thread_simple_sleep_non_clear_test +[415/441] Linking C executable regression/threadx_thread_sleep_terminate_test +[416/441] Building C object regression/CMakeFiles/threadx_timer_deactivate_accuracy_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_deactivate_accuracy_test.c.o +[417/441] Linking C executable regression/threadx_thread_sleep_for_100ticks_test +[418/441] Linking C executable regression/threadx_thread_stack_checking_test +[419/441] Building C object regression/CMakeFiles/threadx_timer_information_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_information_test.c.o +[420/441] Building C object regression/CMakeFiles/threadx_timer_large_timer_accuracy_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_large_timer_accuracy_test.c.o +[421/441] Building C object regression/CMakeFiles/threadx_timer_multiple_accuracy_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_multiple_accuracy_test.c.o +[422/441] Building C object regression/CMakeFiles/threadx_timer_multiple_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_multiple_test.c.o +[423/441] Building C object regression/CMakeFiles/threadx_timer_simple_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_timer_simple_test.c.o +[424/441] Building C object regression/CMakeFiles/threadx_trace_entry_update_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_trace_entry_update_test.c.o +[425/441] Linking C executable regression/threadx_thread_time_slice_change_test +[426/441] Linking C executable regression/threadx_thread_stack_fill_value_test +[427/441] Building C object regression/CMakeFiles/threadx_trace_basic_test.dir/tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/regression/threadx_trace_basic_test.c.o +[428/441] Linking C executable regression/threadx_thread_terminate_delete_test +[429/441] Linking C executable regression/threadx_thread_exit_callback_transition_test +[430/441] Linking C executable regression/threadx_thread_wait_abort_and_isr_test +[431/441] Linking C executable regression/threadx_thread_wait_abort_test +[432/441] Linking C executable regression/threadx_time_get_set_test +[433/441] Linking C executable regression/threadx_timer_activate_deactivate_test +[434/441] Linking C executable regression/threadx_timer_deactivate_accuracy_test +[435/441] Linking C executable regression/threadx_timer_large_timer_accuracy_test +[436/441] Linking C executable regression/threadx_timer_multiple_accuracy_test +[437/441] Linking C executable regression/threadx_timer_information_test +[438/441] Linking C executable regression/threadx_timer_simple_test +[439/441] Linking C executable regression/threadx_timer_multiple_test +[440/441] Linking C executable regression/threadx_trace_entry_update_test +[441/441] Linking C executable regression/threadx_trace_basic_test +BUILD_RC=0 diff --git a/cmake/aarch64-none-elf.cmake b/cmake/aarch64-none-elf.cmake new file mode 100644 index 000000000..dada9fec1 --- /dev/null +++ b/cmake/aarch64-none-elf.cmake @@ -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") diff --git a/cmake/arm11.cmake b/cmake/arm11.cmake new file mode 100644 index 000000000..957e1f053 --- /dev/null +++ b/cmake/arm11.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 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) diff --git a/cmake/arm9.cmake b/cmake/arm9.cmake new file mode 100644 index 000000000..436d232e5 --- /dev/null +++ b/cmake/arm9.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) diff --git a/cmake/cortex_a12.cmake b/cmake/cortex_a12.cmake new file mode 100644 index 000000000..4c5a603e2 --- /dev/null +++ b/cmake/cortex_a12.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) diff --git a/cmake/cortex_a15.cmake b/cmake/cortex_a15.cmake new file mode 100644 index 000000000..30ab71d2a --- /dev/null +++ b/cmake/cortex_a15.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) diff --git a/cmake/cortex_a17.cmake b/cmake/cortex_a17.cmake new file mode 100644 index 000000000..c0f7e86be --- /dev/null +++ b/cmake/cortex_a17.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) diff --git a/cmake/cortex_a34.cmake b/cmake/cortex_a34.cmake new file mode 100644 index 000000000..14d244ea3 --- /dev/null +++ b/cmake/cortex_a34.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) diff --git a/cmake/cortex_a35.cmake b/cmake/cortex_a35.cmake new file mode 100644 index 000000000..60107e31e --- /dev/null +++ b/cmake/cortex_a35.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) diff --git a/cmake/cortex_a5.cmake b/cmake/cortex_a5.cmake new file mode 100644 index 000000000..501695db1 --- /dev/null +++ b/cmake/cortex_a5.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) diff --git a/cmake/cortex_a53.cmake b/cmake/cortex_a53.cmake new file mode 100644 index 000000000..975808575 --- /dev/null +++ b/cmake/cortex_a53.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) diff --git a/cmake/cortex_a55.cmake b/cmake/cortex_a55.cmake new file mode 100644 index 000000000..fd13fd276 --- /dev/null +++ b/cmake/cortex_a55.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) diff --git a/cmake/cortex_a57.cmake b/cmake/cortex_a57.cmake new file mode 100644 index 000000000..ca2a1902e --- /dev/null +++ b/cmake/cortex_a57.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) diff --git a/cmake/cortex_a5x.cmake b/cmake/cortex_a5x.cmake new file mode 100644 index 000000000..b212cb877 --- /dev/null +++ b/cmake/cortex_a5x.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) diff --git a/cmake/cortex_a65.cmake b/cmake/cortex_a65.cmake new file mode 100644 index 000000000..6011522cb --- /dev/null +++ b/cmake/cortex_a65.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) diff --git a/cmake/cortex_a65ae.cmake b/cmake/cortex_a65ae.cmake new file mode 100644 index 000000000..d0bf1d50b --- /dev/null +++ b/cmake/cortex_a65ae.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) diff --git a/cmake/cortex_a7.cmake b/cmake/cortex_a7.cmake new file mode 100644 index 000000000..2f0fb5c8d --- /dev/null +++ b/cmake/cortex_a7.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) diff --git a/cmake/cortex_a72.cmake b/cmake/cortex_a72.cmake new file mode 100644 index 000000000..3e07e47d5 --- /dev/null +++ b/cmake/cortex_a72.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) diff --git a/cmake/cortex_a73.cmake b/cmake/cortex_a73.cmake new file mode 100644 index 000000000..eb95c4f12 --- /dev/null +++ b/cmake/cortex_a73.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) diff --git a/cmake/cortex_a75.cmake b/cmake/cortex_a75.cmake new file mode 100644 index 000000000..851a6f909 --- /dev/null +++ b/cmake/cortex_a75.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) diff --git a/cmake/cortex_a76.cmake b/cmake/cortex_a76.cmake new file mode 100644 index 000000000..1d3766e9d --- /dev/null +++ b/cmake/cortex_a76.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) diff --git a/cmake/cortex_a76ae.cmake b/cmake/cortex_a76ae.cmake new file mode 100644 index 000000000..99e4de80c --- /dev/null +++ b/cmake/cortex_a76ae.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) diff --git a/cmake/cortex_a77.cmake b/cmake/cortex_a77.cmake new file mode 100644 index 000000000..2df67ddd0 --- /dev/null +++ b/cmake/cortex_a77.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) diff --git a/cmake/cortex_a78.cmake b/cmake/cortex_a78.cmake new file mode 100644 index 000000000..fdd8324b5 --- /dev/null +++ b/cmake/cortex_a78.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) diff --git a/cmake/cortex_a8.cmake b/cmake/cortex_a8.cmake new file mode 100644 index 000000000..92db6228e --- /dev/null +++ b/cmake/cortex_a8.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) diff --git a/cmake/cortex_m23.cmake b/cmake/cortex_m23.cmake new file mode 100644 index 000000000..a8ed71257 --- /dev/null +++ b/cmake/cortex_m23.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) diff --git a/cmake/cortex_m33.cmake b/cmake/cortex_m33.cmake new file mode 100644 index 000000000..c7dff48ae --- /dev/null +++ b/cmake/cortex_m33.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) diff --git a/cmake/cortex_m52.cmake b/cmake/cortex_m52.cmake new file mode 100644 index 000000000..21a7d4877 --- /dev/null +++ b/cmake/cortex_m52.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= 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() diff --git a/cmake/cortex_m55.cmake b/cmake/cortex_m55.cmake new file mode 100644 index 000000000..abdf3264c --- /dev/null +++ b/cmake/cortex_m55.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-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) diff --git a/cmake/cortex_m85.cmake b/cmake/cortex_m85.cmake new file mode 100644 index 000000000..e8eb7c290 --- /dev/null +++ b/cmake/cortex_m85.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) diff --git a/cmake/cortex_r4.cmake b/cmake/cortex_r4.cmake new file mode 100644 index 000000000..88b5ce9e6 --- /dev/null +++ b/cmake/cortex_r4.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) diff --git a/cmake/cortex_r5.cmake b/cmake/cortex_r5.cmake new file mode 100644 index 000000000..6050a4c9a --- /dev/null +++ b/cmake/cortex_r5.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) diff --git a/cmake/cortex_r52.cmake b/cmake/cortex_r52.cmake new file mode 100644 index 000000000..183782c9a --- /dev/null +++ b/cmake/cortex_r52.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= 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() diff --git a/cmake/cortex_r52_clang.cmake b/cmake/cortex_r52_clang.cmake new file mode 100644 index 000000000..f5669efa7 --- /dev/null +++ b/cmake/cortex_r52_clang.cmake @@ -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=. +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") diff --git a/cmake/linux.cmake b/cmake/linux.cmake index 192425c6b..55cd5e003 100644 --- a/cmake/linux.cmake +++ b/cmake/linux.cmake @@ -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) diff --git a/cmake/riscv32-unknown-elf.cmake b/cmake/riscv32-unknown-elf.cmake index d21e729ca..b428dc8e3 100644 --- a/cmake/riscv32-unknown-elf.cmake +++ b/cmake/riscv32-unknown-elf.cmake @@ -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") diff --git a/cmake/riscv32_gnu.cmake b/cmake/riscv32_gnu.cmake index 6843423c5..584cbf0ed 100644 --- a/cmake/riscv32_gnu.cmake +++ b/cmake/riscv32_gnu.cmake @@ -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() diff --git a/common/inc/tx_api.h b/common/inc/tx_api.h index 321e70a9b..ed1f82918 100644 --- a/common/inc/tx_api.h +++ b/common/inc/tx_api.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,6 +66,17 @@ extern "C" { #include "tx_port.h" +/* Define the qualifier applied to object name strings. Opting in makes every + object name a pointer to const, which the kernel and its tests are written + for. It is off by default because it changes the type of a public struct + field, and application code that copies a name into a writable pointer stops + compiling. */ +#ifdef TX_ENABLE_CONST_NAMES +#define TX_NAME_CONST const +#else +#define TX_NAME_CONST +#endif + #if (defined(TX_EXECUTION_PROFILE_ENABLE) && !defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY)) #include "tx_execution_profile.h" #endif @@ -77,9 +90,9 @@ extern "C" { #define AZURE_RTOS_THREADX #define THREADX_MAJOR_VERSION 6 #define THREADX_MINOR_VERSION 5 -#define THREADX_PATCH_VERSION 1 -#define THREADX_BUILD_VERSION 202602 -#define THREADX_HOTFIX_VERSION 'a' +#define THREADX_PATCH_VERSION 2 +#define THREADX_BUILD_VERSION 202603 +#define THREADX_HOTFIX_VERSION ' ' /* Define the following symbol for backward compatibility */ #define EL_PRODUCT_THREADX @@ -368,7 +381,7 @@ typedef struct TX_TIMER_STRUCT ULONG tx_timer_id; /* Define the timer's name. */ - CHAR *tx_timer_name; + TX_NAME_CONST CHAR *tx_timer_name; /* Define the actual contents of the timer. This is the block that is used in the actual timer expiration processing. */ @@ -434,7 +447,7 @@ typedef struct TX_THREAD_STRUCT is typically defined to whitespace or a pointer type in tx_port.h. */ TX_THREAD_EXTENSION_0 - CHAR *tx_thread_name; /* Pointer to thread's name */ + TX_NAME_CONST CHAR *tx_thread_name; /* Pointer to thread's name */ UINT tx_thread_priority; /* Priority of thread (0-1023) */ UINT tx_thread_state; /* Thread's execution state */ UINT tx_thread_delayed_suspend; /* Delayed suspend flag */ @@ -595,7 +608,7 @@ typedef struct TX_BLOCK_POOL_STRUCT ULONG tx_block_pool_id; /* Define the block pool's name. */ - CHAR *tx_block_pool_name; + TX_NAME_CONST CHAR *tx_block_pool_name; /* Define the number of available memory blocks in the pool. */ UINT tx_block_pool_available; @@ -673,7 +686,7 @@ typedef struct TX_BYTE_POOL_STRUCT ULONG tx_byte_pool_id; /* Define the byte pool's name. */ - CHAR *tx_byte_pool_name; + TX_NAME_CONST CHAR *tx_byte_pool_name; /* Define the number of available bytes in the pool. */ ULONG tx_byte_pool_available; @@ -752,7 +765,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT ULONG tx_event_flags_group_id; /* Define the event flags group's name. */ - CHAR *tx_event_flags_group_name; + TX_NAME_CONST CHAR *tx_event_flags_group_name; /* Define the actual current event flags in this group. A zero in a particular bit indicates the event flag is not set. */ @@ -838,7 +851,7 @@ typedef struct TX_MUTEX_STRUCT ULONG tx_mutex_id; /* Define the mutex's name. */ - CHAR *tx_mutex_name; + TX_NAME_CONST CHAR *tx_mutex_name; /* Define the mutex ownership count. */ UINT tx_mutex_ownership_count; @@ -911,7 +924,7 @@ typedef struct TX_QUEUE_STRUCT ULONG tx_queue_id; /* Define the queue's name. */ - CHAR *tx_queue_name; + TX_NAME_CONST CHAR *tx_queue_name; /* Define the message size that was specified in queue creation. */ UINT tx_queue_message_size; @@ -990,7 +1003,7 @@ typedef struct TX_SEMAPHORE_STRUCT ULONG tx_semaphore_id; /* Define the semaphore's name. */ - CHAR *tx_semaphore_name; + TX_NAME_CONST CHAR *tx_semaphore_name; /* Define the actual semaphore count. A zero means that no semaphore instance is available. */ @@ -1417,10 +1430,10 @@ VOID tx_application_define(VOID *first_unused_memory); /* Define block memory pool management function prototypes. */ UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -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); UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -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); UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1435,20 +1448,20 @@ UINT _tx_block_release(VOID *block_ptr); application. */ UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -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); UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -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); UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); UINT _txe_block_release(VOID *block_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -UINT _txr_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txr_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 _txr_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -UINT _txr_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _txr_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 _txr_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); @@ -1460,10 +1473,10 @@ UINT _txr_block_release(VOID *block_ptr); UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size); UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -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); UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1479,10 +1492,10 @@ UINT _tx_byte_release(VOID *memory_ptr); UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +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 _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -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); UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); @@ -1490,10 +1503,10 @@ UINT _txe_byte_release(VOID *memory_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _txr_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txr_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 _txr_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -UINT _txr_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _txr_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 _txr_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); @@ -1503,11 +1516,11 @@ UINT _txr_byte_release(VOID *memory_ptr); /* Define event flags management function prototypes. */ -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); UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -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); UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, @@ -1522,22 +1535,22 @@ UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*e /* Define error checking shells for API services. These are only referenced by the application. */ -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); UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -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); UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option); UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT _txr_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); UINT _txr_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txr_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -UINT _txr_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _txr_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); UINT _txr_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, @@ -1553,10 +1566,10 @@ VOID _tx_initialize_kernel_enter(VOID); /* Define mutex management function prototypes. */ -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); UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr); UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -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); UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, @@ -1570,19 +1583,19 @@ UINT _tx_mutex_put(TX_MUTEX *mutex_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -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); UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -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); UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr); UINT _txe_mutex_put(TX_MUTEX *mutex_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT _txr_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT _txr_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txr_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -UINT _txr_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _txr_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); UINT _txr_mutex_prioritize(TX_MUTEX *mutex_ptr); @@ -1592,11 +1605,11 @@ UINT _txr_mutex_put(TX_MUTEX *mutex_ptr); /* Define queue management function prototypes. */ -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); UINT _tx_queue_delete(TX_QUEUE *queue_ptr); UINT _tx_queue_flush(TX_QUEUE *queue_ptr); -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); UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts); @@ -1612,11 +1625,11 @@ UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wa /* Define error checking shells for API services. These are only referenced by the application. */ -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); UINT _txe_queue_delete(TX_QUEUE *queue_ptr); UINT _txe_queue_flush(TX_QUEUE *queue_ptr); -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); UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); @@ -1624,11 +1637,11 @@ UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_op UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr)); UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txr_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); UINT _txr_queue_delete(TX_QUEUE *queue_ptr); UINT _txr_queue_flush(TX_QUEUE *queue_ptr); -UINT _txr_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _txr_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); UINT _txr_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txr_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); @@ -1641,10 +1654,10 @@ UINT _txr_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG w /* Define semaphore management function prototypes. */ UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -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); UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -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); UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, @@ -1659,10 +1672,10 @@ UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semapho application. */ UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -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); UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -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); UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); @@ -1670,10 +1683,10 @@ UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr)); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -UINT _txr_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT _txr_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT _txr_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txr_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -UINT _txr_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _txr_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); UINT _txr_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); @@ -1686,7 +1699,7 @@ UINT _txr_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaph VOID _tx_thread_context_save(VOID); VOID _tx_thread_context_restore(VOID); -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, @@ -1694,7 +1707,7 @@ UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, UINT _tx_thread_delete(TX_THREAD *thread_ptr); UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); TX_THREAD *_tx_thread_identify(VOID); -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); UINT _tx_thread_interrupt_control(UINT new_posture); @@ -1723,14 +1736,14 @@ UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -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 entry_input), 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); UINT _txe_thread_delete(TX_THREAD *thread_ptr); UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); -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); UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, @@ -1745,14 +1758,14 @@ UINT _txe_thread_terminate(TX_THREAD *thread_ptr); UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice); UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txr_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), 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); UINT _txr_thread_delete(TX_THREAD *thread_ptr); UINT _txr_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); -UINT _txr_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _txr_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); UINT _txr_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, @@ -1772,12 +1785,12 @@ UINT _txr_thread_wait_abort(TX_THREAD *thread_ptr); UINT _tx_timer_activate(TX_TIMER *timer_ptr); UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -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 input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate); UINT _tx_timer_deactivate(TX_TIMER *timer_ptr); UINT _tx_timer_delete(TX_TIMER *timer_ptr); -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); UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts); @@ -1793,22 +1806,22 @@ VOID _tx_time_set(ULONG new_time); UINT _txe_timer_activate(TX_TIMER *timer_ptr); UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -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 input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txe_timer_deactivate(TX_TIMER *timer_ptr); UINT _txe_timer_delete(TX_TIMER *timer_ptr); -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); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_timer_activate(TX_TIMER *timer_ptr); UINT _txr_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -UINT _txr_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txr_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txr_timer_deactivate(TX_TIMER *timer_ptr); UINT _txr_timer_delete(TX_TIMER *timer_ptr); -UINT _txr_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _txr_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); #endif @@ -1843,6 +1856,19 @@ UINT _tx_trace_interrupt_control(UINT new_posture); #endif +/* Define the number of consecutive stack fill pattern words the thread stack analyze function must + observe, working towards the lowest address of the stack, before it accepts a probe location as + unused. A value of one restores the original behavior, where a single word that happens to still + hold the fill pattern - an unwritten hole inside an otherwise used region, such as the padding of + a partially initialized local array - can make the binary search stop early and under-report the + stack usage. Larger values make the result more accurate at the cost of a few additional reads + per binary search iteration. This can be re-defined in tx_port.h. */ + +#ifndef TX_THREAD_STACK_ANALYZE_FILL_WORDS +#define TX_THREAD_STACK_ANALYZE_FILL_WORDS ((ULONG) 8) +#endif + + /* Add a default macro that can be re-defined in tx_port.h to add processing to the initialize kernel enter function. By default, this is simply defined as whitespace. */ @@ -1911,7 +1937,8 @@ TX_THREAD *_tx_misra_ulong_to_thread_pointer_convert(ULONG value); VOID *_tx_misra_timer_indirect_to_void_pointer_convert(TX_TIMER_INTERNAL **pointer); CHAR *_tx_misra_const_char_to_char_pointer_convert(const char *pointer); TX_THREAD *_tx_misra_void_to_thread_pointer_convert(VOID *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); +const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *pointer, ULONG amount); VOID _tx_misra_event_flags_group_not_used(TX_EVENT_FLAGS_GROUP *group_ptr); VOID _tx_misra_event_flags_set_notify_not_used(VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); VOID _tx_misra_queue_not_used(TX_QUEUE *queue_ptr); @@ -1923,6 +1950,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #define TX_MEMSET(a,b,c) _tx_misra_memset((a), (UINT) (b), (UINT) (c)) #define TX_UCHAR_POINTER_ADD(a,b) _tx_misra_uchar_pointer_add((UCHAR *) (a), (ULONG) (b)) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) _tx_misra_const_uchar_pointer_add((const UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_SUB(a,b) _tx_misra_uchar_pointer_sub((UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_DIF(a,b) _tx_misra_uchar_pointer_dif((UCHAR *) (a), (UCHAR *) (b)) #define TX_ULONG_POINTER_ADD(a,b) _tx_misra_ulong_pointer_add((ULONG *) (a), (ULONG) (b)) @@ -1983,6 +2011,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_UCHAR_POINTER_ADD(a,b) (((UCHAR *) (a)) + ((UINT) (b))) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) (((const UCHAR *) (a)) + ((UINT) (b))) #define TX_UCHAR_POINTER_SUB(a,b) (((UCHAR *) (a)) - ((UINT) (b))) #define TX_UCHAR_POINTER_DIF(a,b) ((ULONG)(((UCHAR *) (a)) - ((UCHAR *) (b)))) #define TX_ULONG_POINTER_ADD(a,b) (((ULONG *) (a)) + ((UINT) (b))) @@ -2030,7 +2059,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT(a) ((CHAR *) ((VOID *) (a))) #define TX_VOID_TO_THREAD_POINTER_CONVERT(a) ((TX_THREAD *) ((VOID *) (a))) -#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) +#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((const UCHAR *) ((const VOID *) (a))) #ifndef TX_EVENT_FLAGS_GROUP_NOT_USED #define TX_EVENT_FLAGS_GROUP_NOT_USED(a) ((void)(a)) #endif @@ -2328,4 +2357,3 @@ void __ghs_rnerr(char *errMsg, int stackLevels, int stackTraceDisplay, void *hex #endif #endif - diff --git a/common/inc/tx_trace.h b/common/inc/tx_trace.h index d85d5cc35..8f2667cac 100644 --- a/common/inc/tx_trace.h +++ b/common/inc/tx_trace.h @@ -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)) diff --git a/common/inc/tx_user_sample.h b/common/inc/tx_user_sample.h index 0733c16c4..676ff38cd 100644 --- a/common/inc/tx_user_sample.h +++ b/common/inc/tx_user_sample.h @@ -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 - diff --git a/common/src/tx_block_pool_create.c b/common/src/tx_block_pool_create.c index 1d2c803cf..8781dc789 100644 --- a/common/src/tx_block_pool_create.c +++ b/common/src/tx_block_pool_create.c @@ -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) { diff --git a/common/src/tx_block_pool_info_get.c b/common/src/tx_block_pool_info_get.c index 5998f1db4..5e1e89fdd 100644 --- a/common/src/tx_block_pool_info_get.c +++ b/common/src/tx_block_pool_info_get.c @@ -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) { diff --git a/common/src/tx_byte_pool_create.c b/common/src/tx_byte_pool_create.c index 21abbe356..f5c8460dc 100644 --- a/common/src/tx_byte_pool_create.c +++ b/common/src/tx_byte_pool_create.c @@ -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 diff --git a/common/src/tx_byte_pool_info_get.c b/common/src/tx_byte_pool_info_get.c index bd0964407..e9e9efa48 100644 --- a/common/src/tx_byte_pool_info_get.c +++ b/common/src/tx_byte_pool_info_get.c @@ -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) { diff --git a/common/src/tx_event_flags_create.c b/common/src/tx_event_flags_create.c index 2a9c042d6..361fafa44 100644 --- a/common/src/tx_event_flags_create.c +++ b/common/src/tx_event_flags_create.c @@ -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 diff --git a/common/src/tx_event_flags_info_get.c b/common/src/tx_event_flags_info_get.c index 21e85c9a1..51ec345fa 100644 --- a/common/src/tx_event_flags_info_get.c +++ b/common/src/tx_event_flags_info_get.c @@ -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) { diff --git a/common/src/tx_misra.c b/common/src/tx_misra.c index 9abf12f02..7ac5dc68c 100644 --- a/common/src/tx_misra.c +++ b/common/src/tx_misra.c @@ -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); } diff --git a/common/src/tx_mutex_create.c b/common/src/tx_mutex_create.c index 436c01f50..a1f5eba85 100644 --- a/common/src/tx_mutex_create.c +++ b/common/src/tx_mutex_create.c @@ -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 diff --git a/common/src/tx_mutex_info_get.c b/common/src/tx_mutex_info_get.c index a24d1e30e..3be2606bb 100644 --- a/common/src/tx_mutex_info_get.c +++ b/common/src/tx_mutex_info_get.c @@ -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) { diff --git a/common/src/tx_queue_create.c b/common/src/tx_queue_create.c index 59ae154e4..afb5648d5 100644 --- a/common/src/tx_queue_create.c +++ b/common/src/tx_queue_create.c @@ -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) { diff --git a/common/src/tx_queue_info_get.c b/common/src/tx_queue_info_get.c index d0ecb2b65..e25da54ef 100644 --- a/common/src/tx_queue_info_get.c +++ b/common/src/tx_queue_info_get.c @@ -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) { diff --git a/common/src/tx_semaphore_create.c b/common/src/tx_semaphore_create.c index 849f5d3b5..14553ca8d 100644 --- a/common/src/tx_semaphore_create.c +++ b/common/src/tx_semaphore_create.c @@ -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 diff --git a/common/src/tx_semaphore_info_get.c b/common/src/tx_semaphore_info_get.c index 89fd94238..2ffad1f7e 100644 --- a/common/src/tx_semaphore_info_get.c +++ b/common/src/tx_semaphore_info_get.c @@ -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) { diff --git a/common/src/tx_thread_create.c b/common/src/tx_thread_create.c index 026b0ada5..cff4db406 100644 --- a/common/src/tx_thread_create.c +++ b/common/src/tx_thread_create.c @@ -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; diff --git a/common/src/tx_thread_delete.c b/common/src/tx_thread_delete.c index 510f6565e..5bbb12c36 100644 --- a/common/src/tx_thread_delete.c +++ b/common/src/tx_thread_delete.c @@ -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) { diff --git a/common/src/tx_thread_info_get.c b/common/src/tx_thread_info_get.c index 740a3b95d..cd0df6ec8 100644 --- a/common/src/tx_thread_info_get.c +++ b/common/src/tx_thread_info_get.c @@ -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) { diff --git a/common/src/tx_thread_reset.c b/common/src/tx_thread_reset.c index da56daf57..8e59f1e7e 100644 --- a/common/src/tx_thread_reset.c +++ b/common/src/tx_thread_reset.c @@ -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? */ diff --git a/common/src/tx_thread_shell_entry.c b/common/src/tx_thread_shell_entry.c index 45fe9d6da..2a16a00b6 100644 --- a/common/src/tx_thread_shell_entry.c +++ b/common/src/tx_thread_shell_entry.c @@ -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)); diff --git a/common/src/tx_thread_sleep.c b/common/src/tx_thread_sleep.c index fd986a0b6..9e3a0afdf 100644 --- a/common/src/tx_thread_sleep.c +++ b/common/src/tx_thread_sleep.c @@ -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); diff --git a/common/src/tx_thread_stack_analyze.c b/common/src/tx_thread_stack_analyze.c index 080d00522..ecd7ee13b 100644 --- a/common/src/tx_thread_stack_analyze.c +++ b/common/src/tx_thread_stack_analyze.c @@ -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. */ diff --git a/common/src/tx_thread_terminate.c b/common/src/tx_thread_terminate.c index 86e34baeb..c87efaa0d 100644 --- a/common/src/tx_thread_terminate.c +++ b/common/src/tx_thread_terminate.c @@ -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--; diff --git a/common/src/tx_timer_create.c b/common/src/tx_timer_create.c index 30dd4e11f..15eb866f7 100644 --- a/common/src/tx_timer_create.c +++ b/common/src/tx_timer_create.c @@ -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) { diff --git a/common/src/tx_timer_info_get.c b/common/src/tx_timer_info_get.c index 31c801f9b..0811b5929 100644 --- a/common/src/tx_timer_info_get.c +++ b/common/src/tx_timer_info_get.c @@ -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) { diff --git a/common/src/tx_trace_object_register.c b/common/src/tx_trace_object_register.c index 741896a5a..a0d0f4949 100644 --- a/common/src/tx_trace_object_register.c +++ b/common/src/tx_trace_object_register.c @@ -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; } diff --git a/common/src/txe_block_pool_create.c b/common/src/txe_block_pool_create.c index 08ef7e69d..b4c7e13fe 100644 --- a/common/src/txe_block_pool_create.c +++ b/common/src/txe_block_pool_create.c @@ -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) { diff --git a/common/src/txe_block_pool_info_get.c b/common/src/txe_block_pool_info_get.c index f91ca2060..4c6003d75 100644 --- a/common/src/txe_block_pool_info_get.c +++ b/common/src/txe_block_pool_info_get.c @@ -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) { diff --git a/common/src/txe_byte_pool_create.c b/common/src/txe_byte_pool_create.c index 99a896981..9ae72ee99 100644 --- a/common/src/txe_byte_pool_create.c +++ b/common/src/txe_byte_pool_create.c @@ -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 diff --git a/common/src/txe_byte_pool_info_get.c b/common/src/txe_byte_pool_info_get.c index 85e7a233a..a83c907bc 100644 --- a/common/src/txe_byte_pool_info_get.c +++ b/common/src/txe_byte_pool_info_get.c @@ -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) { diff --git a/common/src/txe_event_flags_create.c b/common/src/txe_event_flags_create.c index 4e3fed773..209847381 100644 --- a/common/src/txe_event_flags_create.c +++ b/common/src/txe_event_flags_create.c @@ -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 diff --git a/common/src/txe_event_flags_info_get.c b/common/src/txe_event_flags_info_get.c index e551d025c..d7bddca4e 100644 --- a/common/src/txe_event_flags_info_get.c +++ b/common/src/txe_event_flags_info_get.c @@ -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) { diff --git a/common/src/txe_mutex_create.c b/common/src/txe_mutex_create.c index 392f8b0ed..a04612949 100644 --- a/common/src/txe_mutex_create.c +++ b/common/src/txe_mutex_create.c @@ -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 diff --git a/common/src/txe_mutex_info_get.c b/common/src/txe_mutex_info_get.c index f4ef4168c..93b43f91a 100644 --- a/common/src/txe_mutex_info_get.c +++ b/common/src/txe_mutex_info_get.c @@ -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) { diff --git a/common/src/txe_queue_create.c b/common/src/txe_queue_create.c index 185289fef..79aef4a07 100644 --- a/common/src/txe_queue_create.c +++ b/common/src/txe_queue_create.c @@ -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) { diff --git a/common/src/txe_queue_info_get.c b/common/src/txe_queue_info_get.c index 78d983924..90fdd4108 100644 --- a/common/src/txe_queue_info_get.c +++ b/common/src/txe_queue_info_get.c @@ -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) { diff --git a/common/src/txe_semaphore_create.c b/common/src/txe_semaphore_create.c index a190b03c0..d538f5fe1 100644 --- a/common/src/txe_semaphore_create.c +++ b/common/src/txe_semaphore_create.c @@ -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 diff --git a/common/src/txe_semaphore_info_get.c b/common/src/txe_semaphore_info_get.c index 7695028e4..85747dc32 100644 --- a/common/src/txe_semaphore_info_get.c +++ b/common/src/txe_semaphore_info_get.c @@ -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) { diff --git a/common/src/txe_thread_create.c b/common/src/txe_thread_create.c index d319bc9e2..cc5033b29 100644 --- a/common/src/txe_thread_create.c +++ b/common/src/txe_thread_create.c @@ -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, diff --git a/common/src/txe_thread_info_get.c b/common/src/txe_thread_info_get.c index ad1db3f7f..19e248ebf 100644 --- a/common/src/txe_thread_info_get.c +++ b/common/src/txe_thread_info_get.c @@ -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) { diff --git a/common/src/txe_timer_change.c b/common/src/txe_timer_change.c index ef503ffa8..7f6d6a36b 100644 --- a/common/src/txe_timer_change.c +++ b/common/src/txe_timer_change.c @@ -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 { diff --git a/common/src/txe_timer_create.c b/common/src/txe_timer_create.c index 02cf7c1aa..8c481bde8 100644 --- a/common/src/txe_timer_create.c +++ b/common/src/txe_timer_create.c @@ -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) { diff --git a/common/src/txe_timer_info_get.c b/common/src/txe_timer_info_get.c index 16ac5f64a..be2e9a13c 100644 --- a/common/src/txe_timer_info_get.c +++ b/common/src/txe_timer_info_get.c @@ -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) { diff --git a/common_modules/inc/txm_module.h b/common_modules/inc/txm_module.h index 88f79d9ee..a823c2c05 100644 --- a/common_modules/inc/txm_module.h +++ b/common_modules/inc/txm_module.h @@ -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); diff --git a/common_modules/module_lib/src/txm_block_pool_create.c b/common_modules/module_lib/src/txm_block_pool_create.c index 90838e3b1..aa9a61806 100644 --- a/common_modules/module_lib/src/txm_block_pool_create.c +++ b/common_modules/module_lib/src/txm_block_pool_create.c @@ -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; diff --git a/common_modules/module_lib/src/txm_block_pool_info_get.c b/common_modules/module_lib/src/txm_block_pool_info_get.c index fa4ea6861..944281e34 100644 --- a/common_modules/module_lib/src/txm_block_pool_info_get.c +++ b/common_modules/module_lib/src/txm_block_pool_info_get.c @@ -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; diff --git a/common_modules/module_lib/src/txm_byte_pool_create.c b/common_modules/module_lib/src/txm_byte_pool_create.c index d7775e3f1..d0cc76c6a 100644 --- a/common_modules/module_lib/src/txm_byte_pool_create.c +++ b/common_modules/module_lib/src/txm_byte_pool_create.c @@ -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; diff --git a/common_modules/module_lib/src/txm_byte_pool_info_get.c b/common_modules/module_lib/src/txm_byte_pool_info_get.c index 1ad38f489..d6b4a3d6a 100644 --- a/common_modules/module_lib/src/txm_byte_pool_info_get.c +++ b/common_modules/module_lib/src/txm_byte_pool_info_get.c @@ -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; diff --git a/common_modules/module_lib/src/txm_event_flags_create.c b/common_modules/module_lib/src/txm_event_flags_create.c index 76f1fe314..b4e155c1d 100644 --- a/common_modules/module_lib/src/txm_event_flags_create.c +++ b/common_modules/module_lib/src/txm_event_flags_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -60,7 +62,7 @@ /* Module 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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_event_flags_info_get.c b/common_modules/module_lib/src/txm_event_flags_info_get.c index eedcce1f1..ebcee339d 100644 --- a/common_modules/module_lib/src/txm_event_flags_info_get.c +++ b/common_modules/module_lib/src/txm_event_flags_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) +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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_module_object_deallocate.c b/common_modules/module_lib/src/txm_module_object_deallocate.c index c0ffb097f..fa5ebe85c 100644 --- a/common_modules/module_lib/src/txm_module_object_deallocate.c +++ b/common_modules/module_lib/src/txm_module_object_deallocate.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -23,6 +25,31 @@ #define TXM_MODULE #include "txm_module.h" #ifndef TXM_MODULE_OBJECT_DEALLOCATE_CALL_NOT_USED + +/* DEPRECATION NOTICE + * txm_module_object_deallocate() is deprecated and must not be used in new + * code. It is retained only for backward-compatibility with existing modules. + * + * WHY: when a module calls tx_timer_delete(), tx_semaphore_delete(), or any + * other tx_*_delete() service, the Module Manager dispatch layer automatically + * releases the associated object pool memory after the kernel cleanup + * completes. No separate deallocation call is required or expected. + * + * WHAT TO DO: remove any call to txm_module_object_deallocate() from your + * module. The corresponding tx_*_delete() call already handles everything. + * + * BEHAVIOUR: calling txm_module_object_deallocate() on a live kernel object + * (one whose tx_*_delete() has not yet been called) returns TX_DELETE_ERROR + * and changes nothing. The Module Manager will not release the memory of a + * created object, because the kernel goes on using those bytes as a control + * block after the byte pool has handed them to somebody else. Storage that + * was allocated but never made into an object is still released, so cleaning + * up after a create that failed or was abandoned still works. + */ +#pragma message("txm_module_object_deallocate() is deprecated and must not be used. " \ + "Call tx_*_delete() instead; the Module Manager dispatch layer " \ + "releases pool memory automatically on success. Deallocating a " \ + "live kernel object returns TX_DELETE_ERROR.") /**************************************************************************/ /* */ /* FUNCTION RELEASE */ @@ -43,7 +70,8 @@ /* */ /* OUTPUT */ /* */ -/* status Completion status */ +/* status Completion status, TX_DELETE_ERROR*/ +/* if a live object is there */ /* */ /* CALLS */ /* */ diff --git a/common_modules/module_lib/src/txm_module_object_pointer_get.c b/common_modules/module_lib/src/txm_module_object_pointer_get.c index 6417457a5..fcd7ab1f8 100644 --- a/common_modules/module_lib/src/txm_module_object_pointer_get.c +++ b/common_modules/module_lib/src/txm_module_object_pointer_get.c @@ -23,6 +23,22 @@ #define TXM_MODULE #include "txm_module.h" #ifndef TXM_MODULE_OBJECT_POINTER_GET_CALL_NOT_USED + +/* DEPRECATION NOTICE + * txm_module_object_pointer_get() is deprecated. Do not use it in new code. + * + * WHY: this function passes UINT_MAX as the name-buffer length to the + * underlying search. If the name pointer points to a buffer shorter than + * the searched string, the comparison can read past the end of the buffer, + * which is undefined behaviour. + * + * WHAT TO DO: replace calls with txm_module_object_pointer_get_extended(), + * passing the actual length of the name buffer as the third argument. + */ +#pragma message("txm_module_object_pointer_get() is deprecated. " \ + "Use txm_module_object_pointer_get_extended() and pass " \ + "the actual name buffer length.") + /**************************************************************************/ /* */ /* FUNCTION RELEASE */ @@ -35,9 +51,10 @@ /* */ /* DESCRIPTION */ /* */ -/* This function is deprecated and calls the secure version of this */ -/* function (_txm_module_manager_object_pointer_get_extended) with the */ -/* maximum possible name length since none was passed. */ +/* DEPRECATED. Use _txm_module_object_pointer_get_extended() instead, */ +/* passing the actual name-buffer length. This wrapper passes */ +/* UINT_MAX as the length, which can cause the name-comparison loop */ +/* to read past the end of a short buffer (undefined behaviour). */ /* */ /* INPUT */ /* */ diff --git a/common_modules/module_lib/src/txm_mutex_create.c b/common_modules/module_lib/src/txm_mutex_create.c index f50fd52f2..5dc53dd9c 100644 --- a/common_modules/module_lib/src/txm_mutex_create.c +++ b/common_modules/module_lib/src/txm_mutex_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -61,7 +63,7 @@ /* Module 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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_mutex_info_get.c b/common_modules/module_lib/src/txm_mutex_info_get.c index 8e63c779b..534e110ef 100644 --- a/common_modules/module_lib/src/txm_mutex_info_get.c +++ b/common_modules/module_lib/src/txm_mutex_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) +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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_queue_create.c b/common_modules/module_lib/src/txm_queue_create.c index a18b9f85d..982c3587c 100644 --- a/common_modules/module_lib/src/txm_queue_create.c +++ b/common_modules/module_lib/src/txm_queue_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -62,7 +64,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_queue_info_get.c b/common_modules/module_lib/src/txm_queue_info_get.c index c66a3d7e0..8627a45aa 100644 --- a/common_modules/module_lib/src/txm_queue_info_get.c +++ b/common_modules/module_lib/src/txm_queue_info_get.c @@ -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_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue) +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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_semaphore_create.c b/common_modules/module_lib/src/txm_semaphore_create.c index 229b46cd8..fbce2d54e 100644 --- a/common_modules/module_lib/src/txm_semaphore_create.c +++ b/common_modules/module_lib/src/txm_semaphore_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -60,7 +62,7 @@ /* Module 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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_semaphore_info_get.c b/common_modules/module_lib/src/txm_semaphore_info_get.c index 2bdfa2c00..128afae7f 100644 --- a/common_modules/module_lib/src/txm_semaphore_info_get.c +++ b/common_modules/module_lib/src/txm_semaphore_info_get.c @@ -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_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) +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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_thread_create.c b/common_modules/module_lib/src/txm_thread_create.c index 8b1bc3677..f17a01859 100644 --- a/common_modules/module_lib/src/txm_thread_create.c +++ b/common_modules/module_lib/src/txm_thread_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), 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) +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), 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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_thread_info_get.c b/common_modules/module_lib/src/txm_thread_info_get.c index d956c0319..e50fc4462 100644 --- a/common_modules/module_lib/src/txm_thread_info_get.c +++ b/common_modules/module_lib/src/txm_thread_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -67,7 +69,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread) +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) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_timer_create.c b/common_modules/module_lib/src/txm_timer_create.c index d65989ebd..7adba9010 100644 --- a/common_modules/module_lib/src/txm_timer_create.c +++ b/common_modules/module_lib/src/txm_timer_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size) +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_timer_info_get.c b/common_modules/module_lib/src/txm_timer_info_get.c index f918ca67b..d431ed931 100644 --- a/common_modules/module_lib/src/txm_timer_info_get.c +++ b/common_modules/module_lib/src/txm_timer_info_get.c @@ -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_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) +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) { UINT return_value; diff --git a/common_modules/module_manager/inc/txm_module_manager_dispatch.h b/common_modules/module_manager/inc/txm_module_manager_dispatch.h index 03bd86ebf..e8c0629b5 100644 --- a/common_modules/module_manager/inc/txm_module_manager_dispatch.h +++ b/common_modules/module_manager/inc/txm_module_manager_dispatch.h @@ -1,6 +1,7 @@ /*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * Copyright (c) 2025 Eclipse ThreadX Contributors + * 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 @@ -8,6 +9,7 @@ * * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. /**************************************************************************/ @@ -33,7 +35,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BLOCK_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(VOID *))) @@ -52,7 +54,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BLOCK_POOL_CREATE_CALL_NOT_USED /* UINT _txe_block_pool_create( TX_BLOCK_POOL *pool_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 ULONG block_size, -> extra_parameters[0] VOID *pool_start, -> extra_parameters[1] ULONG pool_size, -> extra_parameters[2] @@ -71,7 +73,7 @@ ALIGN_TYPE return_value; if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1)) return(TXM_MODULE_INVALID_MEMORY); - if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2]))) + if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[4]))) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], extra_parameters[2])) @@ -80,7 +82,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_block_pool_create( (TX_BLOCK_POOL *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (ULONG) extra_parameters[0], (VOID *) extra_parameters[1], (ULONG) extra_parameters[2], @@ -101,7 +103,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BLOCK_POOL_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_BLOCK_POOL))) return(TXM_MODULE_INVALID_MEMORY); } @@ -121,7 +126,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BLOCK_POOL_INFO_GET_CALL_NOT_USED /* UINT _txe_block_pool_info_get( TX_BLOCK_POOL *pool_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *available_blocks, -> extra_parameters[0] ULONG *total_blocks, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -135,7 +140,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BLOCK_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -162,7 +167,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_block_pool_info_get( (TX_BLOCK_POOL *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (ULONG *) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -188,7 +193,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BLOCK_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -269,7 +274,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BLOCK_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BLOCK_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -335,7 +340,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BYTE_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(VOID *))) @@ -358,7 +363,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BYTE_POOL_CREATE_CALL_NOT_USED /* UINT _txe_byte_pool_create( TX_BYTE_POOL *pool_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 VOID *pool_start, -> extra_parameters[0] ULONG pool_size, -> extra_parameters[1] UINT pool_control_block_size -> extra_parameters[2] @@ -385,7 +390,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_byte_pool_create( (TX_BYTE_POOL *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (VOID *) extra_parameters[0], (ULONG) extra_parameters[1], (UINT) extra_parameters[2] @@ -405,7 +410,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BYTE_POOL_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_BYTE_POOL))) return(TXM_MODULE_INVALID_MEMORY); } @@ -425,7 +433,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BYTE_POOL_INFO_GET_CALL_NOT_USED /* UINT _txe_byte_pool_info_get( TX_BYTE_POOL *pool_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *available_bytes, -> extra_parameters[0] ULONG *fragments, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -439,7 +447,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BYTE_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -466,7 +474,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_byte_pool_info_get( (TX_BYTE_POOL *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (ULONG *) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -495,7 +503,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BYTE_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -603,7 +611,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_BYTE_POOL))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_BYTE_POOL_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -658,7 +666,7 @@ ALIGN_TYPE block_header_start; #ifndef TXM_EVENT_FLAGS_CREATE_CALL_NOT_USED /* UINT _txe_event_flags_create( TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 UINT event_control_block_size -> param_2 ); */ static ALIGN_TYPE _txm_module_manager_tx_event_flags_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2) @@ -677,7 +685,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_event_flags_create( (TX_EVENT_FLAGS_GROUP *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (UINT) param_2 ); return(return_value); @@ -695,7 +703,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_EVENT_FLAGS_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) return(TXM_MODULE_INVALID_MEMORY); } @@ -727,7 +738,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_EVENT_FLAGS_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(ULONG))) @@ -751,7 +762,7 @@ ALIGN_TYPE return_value; #ifndef TXM_EVENT_FLAGS_INFO_GET_CALL_NOT_USED /* UINT _txe_event_flags_info_get( TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *current_flags, -> extra_parameters[0] TX_THREAD **first_suspended, -> extra_parameters[1] ULONG *suspended_count, -> extra_parameters[2] @@ -764,7 +775,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_EVENT_FLAGS_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -788,7 +799,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_event_flags_info_get( (TX_EVENT_FLAGS_GROUP *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (TX_THREAD **) extra_parameters[1], (ULONG *) extra_parameters[2], @@ -813,7 +824,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_EVENT_FLAGS_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -896,7 +907,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_EVENT_FLAGS_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -923,7 +934,7 @@ VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *); if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_EVENT_FLAGS_GROUP))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_EVENT_FLAGS_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* Since we need to write to the object, ensure it's valid. */ @@ -958,7 +969,7 @@ VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *); #ifndef TXM_MUTEX_CREATE_CALL_NOT_USED /* UINT _txe_mutex_create( TX_MUTEX *mutex_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 UINT inherit, -> extra_parameters[0] UINT mutex_control_block_size -> extra_parameters[1] ); */ @@ -981,7 +992,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_mutex_create( (TX_MUTEX *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (UINT) extra_parameters[0], (UINT) extra_parameters[1] ); @@ -1000,7 +1011,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_MUTEX_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_MUTEX))) return(TXM_MODULE_INVALID_MEMORY); } @@ -1029,7 +1043,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_MUTEX_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1044,7 +1058,7 @@ ALIGN_TYPE return_value; #ifndef TXM_MUTEX_INFO_GET_CALL_NOT_USED /* UINT _txe_mutex_info_get( TX_MUTEX *mutex_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *count, -> extra_parameters[0] TX_THREAD **owner, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -1058,7 +1072,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_MUTEX_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -1085,7 +1099,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_mutex_info_get( (TX_MUTEX *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (TX_THREAD **) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -1113,7 +1127,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_MUTEX_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -1212,7 +1226,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_MUTEX_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1234,7 +1248,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_MUTEX))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_MUTEX_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1248,7 +1262,7 @@ ALIGN_TYPE return_value; #ifndef TXM_QUEUE_CREATE_CALL_NOT_USED /* UINT _txe_queue_create( TX_QUEUE *queue_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 UINT message_size, -> extra_parameters[0] VOID *queue_start, -> extra_parameters[1] ULONG queue_size, -> extra_parameters[2] @@ -1276,7 +1290,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_queue_create( (TX_QUEUE *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (UINT) extra_parameters[0], (VOID *) extra_parameters[1], (ULONG) extra_parameters[2], @@ -1297,7 +1311,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_QUEUE))) return(TXM_MODULE_INVALID_MEMORY); } @@ -1325,7 +1342,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1350,12 +1367,12 @@ TX_QUEUE *queue_ptr; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* We need to get the size of the message from the queue. */ queue_ptr = (TX_QUEUE *) param_0; - if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_READ(module_instance, param_1, queue_ptr -> tx_queue_message_size)) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_READ(module_instance, param_1, sizeof(ULONG)*queue_ptr -> tx_queue_message_size)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1371,7 +1388,7 @@ TX_QUEUE *queue_ptr; #ifndef TXM_QUEUE_INFO_GET_CALL_NOT_USED /* UINT _txe_queue_info_get( TX_QUEUE *queue_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *enqueued, -> extra_parameters[0] ULONG *available_storage, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -1385,7 +1402,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -1412,7 +1429,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_queue_info_get( (TX_QUEUE *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (ULONG *) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -1440,7 +1457,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -1539,7 +1556,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1564,7 +1581,7 @@ TX_QUEUE *queue_ptr; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* We need to get the max size of the buffer from the queue. */ @@ -1596,7 +1613,7 @@ TX_QUEUE *queue_ptr; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* We need to get the size of the message from the queue. */ @@ -1628,7 +1645,7 @@ VOID (*queue_send_notify)(TX_QUEUE *); if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_QUEUE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_QUEUE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* Since we need to write to the object, ensure it's valid. */ @@ -1672,7 +1689,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1687,7 +1704,7 @@ ALIGN_TYPE return_value; #ifndef TXM_SEMAPHORE_CREATE_CALL_NOT_USED /* UINT _txe_semaphore_create( TX_SEMAPHORE *semaphore_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 ULONG initial_count, -> extra_parameters[0] UINT semaphore_control_block_size -> extra_parameters[1] ); */ @@ -1710,7 +1727,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_semaphore_create( (TX_SEMAPHORE *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (ULONG) extra_parameters[0], (UINT) extra_parameters[1] ); @@ -1729,7 +1746,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_SEMAPHORE))) return(TXM_MODULE_INVALID_MEMORY); } @@ -1758,7 +1778,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1773,7 +1793,7 @@ ALIGN_TYPE return_value; #ifndef TXM_SEMAPHORE_INFO_GET_CALL_NOT_USED /* UINT _txe_semaphore_info_get( TX_SEMAPHORE *semaphore_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *current_value, -> extra_parameters[0] TX_THREAD **first_suspended, -> extra_parameters[1] ULONG *suspended_count, -> extra_parameters[2] @@ -1786,7 +1806,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -1810,7 +1830,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_semaphore_info_get( (TX_SEMAPHORE *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (TX_THREAD **) extra_parameters[1], (ULONG *) extra_parameters[2], @@ -1835,7 +1855,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -1916,7 +1936,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1938,7 +1958,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -1963,7 +1983,7 @@ VOID (*semaphore_put_notify)(TX_SEMAPHORE *); if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_SEMAPHORE))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_SEMAPHORE_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* Since we need to write to the object, ensure it's valid. */ @@ -1998,7 +2018,7 @@ VOID (*semaphore_put_notify)(TX_SEMAPHORE *); #ifndef TXM_THREAD_CREATE_CALL_NOT_USED /* UINT _txe_thread_create( TX_THREAD *thread_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 VOID (*entry_function)(ULONG entry_input), -> extra_parameters[0] ULONG entry_input, -> extra_parameters[1] VOID *stack_start, -> extra_parameters[2] @@ -2037,7 +2057,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txm_module_manager_thread_create( (TX_THREAD *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, module_instance -> txm_module_instance_shell_entry_function, (VOID (*)(ULONG entry_input)) extra_parameters[0], (ULONG) extra_parameters[1], @@ -2061,22 +2081,48 @@ ALIGN_TYPE return_value; static ALIGN_TYPE _txm_module_manager_tx_thread_delete_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0) { -ALIGN_TYPE return_value; +TX_THREAD *thread_ptr; +ALIGN_TYPE return_value; +ALIGN_TYPE stack_status; + + thread_ptr = (TX_THREAD *) param_0; + stack_status = (ALIGN_TYPE) TX_SUCCESS; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_THREAD))) return(TXM_MODULE_INVALID_MEMORY); } - return_value = (ALIGN_TYPE) _txe_thread_delete( - (TX_THREAD *) param_0 - ); + return_value = (ALIGN_TYPE) _txe_thread_delete(thread_ptr); - /* Deallocate object memory. */ + /* Deallocate the kernel stack for a user-mode thread. The pointer is tested + rather than the module's properties: both thread create paths clear the whole + control block before filling it in, so a thread that carries no kernel stack + the manager allocated holds TX_NULL here, and a user-mode module can be given + the address of such a thread. */ + if ((return_value == TX_SUCCESS) && + (module_instance -> txm_module_instance_property_flags & TXM_MODULE_USER_MODE) && + (thread_ptr -> tx_thread_module_kernel_stack_start != TX_NULL)) + { + stack_status = _txm_module_manager_object_deallocate(thread_ptr -> tx_thread_module_kernel_stack_start); + } + + /* Deallocate thread object memory. This must be attempted even when the kernel + stack could not be released, otherwise a successful thread delete would leave + the thread object allocated forever. */ if (return_value == TX_SUCCESS) { - return_value = _txm_module_manager_object_deallocate((VOID *) param_0); + return_value = _txm_module_manager_object_deallocate((VOID *) thread_ptr); + + /* Report the kernel stack failure if the thread object was released. */ + if ((return_value == TX_SUCCESS) && (stack_status != TX_SUCCESS)) + { + return_value = stack_status; + } } return(return_value); } @@ -2097,7 +2143,7 @@ VOID (*thread_entry_exit_notify)(TX_THREAD *, UINT); if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); /* Since we need to write to the object, ensure it's valid. */ @@ -2148,7 +2194,7 @@ ALIGN_TYPE return_value; #ifndef TXM_THREAD_INFO_GET_CALL_NOT_USED /* UINT _txe_thread_info_get( TX_THREAD *thread_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 UINT *state, -> extra_parameters[0] ULONG *run_count, -> extra_parameters[1] UINT *priority, -> extra_parameters[2] @@ -2164,7 +2210,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -2197,7 +2243,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_thread_info_get( (TX_THREAD *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (UINT *) extra_parameters[0], (ULONG *) extra_parameters[1], (UINT *) extra_parameters[2], @@ -2250,7 +2296,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -2397,7 +2443,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(UINT))) @@ -2431,7 +2477,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(UINT))) @@ -2468,7 +2514,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2490,7 +2536,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2547,7 +2593,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2576,7 +2622,7 @@ TX_THREAD *thread_ptr; { return(TXM_MODULE_INVALID_MEMORY); } - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2626,7 +2672,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2650,7 +2696,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(ULONG))) @@ -2677,7 +2723,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_THREAD_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2725,7 +2771,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_TIMER_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2749,7 +2795,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_TIMER_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2765,7 +2811,7 @@ ALIGN_TYPE return_value; #ifndef TXM_TIMER_CREATE_CALL_NOT_USED /* UINT _txe_timer_create( TX_TIMER *timer_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 VOID (*expiration_function)(ULONG), -> extra_parameters[0] ULONG expiration_input, -> extra_parameters[1] ULONG initial_ticks, -> extra_parameters[2] @@ -2808,7 +2854,7 @@ VOID (*expiration_function)(ULONG); return_value = (ALIGN_TYPE) _txe_timer_create( (TX_TIMER *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (VOID (*)(ULONG)) expiration_function, (ULONG) extra_parameters[1], (ULONG) extra_parameters[2], @@ -2846,7 +2892,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_TIMER_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); } @@ -2868,7 +2914,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_TIMER_OBJECT)) + return(TXM_MODULE_INVALID_MEMORY); + + if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, param_0, sizeof(TX_TIMER))) return(TXM_MODULE_INVALID_MEMORY); } @@ -2888,7 +2937,7 @@ ALIGN_TYPE return_value; #ifndef TXM_TIMER_INFO_GET_CALL_NOT_USED /* UINT _txe_timer_info_get( TX_TIMER *timer_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 UINT *active, -> extra_parameters[0] ULONG *remaining_ticks, -> extra_parameters[1] ULONG *reschedule_ticks, -> extra_parameters[2] @@ -2901,7 +2950,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_TIMER_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(CHAR *))) @@ -2925,7 +2974,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_timer_info_get( (TX_TIMER *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (UINT *) extra_parameters[0], (ULONG *) extra_parameters[1], (ULONG *) extra_parameters[2], @@ -2951,7 +3000,7 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_TIMER))) + if (!TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, param_0, TXM_TIMER_OBJECT)) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_1, sizeof(ULONG))) @@ -3232,41 +3281,6 @@ static ALIGN_TYPE _txm_module_manager_txm_module_object_deallocate_dispatch(TXM_ { ALIGN_TYPE return_value; -TXM_MODULE_ALLOCATED_OBJECT *object_ptr; -ALIGN_TYPE object_end; -ALIGN_TYPE object_pool_end; - - if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) - { - /* Is the object pool created? */ - if (_txm_module_manager_object_pool_created == TX_TRUE) - { - - /* Get the module allocated object. */ - object_ptr = ((TXM_MODULE_ALLOCATED_OBJECT *) param_0) - 1; - - /* Get the end address of the object pool. */ - object_pool_end = (ALIGN_TYPE) (_txm_module_manager_object_pool.tx_byte_pool_start + _txm_module_manager_object_pool.tx_byte_pool_size); - - /* Check that the pointer is in the object pool. */ - if ((ALIGN_TYPE) object_ptr < (ALIGN_TYPE) _txm_module_manager_object_pool.tx_byte_pool_start || - (ALIGN_TYPE) object_ptr >= (ALIGN_TYPE) object_pool_end) - { - /* Pointer is outside of the object pool. */ - return(TXM_MODULE_INVALID_MEMORY); - } - - /* Get the end addresses of the object. */ - object_end = ((ALIGN_TYPE) object_ptr) + sizeof(TXM_MODULE_ALLOCATED_OBJECT) + object_ptr -> txm_module_object_size; - - /* Check that the object is in the object pool. */ - if (object_end >= object_pool_end) - { - /* Object is outside of the object pool. */ - return(TXM_MODULE_INVALID_MEMORY); - } - } - } return_value = (ALIGN_TYPE) _txm_module_manager_object_deallocate( (VOID *) param_0 @@ -3288,11 +3302,10 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1)) - return(TXM_MODULE_INVALID_MEMORY); - - if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, param_2, sizeof(VOID *))) - return(TXM_MODULE_INVALID_MEMORY); + /* This service carries no name length, so the manager searches with the largest + length a UINT can hold and no readable range can be proven for the name. A + memory-protected module must use the extended service, which declares one. */ + return(TXM_MODULE_INVALID_MEMORY); } return_value = (ALIGN_TYPE) _txm_module_manager_object_pointer_get( @@ -3318,10 +3331,13 @@ ALIGN_TYPE return_value; if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION) { - if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, param_1)) + if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2]))) return(TXM_MODULE_INVALID_MEMORY); - if (!TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, (ALIGN_TYPE)extra_parameters, sizeof(ALIGN_TYPE[2]))) + /* The name length has to be checked before it is trusted, so the extra parameter + array is checked first. The comparison reads the declared length plus the + terminator that follows it, and all of that must be inside the module. */ + if (!TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING_RANGE(module_instance, param_1, (UINT) extra_parameters[0])) return(TXM_MODULE_INVALID_MEMORY); if (!TXM_MODULE_MANAGER_PARAM_CHECK_BUFFER_WRITE(module_instance, extra_parameters[1], sizeof(VOID *))) diff --git a/common_modules/module_manager/inc/txm_module_manager_util.h b/common_modules/module_manager/inc/txm_module_manager_util.h index 45c7f4098..3583edcc6 100644 --- a/common_modules/module_manager/inc/txm_module_manager_util.h +++ b/common_modules/module_manager/inc/txm_module_manager_util.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -43,8 +45,32 @@ /* Define check macros for modules. */ +/* A port supplies TXM_MODULE_MANAGER_CHECK_INSIDE_DATA to decide whether a caller-supplied + range lies inside the module's writable data or shared memory. Ports whose check can tell + a read-only region from a writable one also supply the two intent-specific variants below. + Ports that cannot make the distinction inherit their single check for both intents, so + their behaviour is unchanged. */ + +#ifndef TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_READ +#define TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_READ(module_instance, obj_ptr, obj_size) \ + TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, obj_ptr, obj_size) +#endif + +#ifndef TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_WRITE +#define TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_WRITE(module_instance, obj_ptr, obj_size) \ + TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, obj_ptr, obj_size) +#endif + +/* A range is outside the module's data only when no part of it is reachable by the module. + The read intent is used here because it describes the widest set of reachable addresses. + A port whose inside check cannot prove the whole range at once must supply its own + definition, because negating a partial-range check would report a partly reachable range + as being outside the module. */ + +#ifndef TXM_MODULE_MANAGER_CHECK_OUTSIDE_DATA #define TXM_MODULE_MANAGER_CHECK_OUTSIDE_DATA(module_instance, obj_ptr, obj_size) \ - (!(TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, obj_ptr, obj_size))) + (!(TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_READ(module_instance, obj_ptr, obj_size))) +#endif #define TXM_MODULE_MANAGER_CHECK_INSIDE_CODE(module_instance, obj_ptr, obj_size) \ (((obj_ptr) < ((obj_ptr) + (obj_size))) && \ @@ -63,12 +89,14 @@ /* Define macros for module. */ +/* The module reads from these ranges, so a read-only region is acceptable. */ #define TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE(module_instance, obj_ptr, obj_size) \ - (TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, obj_ptr, obj_size) || \ + (TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_READ(module_instance, obj_ptr, obj_size) || \ TXM_MODULE_MANAGER_CHECK_INSIDE_CODE(module_instance, obj_ptr, obj_size)) +/* The kernel writes to these ranges, so the module must be able to write them too. */ #define TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, obj_ptr, obj_size) \ - TXM_MODULE_MANAGER_CHECK_INSIDE_DATA(module_instance, obj_ptr, obj_size) + TXM_MODULE_MANAGER_CHECK_INSIDE_DATA_WRITE(module_instance, obj_ptr, obj_size) #define TXM_MODULE_MANAGER_ENSURE_OUTSIDE_MODULE(module_instance, obj_ptr, obj_size) \ (TXM_MODULE_MANAGER_CHECK_OUTSIDE_DATA(module_instance, obj_ptr, obj_size) && \ @@ -89,19 +117,59 @@ ((TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE_DATA(module_instance, buffer_ptr, buffer_size)) || \ ((void *) (buffer_ptr) == TX_NULL)) -/* Kernel objects should be outside the module at the very least. */ +/* Kernel objects a module names must be authenticated before a privileged service is + allowed to dereference them. Being outside the module is necessary but nowhere near + sufficient: the manager's object pool is outside every module, so an address shifted + into the interior of one of the module's own privileged allocations satisfies that + test while denoting no object at all. Authentication answers the question the + location test cannot -- is this the exact address of a live kernel object of the type + this service expects -- and it answers it from manager and kernel bookkeeping rather + than from fields of the purported object, which a module can influence. + + TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE is the complete check and is what + the dispatch table uses. It is given the object type rather than a control block size + so that it can also establish the type, which a size cannot: distinct object types of + equal size exist. + + TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE is retained for dispatchers outside this + repository that pass a size. It authenticates addresses in the manager's object pool, + which is what the shifted-pointer attack needs, but without a type it can neither + establish the type nor authenticate an application-owned object, so in-repository code + should use the typed form. */ #define TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, obj_ptr, obj_size) \ (_txm_module_manager_param_check_object_for_use(module_instance, obj_ptr, obj_size)) +#define TXM_MODULE_MANAGER_PARAM_CHECK_TYPED_OBJECT_FOR_USE(module_instance, obj_ptr, obj_type) \ + (_txm_module_manager_param_check_typed_object_for_use(module_instance, obj_ptr, obj_type)) + /* When creating an object, the object must be inside the object pool. */ #define TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, obj_ptr, obj_size) \ (_txm_module_manager_param_check_object_for_creation(module_instance, obj_ptr, obj_size)) +/* When deleting an object, being allowed to use it is not enough. Deletion is the + inverse of creation, so it asks what creation asks: that the object is one this + module allocated from the manager's object pool, at the exact address the manager + gave it, for an object of this size. A module may hold a pointer to an object it + does not own -- the manager's object lookup service hands application-owned + objects to modules by name, and sharing an object is what that service is for -- + and this is what separates using such an object from destroying it. */ +#define TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_DELETION(module_instance, obj_ptr, obj_size) \ + (_txm_module_manager_allocated_object_check(module_instance, obj_ptr, obj_size)) + /* Strings we dereference can be in RW/RO/Shared areas. */ #define TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, string_ptr) \ ((TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE(module_instance, string_ptr, 1)) || \ ((void *) (string_ptr) == TX_NULL)) +/* Strings we walk are checked over the whole range the walk may reach: the declared + length plus the terminating character that follows it, since a length excludes the + terminator and the comparison reads it. A length whose range cannot be expressed + is refused rather than truncated. */ +#define TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING_RANGE(module_instance, string_ptr, string_length) \ + (((((ALIGN_TYPE) (string_length)) < (~((ALIGN_TYPE) 0))) && \ + (TXM_MODULE_MANAGER_ENSURE_INSIDE_MODULE(module_instance, string_ptr, ((ALIGN_TYPE) (string_length)) + ((ALIGN_TYPE) 1)))) || \ + ((void *) (string_ptr) == TX_NULL)) + #define TXM_MODULE_MANAGER_UTIL_MAX_VALUE_OF_TYPE_UNSIGNED(type) ((1ULL << (sizeof(type) * 8)) - 1) #define TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(augend, addend, result) \ @@ -118,10 +186,18 @@ UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); UINT _txm_module_manager_object_size_check(ALIGN_TYPE object_ptr, ULONG object_size); -UINT _txm_module_manager_object_name_compare(CHAR *object_name1, UINT object_name1_length, CHAR *object_name2); +UINT _txm_module_manager_object_name_compare(CHAR *object_name1, UINT object_name1_length, TX_NAME_CONST CHAR *object_name2); UCHAR _txm_module_manager_created_object_check(TXM_MODULE_INSTANCE *module_instance, void *object_ptr); UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); +UINT _txm_module_manager_param_check_typed_object_for_use(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, UINT object_type); +UINT _txm_module_manager_allocated_object_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); +TXM_MODULE_ALLOCATED_OBJECT + *_txm_module_manager_allocated_object_find(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG *object_size_ptr); +UINT _txm_module_manager_object_type_size_get(UINT object_type, ULONG *object_size); +UINT _txm_module_manager_created_object_type_check(ALIGN_TYPE object_ptr, UINT object_type); +UINT _txm_module_manager_object_id_check(ALIGN_TYPE object_ptr, UINT object_type); +UINT _txm_module_manager_live_object_check(ALIGN_TYPE object_ptr); UINT _txm_module_manager_util_code_allocation_size_and_alignment_get(TXM_MODULE_PREAMBLE *module_preamble, ULONG *code_alignment_dest, ULONG *code_allocation_size_dest); #endif diff --git a/common_modules/module_manager/src/txm_module_manager_absolute_load.c b/common_modules/module_manager/src/txm_module_manager_absolute_load.c index dee6efd22..3fc060001 100644 --- a/common_modules/module_manager/src/txm_module_manager_absolute_load.c +++ b/common_modules/module_manager/src/txm_module_manager_absolute_load.c @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2024 Microsoft Corporation - * Copyright (c) 2026-present Eclipse ThreadX contributors + * 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 @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -23,29 +25,57 @@ #define TX_SOURCE_CODE #include "tx_api.h" -#include "tx_initialize.h" -#include "tx_mutex.h" -#include "tx_thread.h" -#include "tx_byte_pool.h" #include "txm_module.h" -#include "txm_module_manager_util.h" +#ifndef TXM_MODULE_MANAGER_ABSOLUTE_LOAD_CALL_NOT_USED + +/* DEPRECATION NOTICE + * txm_module_manager_absolute_load() is deprecated. Do not use it in new code. + * + * WHY: an absolutely located module has its code and its data placed at two + * independent fixed addresses by the module's linker script. This service + * receives only the code address, and the module preamble carries the code and + * data sizes but not the data address. The module manager therefore has no way + * to determine where the module's data area is, and cannot describe it in the + * module instance. The affected fields are left empty by this wrapper. + * + * WHAT TO DO: replace calls with txm_module_manager_absolute_load_extended(), + * passing the module's data area address as the fourth argument. That address + * is the RAM segment start defined in the module's linker script. + * + * RISK: with the data area unknown, the module manager cannot tell whether an + * object, a thread control block, or the trace buffer resides in the module's + * data area, and a memory protection unit cannot be programmed to cover it. + * Modules that request memory protection are therefore rejected with + * TXM_MODULE_INVALID_PROPERTIES. + * + * Define TXM_MODULE_MANAGER_ABSOLUTE_LOAD_CALL_NOT_USED to remove this service + * and this message from the build. + */ +#pragma message("txm_module_manager_absolute_load() is deprecated. " \ + "Use txm_module_manager_absolute_load_extended() and pass " \ + "the module's data area address.") /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _txm_module_manager_absolute_load PORTABLE C */ -/* 6.1.3 */ +/* 6.5.2 */ /* AUTHOR */ /* */ /* Andres Mlinar, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ -/* This function ensures the code-related and data-related parts of */ -/* the module preamble are valid and prepares the module for */ -/* execution. */ +/* DEPRECATED. Use _txm_module_manager_absolute_load_extended() */ +/* instead, passing the module's data area address. This wrapper */ +/* passes TX_NULL, which leaves the module instance's data area */ +/* description empty because the module manager cannot derive the */ +/* data area address of an absolutely located module. Modules that */ +/* request memory protection are rejected with */ +/* TXM_MODULE_INVALID_PROPERTIES, because the memory protection */ +/* hardware cannot be programmed to cover an unknown data area. */ /* */ /* INPUT */ /* */ @@ -59,9 +89,8 @@ /* */ /* CALLS */ /* */ -/* _tx_byte_allocate Allocate data area */ -/* _tx_mutex_get Get protection mutex */ -/* _tx_mutex_put Release protection mutex */ +/* _txm_module_manager_absolute_load_extended */ +/* Load the module */ /* */ /* CALLED BY */ /* */ @@ -71,363 +100,13 @@ UINT _txm_module_manager_absolute_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location) { -TX_INTERRUPT_SAVE_AREA - -TXM_MODULE_PREAMBLE *module_preamble; -ULONG code_size; -ULONG code_alignment; -ULONG code_allocation_size_ignored; -UINT status; - -TXM_MODULE_INSTANCE *next_module, *previous_module; -ULONG start_stop_stack_size; -ULONG callback_stack_size; -ULONG code_size_ignored; -ULONG code_alignment_ignored; -ALIGN_TYPE data_start; -ULONG data_size; -ULONG data_alignment; -ULONG data_allocation_size; -ULONG module_properties; -CHAR *memory_ptr; - - - /* Check for interrupt call. */ - if (TX_THREAD_GET_SYSTEM_STATE() != 0) - { - - /* Now, make sure the call is from an interrupt and not initialization. */ - if (TX_THREAD_GET_SYSTEM_STATE() < TX_INITIALIZE_IN_PROGRESS) - { - - /* Invalid caller of this function, return appropriate error code. */ - return(TX_CALLER_ERROR); - } - } - - /* Determine if the module manager has not been initialized yet. */ - if (_txm_module_manager_ready != TX_TRUE) - { - - /* Module manager has not been initialized. */ - return(TX_NOT_AVAILABLE); - } - - /* Determine if the module is valid. */ - if (module_instance == TX_NULL) - { - - /* Invalid module pointer. */ - return(TX_PTR_ERROR); - } - - /* Get module manager protection mutex. */ - _tx_mutex_get(&_txm_module_manager_mutex, TX_WAIT_FOREVER); - - /* Determine if the module is already valid. */ - if (module_instance -> txm_module_instance_id == TXM_MODULE_ID) - { - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* Module already loaded. */ - return(TXM_MODULE_ALREADY_LOADED); - } - - /* Pickup the module's information. */ - module_preamble = (TXM_MODULE_PREAMBLE *) module_location; - - /* Check to make sure there is a valid module to load. */ - if (module_preamble -> txm_module_preamble_id != TXM_MODULE_ID) - { - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* Invalid module preamble. */ - return(TXM_MODULE_INVALID); - } - - /* Check the properties of this module. */ - module_properties = module_preamble -> txm_module_preamble_property_flags & TXM_MODULE_OPTIONS_MASK; - if (/* Ensure the requested properties are supported. */ - ((module_properties & _txm_module_manager_properties_supported) != module_properties) || - /* Ensure the required properties are there. */ - ((_txm_module_manager_properties_required & module_properties) != _txm_module_manager_properties_required) || - /* If memory protection is enabled, then so must user mode. */ - ((module_properties & TXM_MODULE_MEMORY_PROTECTION) && !(module_properties & TXM_MODULE_USER_MODE)) - ) - { - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* Invalid properties. Return error. */ - return(TXM_MODULE_INVALID_PROPERTIES); - } - - /* Check for valid module entry offsets. */ - if ((module_preamble -> txm_module_preamble_shell_entry_function == 0) || - (module_preamble -> txm_module_preamble_start_function == 0)) - { - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* Invalid module preamble. */ - return(TXM_MODULE_INVALID); - } - - /* Check for valid sizes. */ - if ((module_preamble -> txm_module_preamble_code_size == 0) || - /* (module_preamble -> txm_module_preamble_data_size == 0) || *** a zero data size is valid */ - (module_preamble -> txm_module_preamble_start_stop_stack_size == 0) || - (module_preamble -> txm_module_preamble_callback_stack_size == 0)) - { - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* Invalid module preamble. */ - return(TXM_MODULE_INVALID); - } - - /* Get the amount of the bytes we need to allocate for the module's code - as well as the required alignment. Note that because this is an absolute - load, we only want the code alignment so we can check it. */ - status = _txm_module_manager_util_code_allocation_size_and_alignment_get(module_preamble, &code_alignment, &code_allocation_size_ignored); - if (status != TX_SUCCESS) - { - - /* Math overflow error occurred. */ - return(status); - } - - /* Since this is an absolute load, check the alignment of the module's instruction area (code). */ - TXM_MODULE_MANAGER_CHECK_CODE_ALIGNMENT(module_location, code_alignment) - - /* Initialize module control block to all zeros. */ - TX_MEMSET(module_instance, 0, sizeof(TXM_MODULE_INSTANCE)); - - /* Pickup the basic module sizes. */ - code_size = module_preamble -> txm_module_preamble_code_size; - data_size = module_preamble -> txm_module_preamble_data_size; - start_stop_stack_size = module_preamble -> txm_module_preamble_start_stop_stack_size; - callback_stack_size = module_preamble -> txm_module_preamble_callback_stack_size; - - TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_size, TXM_MODULE_DATA_ALIGNMENT, data_size); - data_size = ((data_size - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT; - - /* Adjust the size of the module elements to be aligned to the default alignment. We do this - so that when we partition the allocated memory, we can simply place these regions right beside - each other without having to align their pointers. Note this only works when they all have - the same alignment. */ - - TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(start_stop_stack_size, TXM_MODULE_DATA_ALIGNMENT, start_stop_stack_size); - start_stop_stack_size = ((start_stop_stack_size - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT; - - TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(callback_stack_size, TXM_MODULE_DATA_ALIGNMENT, callback_stack_size); - callback_stack_size = ((callback_stack_size - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT; - - /* Update the data size to account for the default thread stacks. */ - data_allocation_size = 0; - TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_allocation_size, start_stop_stack_size, data_allocation_size); - TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_allocation_size, callback_stack_size, data_allocation_size); - - /* Setup the default code and data alignments. */ - data_alignment = (ULONG) TXM_MODULE_DATA_ALIGNMENT; - - /* Get the port-specific alignment for the data size. Note we only want data - so we pass values of 1 for code (to avoid any possible div by 0 errors). */ - code_size_ignored = 1; - code_alignment_ignored = 1; - TXM_MODULE_MANAGER_ALIGNMENT_ADJUST(module_preamble, code_size_ignored, code_alignment_ignored, data_allocation_size, data_alignment) - - /* Calculate the module's total RAM memory requirement. This entire area is allocated from the module - manager's byte pool. The general layout is defined as follows: - - Lowest Address: Start of start/stop thread stack - ... [note: thread entry info is embedded near end of stack areas] - End of start/stop thread stack +UINT status; - Start of callback thread stack - ... [note: thread entry info is embedded near end of stack areas] - End of callback thread stack - Highest Address: */ + /* Call the extended service with an unknown data area location. */ + status = _txm_module_manager_absolute_load_extended(module_instance, module_name, module_location, TX_NULL); - /* Add an extra alignment increment so we can align the pointer after allocation. */ - TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_allocation_size, data_alignment, data_allocation_size); - - /* Allocate memory for the module. */ - status = _tx_byte_allocate(&_txm_module_manager_byte_pool, (VOID **) &memory_ptr, data_allocation_size, TX_NO_WAIT); - - /* Determine if the module memory allocation was successful. */ - if (status) - { - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* No memory, return an error. */ - return(TX_NO_MEMORY); - } - - /* Clear the allocated memory. */ - TX_MEMSET(memory_ptr, ((UCHAR) 0), data_allocation_size); - - /* Disable interrupts. */ - TX_DISABLE - - /* Setup the module instance structure. */ - module_instance -> txm_module_instance_id = TXM_MODULE_ID; - - /* Save the module name. */ - module_instance -> txm_module_instance_name = module_name; - - /* Save the module properties. */ - module_instance -> txm_module_instance_property_flags = module_preamble -> txm_module_preamble_property_flags; - - /* Set the module data memory allocation. This is the address released - when the module is unloaded. */ - module_instance -> txm_module_instance_data_allocation_ptr = (VOID *) memory_ptr; - - /* Save the data allocation size. */ - module_instance -> txm_module_instance_data_allocation_size = data_allocation_size; - - /* Calculate the actual start of the data area. This needs to be adjusted based on the alignment. */ - data_start = (ALIGN_TYPE) memory_ptr; - data_start = (data_start + (((ALIGN_TYPE)data_alignment) - 1)) & ~(((ALIGN_TYPE)data_alignment) - 1); - memory_ptr = (CHAR *) data_start; - - /* Compute the beginning and end of the data area. */ -#ifdef ALIGN_TYPE_DEFINED - module_instance -> txm_module_instance_data_start = (VOID *) (((CHAR *) (ALIGN_TYPE) module_preamble->txm_module_preamble_code_size) + sizeof(TXM_MODULE_PREAMBLE)); - module_instance -> txm_module_instance_data_end = (VOID *) (((CHAR *) (ALIGN_TYPE) module_instance -> txm_module_instance_data_start) + module_preamble->txm_module_preamble_data_size); -#else - module_instance -> txm_module_instance_data_start = (VOID *) (((CHAR *) module_preamble->txm_module_preamble_code_size) + sizeof(TXM_MODULE_PREAMBLE)); - module_instance -> txm_module_instance_data_end = (VOID *) (((CHAR *) module_instance -> txm_module_instance_data_start) + module_preamble->txm_module_preamble_data_size); -#endif - - /* Save the size of the data area. */ - module_instance -> txm_module_instance_data_size = data_size; - - /* Set the module code memory allocation. This is the address released - when the module is unloaded. */ - module_instance -> txm_module_instance_code_allocation_ptr = (VOID *) NULL; - - /* Save the code allocation size. */ - module_instance -> txm_module_instance_code_allocation_size = 0; - - /* Setup the code pointers. Since the code was loaded in-place, this is effectively just the values supplied in the API call. */ - module_instance -> txm_module_instance_code_start = (VOID *) module_location; - module_instance -> txm_module_instance_code_end = (VOID *) (((CHAR *) module_location) + (code_size - 1)); - - /* Setup the code size. */ - module_instance -> txm_module_instance_code_size = code_size; - - /* Save the module's total memory usage. */ - module_instance -> txm_module_instance_total_ram_usage = 0 /* Code is executed in place */ + data_allocation_size /* just the size of stacks */; - - /* Set the module state to started. */ - module_instance -> txm_module_instance_state = TXM_MODULE_LOADED; - - /* Save the preamble pointer. */ - module_instance -> txm_module_instance_preamble_ptr = module_preamble; - - /* Save the module application ID in the module instance. */ - module_instance -> txm_module_instance_application_module_id = module_preamble -> txm_module_preamble_application_module_id; - - /* Setup the module's start/stop thread stack area. */ - module_instance -> txm_module_instance_start_stop_stack_start_address = (VOID *) (memory_ptr); - module_instance -> txm_module_instance_start_stop_stack_size = start_stop_stack_size; - module_instance -> txm_module_instance_start_stop_stack_end_address = (VOID *) (memory_ptr + (start_stop_stack_size - 1)); - - /* Move the memory pointer forward. */ - memory_ptr = memory_ptr + start_stop_stack_size; - - /* Save the start/stop thread priority. */ - module_instance -> txm_module_instance_start_stop_priority = module_preamble -> txm_module_preamble_start_stop_priority; - - /* Setup the module's callback thread stack area. */ - module_instance -> txm_module_instance_callback_stack_start_address = (VOID *) (memory_ptr); - module_instance -> txm_module_instance_callback_stack_size = callback_stack_size; - module_instance -> txm_module_instance_callback_stack_end_address = (VOID *) (memory_ptr + (callback_stack_size - 1)); - - /* Move the memory pointer forward. */ - memory_ptr = memory_ptr + callback_stack_size; - - /* Save the callback thread priority. */ - module_instance -> txm_module_instance_callback_priority = module_preamble -> txm_module_preamble_callback_priority; - - /* Setup the start of the module data section. */ - module_instance -> txm_module_instance_module_data_base_address = (VOID *) (memory_ptr); - - /* Build actual addresses based on load... Setup all the function pointers. Any adjustments needed to shell entry, start function, and callback function are defined in the - module preamble. */ -#ifdef ALIGN_TYPE_DEFINED - module_instance -> txm_module_instance_shell_entry_function = (VOID (*)(TX_THREAD *, TXM_MODULE_INSTANCE *)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_shell_entry_function); - module_instance -> txm_module_instance_start_thread_entry = (VOID (*)(ULONG)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_start_function); - module_instance -> txm_module_instance_callback_request_thread_entry = (VOID (*)(ULONG)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_callback_function); -#else - module_instance -> txm_module_instance_shell_entry_function = (VOID (*)(TX_THREAD *, TXM_MODULE_INSTANCE *)) ((VOID *) module_preamble -> txm_module_preamble_shell_entry_function); - module_instance -> txm_module_instance_start_thread_entry = (VOID (*)(ULONG)) ((VOID *) module_preamble -> txm_module_preamble_start_function); - module_instance -> txm_module_instance_callback_request_thread_entry = (VOID (*)(ULONG)) ((VOID *) module_preamble -> txm_module_preamble_callback_function); -#endif - - /* Determine if there is a stop function for this module. */ - if (module_preamble -> txm_module_preamble_stop_function) - { - - /* Yes, there is a stop function, build the address. */ -#ifdef ALIGN_TYPE_DEFINED - module_instance -> txm_module_instance_stop_thread_entry = (VOID (*)(ULONG)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_stop_function); -#else - module_instance -> txm_module_instance_stop_thread_entry = (VOID (*)(ULONG)) ((VOID *) module_preamble -> txm_module_preamble_stop_function); -#endif - } - else - { - - /* No, there is no stop function. Just set the pointer to NULL. */ - module_instance -> txm_module_instance_stop_thread_entry = TX_NULL; - } - - /* Load the module control block with port-specific information. */ - TXM_MODULE_MANAGER_MODULE_SETUP(module_instance); - - /* Now add the module to the linked list of created modules. */ - if (_txm_module_manger_loaded_count++ == 0) - { - - /* The loaded module list is empty. Add module to empty list. */ - _txm_module_manager_loaded_list_ptr = module_instance; - module_instance -> txm_module_instance_loaded_next = module_instance; - module_instance -> txm_module_instance_loaded_previous = module_instance; - } - else - { - - /* This list is not NULL, add to the end of the list. */ - next_module = _txm_module_manager_loaded_list_ptr; - previous_module = next_module -> txm_module_instance_loaded_previous; - - /* Place the new module in the list. */ - next_module -> txm_module_instance_loaded_previous = module_instance; - previous_module -> txm_module_instance_loaded_next = module_instance; - - /* Setup this module's created links. */ - module_instance -> txm_module_instance_loaded_previous = previous_module; - module_instance -> txm_module_instance_loaded_next = next_module; - } - - /* Restore interrupts. */ - TX_RESTORE - - /* Release the protection mutex. */ - _tx_mutex_put(&_txm_module_manager_mutex); - - /* Return success. */ - return(TX_SUCCESS); + /* Return completion status. */ + return(status); } +#endif diff --git a/common_modules/module_manager/src/txm_module_manager_absolute_load_extended.c b/common_modules/module_manager/src/txm_module_manager_absolute_load_extended.c new file mode 100644 index 000000000..874cd1d65 --- /dev/null +++ b/common_modules/module_manager/src/txm_module_manager_absolute_load_extended.c @@ -0,0 +1,486 @@ +/*************************************************************************** + * Copyright (c) 2024 Microsoft Corporation + * Copyright (c) 2026-present Eclipse ThreadX contributors + * + * This program and the accompanying materials are made available under the + * terms of the MIT License which is available at + * https://opensource.org/licenses/MIT. + * + * SPDX-License-Identifier: MIT + **************************************************************************/ + +// Portions of this file were generated with AI assistance. + + +/**************************************************************************/ +/**************************************************************************/ +/** */ +/** ThreadX Component */ +/** */ +/** Module Manager */ +/** */ +/**************************************************************************/ +/**************************************************************************/ + +#define TX_SOURCE_CODE + +#include "tx_api.h" +#include "tx_initialize.h" +#include "tx_mutex.h" +#include "tx_thread.h" +#include "tx_byte_pool.h" +#include "txm_module.h" +#include "txm_module_manager_util.h" + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_absolute_load_extended PORTABLE C */ +/* 6.5.2 */ +/* AUTHOR */ +/* */ +/* Andres Mlinar, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function ensures the code-related and data-related parts of */ +/* the module preamble are valid and prepares the module for */ +/* execution. */ +/* */ +/* An absolutely located module has its code and its data placed at */ +/* fixed addresses by the module's linker script. The module preamble */ +/* carries only the code and data sizes, so the module manager cannot */ +/* derive the module's data location on its own. This service accepts */ +/* that address from the caller, which allows the module instance's */ +/* data area to be described correctly. */ +/* */ +/* INPUT */ +/* */ +/* module_instance Module instance pointer */ +/* module_name Module name pointer */ +/* module_location Module code location */ +/* module_data_location Module data location, or TX_NULL */ +/* when the data location is not */ +/* known to the caller. Memory */ +/* protection cannot be used when */ +/* it is TX_NULL. */ +/* */ +/* OUTPUT */ +/* */ +/* status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _tx_byte_allocate Allocate data area */ +/* _tx_mutex_get Get protection mutex */ +/* _tx_mutex_put Release protection mutex */ +/* */ +/* CALLED BY */ +/* */ +/* Application code */ +/* _txm_module_manager_absolute_load Deprecated wrapper */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_absolute_load_extended(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location, VOID *module_data_location) +{ + +TX_INTERRUPT_SAVE_AREA + +TXM_MODULE_PREAMBLE *module_preamble; +ULONG code_size; +ULONG code_alignment; +ULONG code_allocation_size_ignored; +UINT status; + +TXM_MODULE_INSTANCE *next_module, *previous_module; +ULONG start_stop_stack_size; +ULONG callback_stack_size; +ULONG code_size_ignored; +ULONG code_alignment_ignored; +ALIGN_TYPE data_start; +ULONG data_size; +ULONG data_alignment; +ULONG data_allocation_size; +ULONG module_properties; +CHAR *memory_ptr; + + + /* Check for interrupt call. */ + if (TX_THREAD_GET_SYSTEM_STATE() != 0) + { + + /* Now, make sure the call is from an interrupt and not initialization. */ + if (TX_THREAD_GET_SYSTEM_STATE() < TX_INITIALIZE_IN_PROGRESS) + { + + /* Invalid caller of this function, return appropriate error code. */ + return(TX_CALLER_ERROR); + } + } + + /* Determine if the module manager has not been initialized yet. */ + if (_txm_module_manager_ready != TX_TRUE) + { + + /* Module manager has not been initialized. */ + return(TX_NOT_AVAILABLE); + } + + /* Determine if the module is valid. */ + if (module_instance == TX_NULL) + { + + /* Invalid module pointer. */ + return(TX_PTR_ERROR); + } + + /* Get module manager protection mutex. */ + _tx_mutex_get(&_txm_module_manager_mutex, TX_WAIT_FOREVER); + + /* Determine if the module is already valid. */ + if (module_instance -> txm_module_instance_id == TXM_MODULE_ID) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Module already loaded. */ + return(TXM_MODULE_ALREADY_LOADED); + } + + /* Pickup the module's information. */ + module_preamble = (TXM_MODULE_PREAMBLE *) module_location; + + /* Check to make sure there is a valid module to load. */ + if (module_preamble -> txm_module_preamble_id != TXM_MODULE_ID) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Invalid module preamble. */ + return(TXM_MODULE_INVALID); + } + + /* Check the properties of this module. */ + module_properties = module_preamble -> txm_module_preamble_property_flags & TXM_MODULE_OPTIONS_MASK; + if (/* Ensure the requested properties are supported. */ + ((module_properties & _txm_module_manager_properties_supported) != module_properties) || + /* Ensure the required properties are there. */ + ((_txm_module_manager_properties_required & module_properties) != _txm_module_manager_properties_required) || + /* If memory protection is enabled, then so must user mode. */ + ((module_properties & TXM_MODULE_MEMORY_PROTECTION) && !(module_properties & TXM_MODULE_USER_MODE)) || + /* Memory protection requires a known data area, since the memory protection hardware must + be programmed to cover it. */ + ((module_properties & TXM_MODULE_MEMORY_PROTECTION) && (module_data_location == TX_NULL)) + ) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Invalid properties. Return error. */ + return(TXM_MODULE_INVALID_PROPERTIES); + } + + /* Check for valid module entry offsets. */ + if ((module_preamble -> txm_module_preamble_shell_entry_function == 0) || + (module_preamble -> txm_module_preamble_start_function == 0)) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Invalid module preamble. */ + return(TXM_MODULE_INVALID); + } + + /* Check for valid sizes. */ + if ((module_preamble -> txm_module_preamble_code_size == 0) || + /* (module_preamble -> txm_module_preamble_data_size == 0) || *** a zero data size is valid */ + (module_preamble -> txm_module_preamble_start_stop_stack_size == 0) || + (module_preamble -> txm_module_preamble_callback_stack_size == 0)) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Invalid module preamble. */ + return(TXM_MODULE_INVALID); + } + + /* Get the amount of the bytes we need to allocate for the module's code + as well as the required alignment. Note that because this is an absolute + load, we only want the code alignment so we can check it. */ + status = _txm_module_manager_util_code_allocation_size_and_alignment_get(module_preamble, &code_alignment, &code_allocation_size_ignored); + if (status != TX_SUCCESS) + { + + /* Math overflow error occurred. */ + return(status); + } + + /* Since this is an absolute load, check the alignment of the module's instruction area (code). */ + TXM_MODULE_MANAGER_CHECK_CODE_ALIGNMENT(module_location, code_alignment) + + /* Initialize module control block to all zeros. */ + TX_MEMSET(module_instance, 0, sizeof(TXM_MODULE_INSTANCE)); + + /* Pickup the basic module sizes. */ + code_size = module_preamble -> txm_module_preamble_code_size; + data_size = module_preamble -> txm_module_preamble_data_size; + start_stop_stack_size = module_preamble -> txm_module_preamble_start_stop_stack_size; + callback_stack_size = module_preamble -> txm_module_preamble_callback_stack_size; + + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_size, TXM_MODULE_DATA_ALIGNMENT, data_size); + data_size = ((data_size - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT; + + /* Adjust the size of the module elements to be aligned to the default alignment. We do this + so that when we partition the allocated memory, we can simply place these regions right beside + each other without having to align their pointers. Note this only works when they all have + the same alignment. */ + + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(start_stop_stack_size, TXM_MODULE_DATA_ALIGNMENT, start_stop_stack_size); + start_stop_stack_size = ((start_stop_stack_size - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT; + + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(callback_stack_size, TXM_MODULE_DATA_ALIGNMENT, callback_stack_size); + callback_stack_size = ((callback_stack_size - 1)/TXM_MODULE_DATA_ALIGNMENT) * TXM_MODULE_DATA_ALIGNMENT; + + /* Update the data size to account for the default thread stacks. */ + data_allocation_size = 0; + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_allocation_size, start_stop_stack_size, data_allocation_size); + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_allocation_size, callback_stack_size, data_allocation_size); + + /* Setup the default code and data alignments. */ + data_alignment = (ULONG) TXM_MODULE_DATA_ALIGNMENT; + + /* Get the port-specific alignment for the data size. Note we only want data + so we pass values of 1 for code (to avoid any possible div by 0 errors). */ + code_size_ignored = 1; + code_alignment_ignored = 1; + TXM_MODULE_MANAGER_ALIGNMENT_ADJUST(module_preamble, code_size_ignored, code_alignment_ignored, data_allocation_size, data_alignment) + + /* Since this is an absolute load, check the alignment of the module's data area when the caller + supplied its location. */ + if (module_data_location != TX_NULL) + { + if ((((ALIGN_TYPE) module_data_location) & (((ALIGN_TYPE) data_alignment) - ((ALIGN_TYPE) 1))) != ((ALIGN_TYPE) 0)) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Invalid alignment, return error. */ + return(TXM_MODULE_ALIGNMENT_ERROR); + } + } + + /* Calculate the module's total RAM memory requirement. This entire area is allocated from the module + manager's byte pool. The general layout is defined as follows: + + Lowest Address: Start of start/stop thread stack + ... [note: thread entry info is embedded near end of stack areas] + End of start/stop thread stack + + Start of callback thread stack + ... [note: thread entry info is embedded near end of stack areas] + End of callback thread stack + + Highest Address: */ + + /* Add an extra alignment increment so we can align the pointer after allocation. */ + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(data_allocation_size, data_alignment, data_allocation_size); + + /* Allocate memory for the module. */ + status = _tx_byte_allocate(&_txm_module_manager_byte_pool, (VOID **) &memory_ptr, data_allocation_size, TX_NO_WAIT); + + /* Determine if the module memory allocation was successful. */ + if (status) + { + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* No memory, return an error. */ + return(TX_NO_MEMORY); + } + + /* Clear the allocated memory. */ + TX_MEMSET(memory_ptr, ((UCHAR) 0), data_allocation_size); + + /* Disable interrupts. */ + TX_DISABLE + + /* Setup the module instance structure. */ + module_instance -> txm_module_instance_id = TXM_MODULE_ID; + + /* Save the module name. */ + module_instance -> txm_module_instance_name = module_name; + + /* Save the module properties. */ + module_instance -> txm_module_instance_property_flags = module_preamble -> txm_module_preamble_property_flags; + + /* Set the module data memory allocation. This is the address released + when the module is unloaded. */ + module_instance -> txm_module_instance_data_allocation_ptr = (VOID *) memory_ptr; + + /* Save the data allocation size. */ + module_instance -> txm_module_instance_data_allocation_size = data_allocation_size; + + /* Calculate the actual start of the data area. This needs to be adjusted based on the alignment. */ + data_start = (ALIGN_TYPE) memory_ptr; + data_start = (data_start + (((ALIGN_TYPE)data_alignment) - 1)) & ~(((ALIGN_TYPE)data_alignment) - 1); + memory_ptr = (CHAR *) data_start; + + /* Compute the beginning and end of the data area. An absolutely located module has its data + placed at a fixed address by its linker script, and that address is not carried in the + module preamble. It must therefore be supplied by the caller. */ + if (module_data_location != TX_NULL) + { + + module_instance -> txm_module_instance_data_start = module_data_location; + + /* A zero data size is valid, so guard against wrapping when computing the end address. */ + if (data_size != 0) + { + module_instance -> txm_module_instance_data_end = (VOID *) (((CHAR *) module_data_location) + (data_size - 1)); + } + else + { + module_instance -> txm_module_instance_data_end = module_data_location; + } + + /* Save the size of the data area. */ + module_instance -> txm_module_instance_data_size = data_size; + } + else + { + + /* The caller does not know where the module's data area is, so the module instance cannot + describe it. Report an empty data area rather than an invalid one. */ + module_instance -> txm_module_instance_data_start = TX_NULL; + module_instance -> txm_module_instance_data_end = TX_NULL; + + /* Save the size of the data area. */ + module_instance -> txm_module_instance_data_size = 0; + } + + /* Set the module code memory allocation. This is the address released + when the module is unloaded. */ + module_instance -> txm_module_instance_code_allocation_ptr = (VOID *) NULL; + + /* Save the code allocation size. */ + module_instance -> txm_module_instance_code_allocation_size = 0; + + /* Setup the code pointers. Since the code was loaded in-place, this is effectively just the values supplied in the API call. */ + module_instance -> txm_module_instance_code_start = (VOID *) module_location; + module_instance -> txm_module_instance_code_end = (VOID *) (((CHAR *) module_location) + (code_size - 1)); + + /* Setup the code size. */ + module_instance -> txm_module_instance_code_size = code_size; + + /* Save the module's total memory usage. */ + module_instance -> txm_module_instance_total_ram_usage = 0 /* Code is executed in place */ + data_allocation_size /* just the size of stacks */; + + /* Set the module state to started. */ + module_instance -> txm_module_instance_state = TXM_MODULE_LOADED; + + /* Save the preamble pointer. */ + module_instance -> txm_module_instance_preamble_ptr = module_preamble; + + /* Save the module application ID in the module instance. */ + module_instance -> txm_module_instance_application_module_id = module_preamble -> txm_module_preamble_application_module_id; + + /* Setup the module's start/stop thread stack area. */ + module_instance -> txm_module_instance_start_stop_stack_start_address = (VOID *) (memory_ptr); + module_instance -> txm_module_instance_start_stop_stack_size = start_stop_stack_size; + module_instance -> txm_module_instance_start_stop_stack_end_address = (VOID *) (memory_ptr + (start_stop_stack_size - 1)); + + /* Move the memory pointer forward. */ + memory_ptr = memory_ptr + start_stop_stack_size; + + /* Save the start/stop thread priority. */ + module_instance -> txm_module_instance_start_stop_priority = module_preamble -> txm_module_preamble_start_stop_priority; + + /* Setup the module's callback thread stack area. */ + module_instance -> txm_module_instance_callback_stack_start_address = (VOID *) (memory_ptr); + module_instance -> txm_module_instance_callback_stack_size = callback_stack_size; + module_instance -> txm_module_instance_callback_stack_end_address = (VOID *) (memory_ptr + (callback_stack_size - 1)); + + /* Save the callback thread priority. */ + module_instance -> txm_module_instance_callback_priority = module_preamble -> txm_module_preamble_callback_priority; + + /* Setup the start of the module data section. For an absolute load, the byte pool allocation + holds only the two default thread stacks. The module's data section is the absolutely + located area supplied by the caller. */ + module_instance -> txm_module_instance_module_data_base_address = module_data_location; + + /* Build actual addresses based on load... Setup all the function pointers. Any adjustments needed to shell entry, start function, and callback function are defined in the + module preamble. */ +#ifdef ALIGN_TYPE_DEFINED + module_instance -> txm_module_instance_shell_entry_function = (VOID (*)(TX_THREAD *, TXM_MODULE_INSTANCE *)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_shell_entry_function); + module_instance -> txm_module_instance_start_thread_entry = (VOID (*)(ULONG)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_start_function); + module_instance -> txm_module_instance_callback_request_thread_entry = (VOID (*)(ULONG)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_callback_function); +#else + module_instance -> txm_module_instance_shell_entry_function = (VOID (*)(TX_THREAD *, TXM_MODULE_INSTANCE *)) ((VOID *) module_preamble -> txm_module_preamble_shell_entry_function); + module_instance -> txm_module_instance_start_thread_entry = (VOID (*)(ULONG)) ((VOID *) module_preamble -> txm_module_preamble_start_function); + module_instance -> txm_module_instance_callback_request_thread_entry = (VOID (*)(ULONG)) ((VOID *) module_preamble -> txm_module_preamble_callback_function); +#endif + + /* Determine if there is a stop function for this module. */ + if (module_preamble -> txm_module_preamble_stop_function) + { + + /* Yes, there is a stop function, build the address. */ +#ifdef ALIGN_TYPE_DEFINED + module_instance -> txm_module_instance_stop_thread_entry = (VOID (*)(ULONG)) ((VOID *) (ALIGN_TYPE) module_preamble -> txm_module_preamble_stop_function); +#else + module_instance -> txm_module_instance_stop_thread_entry = (VOID (*)(ULONG)) ((VOID *) module_preamble -> txm_module_preamble_stop_function); +#endif + } + else + { + + /* No, there is no stop function. Just set the pointer to NULL. */ + module_instance -> txm_module_instance_stop_thread_entry = TX_NULL; + } + + /* Load the module control block with port-specific information. */ + TXM_MODULE_MANAGER_MODULE_SETUP(module_instance); + + /* Now add the module to the linked list of created modules. */ + if (_txm_module_manger_loaded_count++ == 0) + { + + /* The loaded module list is empty. Add module to empty list. */ + _txm_module_manager_loaded_list_ptr = module_instance; + module_instance -> txm_module_instance_loaded_next = module_instance; + module_instance -> txm_module_instance_loaded_previous = module_instance; + } + else + { + + /* This list is not NULL, add to the end of the list. */ + next_module = _txm_module_manager_loaded_list_ptr; + previous_module = next_module -> txm_module_instance_loaded_previous; + + /* Place the new module in the list. */ + next_module -> txm_module_instance_loaded_previous = module_instance; + previous_module -> txm_module_instance_loaded_next = module_instance; + + /* Setup this module's created links. */ + module_instance -> txm_module_instance_loaded_previous = previous_module; + module_instance -> txm_module_instance_loaded_next = next_module; + } + + /* Restore interrupts. */ + TX_RESTORE + + /* Release the protection mutex. */ + _tx_mutex_put(&_txm_module_manager_mutex); + + /* Return success. */ + return(TX_SUCCESS); +} diff --git a/common_modules/module_manager/src/txm_module_manager_object_allocate.c b/common_modules/module_manager/src/txm_module_manager_object_allocate.c index 92ae128c2..8e452b44f 100644 --- a/common_modules/module_manager/src/txm_module_manager_object_allocate.c +++ b/common_modules/module_manager/src/txm_module_manager_object_allocate.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -23,6 +25,7 @@ #define TX_SOURCE_CODE #include "txm_module.h" +#include "txm_module_manager_util.h" /**************************************************************************/ /* */ @@ -51,6 +54,11 @@ /* OUTPUT */ /* */ /* status Completion status */ +/* TXM_MODULE_MATH_OVERFLOW is */ +/* returned when object_size is so */ +/* large that adding the manager's */ +/* own object header to it would */ +/* not be representable */ /* */ /* CALLS */ /* */ @@ -67,6 +75,7 @@ UINT _txm_module_manager_object_allocate(VOID **object_ptr_ptr, ULONG object_siz { TXM_MODULE_ALLOCATED_OBJECT *object_ptr; +ULONG allocation_size; UINT return_value; @@ -81,6 +90,18 @@ UINT return_value; /* Initialize the return pointer to NULL. */ *((VOID **) object_ptr_ptr) = TX_NULL; + /* Work out how much memory the pool must supply: the size the caller asked for plus + the private header this function writes in front of it. The size is supplied by + the module, so the addition is checked. An unchecked one wraps for sizes near the + top of a ULONG and asks the pool for fewer bytes than the header alone occupies, + after which the header stores below run past the end of the allocation and into + the neighbouring pool block. Sizes that survive the addition but exceed the pool + are refused by _txe_byte_allocate, which bounds every request by the pool size. + + This is done before the protection mutex is taken so that a refused request leaves + the object pool, the module's allocated object list and its count untouched. */ + TXM_MODULE_MANAGER_UTIL_MATH_ADD_ULONG(object_size, (ULONG) sizeof(TXM_MODULE_ALLOCATED_OBJECT), allocation_size); + /* Get module manager protection mutex. */ _txe_mutex_get(&_txm_module_manager_mutex, TX_WAIT_FOREVER); @@ -90,10 +111,10 @@ UINT return_value; TXM_MODULE_ALLOCATED_OBJECT *next_object, *previous_object; - /* Allocate the object requested by the module - adding an extra ULONG in order to - store the module instance pointer. */ + /* Allocate the object requested by the module, including the header checked above + that holds the owning module instance, the allocation list links and the size. */ return_value = (ULONG) _txe_byte_allocate(&_txm_module_manager_object_pool, (VOID **) &object_ptr, - (ULONG) (object_size + sizeof(TXM_MODULE_ALLOCATED_OBJECT)), TX_NO_WAIT); + allocation_size, TX_NO_WAIT); /* Determine if the request was successful. */ if (return_value == TX_SUCCESS) diff --git a/common_modules/module_manager/src/txm_module_manager_object_deallocate.c b/common_modules/module_manager/src/txm_module_manager_object_deallocate.c index 2efc465b7..c9a9ed4ff 100644 --- a/common_modules/module_manager/src/txm_module_manager_object_deallocate.c +++ b/common_modules/module_manager/src/txm_module_manager_object_deallocate.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -25,6 +27,7 @@ #include "tx_api.h" #include "tx_thread.h" #include "txm_module.h" +#include "txm_module_manager_util.h" /**************************************************************************/ /* */ @@ -38,7 +41,29 @@ /* */ /* DESCRIPTION */ /* */ -/* This function deallocates a previously allocated object. */ +/* DEPRECATED. This function is called internally by the Module */ +/* Manager dispatch layer after a successful tx_*_delete() call from */ +/* a module. It must not be called directly by module or application */ +/* code. */ +/* */ +/* Module authors: remove any explicit call to */ +/* txm_module_object_deallocate(). Calling the appropriate */ +/* tx_*_delete() service is sufficient; pool deallocation is handled */ +/* automatically by the dispatch layer. */ +/* */ +/* Only memory the calling module allocated from the object pool is */ +/* released, and the allocation is identified by searching the */ +/* module's own allocation list rather than by reading a private */ +/* header from in front of the address the caller supplied. An */ +/* address that names none of this module's allocations returns */ +/* TX_PTR_ERROR and is not dereferenced. */ +/* Memory holding a live kernel object is not given back. Such a */ +/* request returns TX_DELETE_ERROR and changes nothing: the object */ +/* stays created, the allocation stays on the module's allocation */ +/* list, and the memory stays owned by the module. Storage that was */ +/* allocated but never made into an object is still released, so a */ +/* module can still clean up after a create that failed or was */ +/* abandoned. */ /* */ /* INPUT */ /* */ @@ -52,6 +77,9 @@ /* */ /* _txe_mutex_get Get module instance mutex */ /* _txe_mutex_put Release module instance mutex */ +/* _txm_module_manager_allocated_object_find */ +/* Find the module's allocation */ +/* _txm_module_manager_live_object_check Check for a live object */ /* _txe_byte_release Release object back to pool */ /* */ /* */ @@ -78,18 +106,65 @@ UINT return_value; /* Pickup module instance pointer. */ module_instance = _tx_thread_current_ptr -> tx_thread_module_instance_ptr; - /* Setup the memory pointer. */ - module_allocated_object_ptr = (TXM_MODULE_ALLOCATED_OBJECT *) object_ptr; - - /* Position the object pointer backwards to position back to the module manager information. */ - previous_object = module_allocated_object_ptr--; + /* Find the allocation this address names. + + The private header in front of an allocation is the manager's own + record of who the memory belongs to, but it is only a header when the + address is one the manager gave out. Reaching it by subtraction from + whatever address the caller supplied assumes the answer: for an object + the application allocated statically, or for any address outside the + object pool, the words in front of it are unrelated memory, and this + read them in privileged mode before deciding they were not a header. + Every delete dispatcher reaches this function with the address the + module named, so an object the module does not own arrived here as a + matter of course rather than exceptionally. + + Searching the module's own allocation list answers the same question + without that assumption. The address is compared against the + allocations the manager made for this module and is never + dereferenced, so an address that names none of them -- an object the + application owns, an object another module owns, or an address nowhere + near the object pool -- is refused without a privileged read. The + search also establishes what the header read could not: that the + address is the exact start of an allocation rather than somewhere + inside one. */ + module_allocated_object_ptr = _txm_module_manager_allocated_object_find(module_instance, (ALIGN_TYPE) object_ptr, TX_NULL); /* Make sure the object is valid. */ - if ((module_allocated_object_ptr == TX_NULL) || (module_allocated_object_ptr -> txm_module_allocated_object_module_instance != module_instance) || (module_instance -> txm_module_instance_object_list_count == 0)) + if (module_allocated_object_ptr == TX_NULL) { /* Set return value to invalid pointer. */ return_value = TX_PTR_ERROR; } + + /* Determine if a live kernel object is in this memory. + + Releasing the memory of a created object leaves the kernel holding the + only references to it. The object stays on the created list for its + type, a thread stays on the ready or suspension list it was on and stays + schedulable, and an active timer stays on the timer list. None of those + consult a control block ID, so nothing about the freed memory stops the + kernel using it: a created list walk reads a name pointer out of it, a + create or delete of another object of the same type writes through the + links in it, the scheduler restores a context from the stack pointer in + it, and timer expiration calls the function pointer in it. The byte pool + is meanwhile free to hand those bytes to the next allocation, so what the + kernel goes on reading as a control block is whatever the next owner of + the memory puts there. + + This is asked before the allocation is unlinked, so a refusal leaves the + allocation list, the object and the memory exactly as they were. What is + refused is releasing the memory of an object that is still created; an + allocation that was never made into an object, or one whose object has + been deleted, is released as before, which is what keeps cleanup after a + failed or abandoned create working and what makes the release the delete + dispatchers perform after a successful delete go through. */ + else if (_txm_module_manager_live_object_check((ALIGN_TYPE) object_ptr) == TX_TRUE) + { + + /* Set return value to indicate the object must be deleted first. */ + return_value = TX_DELETE_ERROR; + } else { @@ -115,6 +190,27 @@ UINT return_value; } } + /* Clear the first word of the object being given back, which for every kernel + object is its control block ID. + + Object authentication reads that ID to establish the type of an object and + that it is still created, having first established that the address is the + exact start of an allocation. The kernel clears the ID when it deletes an + object, so the ordinary sequence of delete and then deallocate has already + cleared it. What has not is a deallocation of an object that was never + deleted: the memory returns to the pool still carrying a valid ID, and the + next allocation to be placed there is a raw allocation that presents one. + Clearing it here means the manager stops vouching for a control block at + the moment it stops owning the memory, whatever order the module chose. + + An allocation too small to hold an ID cannot be presenting one, and is + left alone rather than written past its end. */ + if (module_allocated_object_ptr -> txm_module_object_size >= ((ULONG) sizeof(ULONG))) + { + + *((ULONG *) object_ptr) = TX_CLEAR_ID; + } + /* Release the object memory. */ return_value = (ULONG) _txe_byte_release((VOID *) module_allocated_object_ptr); } diff --git a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c index 84cf6c96e..8b24558ba 100644 --- a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c +++ b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c @@ -37,9 +37,10 @@ /* */ /* DESCRIPTION */ /* */ -/* This function is deprecated and calls the secure version of this */ -/* function (_txm_module_manager_object_pointer_get_extended) with the */ -/* maximum possible name length since none was passed. */ +/* DEPRECATED. Use _txm_module_manager_object_pointer_get_extended() */ +/* instead, passing the actual name-buffer length. This wrapper */ +/* passes UINT_MAX as the length, which can cause the name-comparison */ +/* loop to read past the end of a short buffer (undefined behaviour). */ /* */ /* INPUT */ /* */ diff --git a/common_modules/module_manager/src/txm_module_manager_thread_create.c b/common_modules/module_manager/src/txm_module_manager_thread_create.c index c14d8e4e4..51b85e1b4 100644 --- a/common_modules/module_manager/src/txm_module_manager_thread_create.c +++ b/common_modules/module_manager/src/txm_module_manager_thread_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -82,7 +84,7 @@ /* _txm_module_manager_kernel_dispatch Kernel dispatch function */ /* */ /**************************************************************************/ -UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *), VOID (*entry_function)(ULONG id), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, @@ -104,6 +106,9 @@ 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 TXM_MODULE_THREAD_ENTRY_INFO *thread_entry_info; VOID *stack_end; ULONG i; @@ -261,13 +266,18 @@ ULONG i; #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 @@ -284,7 +294,7 @@ ULONG i; stack_size = ((stack_size/(sizeof(ULONG))) * (sizeof(ULONG))) - (sizeof(ULONG)); /* Ensure the starting stack address is evenly aligned. */ - new_stack_start = TX_POINTER_TO_ALIGN_TYPE_CONVERT(stack_start); + new_stack_start = (ALIGN_TYPE) ((VOID *) stack_start); updated_stack_start = ((((ULONG) new_stack_start) + ((sizeof(ULONG)) - ((ULONG) 1)) ) & (~((sizeof(ULONG)) - ((ULONG) 1)))); /* Determine if the starting stack address is different. */ @@ -296,7 +306,7 @@ ULONG i; } /* Update the starting stack pointer. */ - stack_start = TX_ALIGN_TYPE_TO_POINTER_CONVERT(updated_stack_start); + stack_start = (VOID *) ((ALIGN_TYPE) updated_stack_start); #endif /* Allocate the thread entry information at the top of thread's stack - Leaving one @@ -309,6 +319,21 @@ ULONG i; /* 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 + + /* Note that TX_ENABLE_STACK_CHECKING is not supported for module threads. A user mode + module thread owns two stacks and the scheduler swaps tx_thread_stack_start, + tx_thread_stack_end and tx_thread_stack_size over to the kernel stack whenever the + thread enters the module manager. Neither tx_thread_stack_highest_ptr nor the guard + pattern beyond the end of the stack is maintained across that switch, so + TX_THREAD_STACK_CHECK may report spurious stack errors for module threads. */ + /* If the thread runs on user mode, allocate the kernel stack for syscall. */ if((module_instance -> txm_module_instance_property_flags) & TXM_MODULE_USER_MODE) { @@ -331,8 +356,10 @@ ULONG i; /* Align kernel stack pointer. */ thread_ptr -> tx_thread_module_kernel_stack_end = (VOID *) (((ALIGN_TYPE)(thread_ptr -> tx_thread_module_kernel_stack_start) + TXM_MODULE_KERNEL_STACK_SIZE) & ~0x07); - /* Set kernel stack size. */ - thread_ptr -> tx_thread_module_kernel_stack_size = TXM_MODULE_KERNEL_STACK_SIZE; + /* Set kernel stack size. Aligning the end of the kernel stack downwards can consume + up to seven bytes of the block returned by the allocator, so the usable size must be + derived from the aligned range instead of from TXM_MODULE_KERNEL_STACK_SIZE. */ + thread_ptr -> tx_thread_module_kernel_stack_size = (ULONG) ((ALIGN_TYPE) (thread_ptr -> tx_thread_module_kernel_stack_end) - (ALIGN_TYPE) (thread_ptr -> tx_thread_module_kernel_stack_start)); } #if TXM_MODULE_MEMORY_PROTECTION @@ -741,4 +768,3 @@ ULONG i; /* Return success. */ return(TX_SUCCESS); } - diff --git a/common_modules/module_manager/src/txm_module_manager_thread_reset.c b/common_modules/module_manager/src/txm_module_manager_thread_reset.c index 75dd4a495..334070bf2 100644 --- a/common_modules/module_manager/src/txm_module_manager_thread_reset.c +++ b/common_modules/module_manager/src/txm_module_manager_thread_reset.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -106,6 +108,20 @@ TXM_MODULE_THREAD_ENTRY_INFO *thread_entry_info; status = TX_NOT_DONE; } } + + /* Resetting a thread means rebuilding its stack around a module's shell entry + function, so the thread has to be one a module manager created. A thread the + application created carries no module instance, and the fields this function + goes on to read from it -- the shell entry function it builds the new stack + frame around -- would be read through a null pointer in privileged mode. A + module can name such a thread: any thread the system created can be found by + name, and one that has run to completion satisfies the state test above. */ + if (thread_ptr -> tx_thread_module_instance_ptr == TX_NULL) + { + + /* Not a module thread, so there is nothing here to reset. */ + status = TX_NOT_DONE; + } } /* Is the request valid? */ diff --git a/common_modules/module_manager/src/txm_module_manager_util.c b/common_modules/module_manager/src/txm_module_manager_util.c index 78031b5fc..f3c8beefd 100644 --- a/common_modules/module_manager/src/txm_module_manager_util.c +++ b/common_modules/module_manager/src/txm_module_manager_util.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -25,6 +27,15 @@ #define TX_SOURCE_CODE +#include "tx_api.h" +#include "tx_thread.h" +#include "tx_timer.h" +#include "tx_queue.h" +#include "tx_event_flags.h" +#include "tx_semaphore.h" +#include "tx_mutex.h" +#include "tx_block_pool.h" +#include "tx_byte_pool.h" #include "txm_module.h" #include "txm_module_manager_util.h" @@ -270,7 +281,7 @@ UINT return_value; /* 09-30-2020 Scott Larson Initial Version 6.1 */ /* */ /**************************************************************************/ -UINT _txm_module_manager_object_name_compare(CHAR *search_name, UINT search_name_length, CHAR *object_name) +UINT _txm_module_manager_object_name_compare(CHAR *search_name, UINT search_name_length, TX_NAME_CONST CHAR *object_name) { CHAR search_name_char; @@ -461,11 +472,525 @@ UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *modu return(TX_FALSE); } - /* Determine if the object pointer is inside the module object pool. */ + /* Determine if the object is outside the calling module. */ if (TXM_MODULE_MANAGER_ENSURE_OUTSIDE_MODULE(module_instance, object_ptr, object_size) == TX_FALSE) { - /* Object pointer is not inside the object pool, which is invalid. */ + /* Object pointer is not outside the module, which is invalid. */ + return(TX_FALSE); + } + + /* Being outside the module does not make an address an object. The manager's + object pool is outside every module, so an address shifted into the interior of + one of this module's own privileged allocations satisfies the test above while + denoting no object at all, and the bytes the shifted address then presents as a + control block are bytes the module chose through ordinary create and set + services. An address in the object pool is therefore only usable if it is the + exact address the manager handed out for an allocation of this size. + + This function is given a size rather than a type, so it can go no further than + that: it cannot establish which type of object it is, and it cannot authenticate + an application-owned object outside the pool. Dispatchers in this repository use + _txm_module_manager_param_check_typed_object_for_use, which does both. */ + if ((_txm_module_manager_object_pool_created == TX_TRUE) && + (object_ptr >= (ALIGN_TYPE) _txm_module_manager_object_pool.tx_byte_pool_start) && + (object_ptr < (ALIGN_TYPE) (_txm_module_manager_object_pool.tx_byte_pool_start + _txm_module_manager_object_pool.tx_byte_pool_size))) + { + + if (_txm_module_manager_allocated_object_check(module_instance, object_ptr, object_size) == TX_FALSE) + { + + /* An address in the object pool that is not the exact start of one of this + module's allocations, which is invalid. */ + return(TX_FALSE); + } + } + + /* Define application-specific object memory check. */ +#ifdef TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_CHECK + + /* Bring in the application-spefic objeft memory check, defined by the user. */ + TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_CHECK +#endif /* TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_ENABLE */ + + /* Everything is okay with the object, return TX_TRUE. */ + return(TX_TRUE); +} + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_object_type_size_get PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function returns the size of the control block belonging to a */ +/* module object type. It is the size a service of that type is */ +/* entitled to dereference, and the size the manager recorded when it */ +/* allocated object memory for that type. */ +/* */ +/* INPUT */ +/* */ +/* object_type Module object type */ +/* object_size Destination for the control block */ +/* size of that type */ +/* */ +/* OUTPUT */ +/* */ +/* TX_TRUE Known object type */ +/* TX_FALSE Unknown object type */ +/* */ +/* CALLS */ +/* */ +/* None */ +/* */ +/* CALLED BY */ +/* */ +/* _txm_module_manager_param_check_typed_object_for_use */ +/* Module object authentication */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_object_type_size_get(UINT object_type, ULONG *object_size) +{ + +UINT status; + + + /* Assume the type is one this manager knows. */ + status = TX_TRUE; + + switch (object_type) + { + + case TXM_BLOCK_POOL_OBJECT: + + *object_size = (ULONG) sizeof(TX_BLOCK_POOL); + break; + + case TXM_BYTE_POOL_OBJECT: + + *object_size = (ULONG) sizeof(TX_BYTE_POOL); + break; + + case TXM_EVENT_FLAGS_OBJECT: + + *object_size = (ULONG) sizeof(TX_EVENT_FLAGS_GROUP); + break; + + case TXM_MUTEX_OBJECT: + + *object_size = (ULONG) sizeof(TX_MUTEX); + break; + + case TXM_QUEUE_OBJECT: + + *object_size = (ULONG) sizeof(TX_QUEUE); + break; + + case TXM_SEMAPHORE_OBJECT: + + *object_size = (ULONG) sizeof(TX_SEMAPHORE); + break; + + case TXM_THREAD_OBJECT: + + *object_size = (ULONG) sizeof(TX_THREAD); + break; + + case TXM_TIMER_OBJECT: + + *object_size = (ULONG) sizeof(TX_TIMER); + break; + + default: + + /* Not a type the manager authenticates. Report it rather than guessing a + size, so that a caller cannot be given a range to validate that has no + relationship to the object the service will dereference. */ + *object_size = ((ULONG) 0); + status = TX_FALSE; + break; + } + + return(status); +} + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_allocated_object_find PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function returns the manager's private header for the object */ +/* allocation an address names, or TX_NULL when the address names */ +/* none of the specified module's allocations. The size the */ +/* allocation was made for is reported to callers that ask for it. */ +/* */ +/* The allocation list is the manager's own record, built as it hands */ +/* object memory out, and it is searched rather than reached through */ +/* a header taken from in front of the caller's address. That order */ +/* is what makes the answer both correct and safe. */ +/* */ +/* Correct, because the address immediately after a header is the */ +/* only address in an allocation that the manager ever gave out, so */ +/* an address chosen inside an allocation is distinguishable from the */ +/* start of one. Reading a header cannot make that distinction: the */ +/* bytes in front of an interior address are part of the object, and */ +/* a module places values there through ordinary services. */ +/* */ +/* Safe, because the caller's address is only ever compared, never */ +/* dereferenced. An address that belongs to no allocation of this */ +/* module -- an object the application owns, an object another module */ +/* owns, or an address nowhere near the object pool -- is rejected */ +/* without a privileged read of the words in front of it. */ +/* */ +/* INPUT */ +/* */ +/* module_instance Requesting module instance pointer*/ +/* object_ptr Address of object memory area */ +/* object_size_ptr Address to return the size the */ +/* allocation was made for, or */ +/* TX_NULL to not return it */ +/* */ +/* OUTPUT */ +/* */ +/* allocation The allocation's private header, */ +/* or TX_NULL when the address */ +/* names none of this module's */ +/* */ +/* CALLS */ +/* */ +/* None */ +/* */ +/* CALLED BY */ +/* */ +/* _txm_module_manager_allocated_object_check */ +/* Module object ownership check */ +/* _txm_module_manager_object_deallocate Module object deallocation */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +TXM_MODULE_ALLOCATED_OBJECT *_txm_module_manager_allocated_object_find(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG *object_size_ptr) +{ + +TX_INTERRUPT_SAVE_AREA + +TXM_MODULE_ALLOCATED_OBJECT *allocated_object_ptr; +TXM_MODULE_ALLOCATED_OBJECT *found_object_ptr; +ULONG objects_examined; + + + /* Assume the address names none of this module's allocations. */ + found_object_ptr = TX_NULL; + + /* Determine if there is a module whose allocations can be searched. A request + that does not come from a module owns no allocation. */ + if (module_instance == TX_NULL) + { + + /* Nothing to search, and nothing to report. */ + return(TX_NULL); + } + + /* Disable interrupts. The allocation list is maintained by threads holding the + manager protection mutex, so a scan that runs to completion with interrupts + disabled cannot observe it being changed, and unlike taking the mutex it adds + no blocking point and no priority inversion to a kernel request. */ + TX_DISABLE + + allocated_object_ptr = module_instance -> txm_module_instance_object_list_head; + objects_examined = ((ULONG) 0); + + /* Loop through the objects allocated to this module. The loop is bounded by the + count the manager maintains alongside the list, so the cost of one search is + bounded by the number of objects this module has allocated, and a list whose + links have been damaged cannot make the scan run on. */ + while ((objects_examined < module_instance -> txm_module_instance_object_list_count) && + (allocated_object_ptr != TX_NULL)) + { + + /* The address the module was given is the one immediately after the private + header, so that is the only address in this allocation that names it. */ + if (((ALIGN_TYPE) (allocated_object_ptr + 1)) == object_ptr) + { + + /* Found it. An address matches at most one allocation, so there is + nothing further to look at. */ + found_object_ptr = allocated_object_ptr; + + /* Report the size this allocation was made for, if the caller asked for + it. It is read here, inside the scan, so that the answer cannot be + taken from a header that stopped being one after the search. */ + if (object_size_ptr != TX_NULL) + { + + *object_size_ptr = allocated_object_ptr -> txm_module_object_size; + } + + break; + } + + /* Move to the next allocated object. */ + objects_examined++; + allocated_object_ptr = allocated_object_ptr -> txm_module_allocated_object_next; + } + + /* Restore interrupts. */ + TX_RESTORE + + return(found_object_ptr); +} + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_allocated_object_check PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function determines whether an address is the exact address */ +/* the manager handed the specified module for one of its object */ +/* allocations, and whether that allocation is the size the caller */ +/* expects. */ +/* */ +/* This is the question of ownership, and it is deliberately a */ +/* separate question from whether an object is there at all. A */ +/* module may hold, and legitimately use, a pointer to an object it */ +/* does not own: the manager hands application-owned objects to */ +/* modules by name through its object lookup service, and sharing an */ +/* object is what that service is for. Destroying one is not sharing */ +/* it, so the delete services ask this question in addition to the */ +/* ones that establish that the address denotes a usable object. */ +/* */ +/* INPUT */ +/* */ +/* module_instance Requesting module instance pointer*/ +/* object_ptr Address of object memory area */ +/* object_size Expected size of the allocation */ +/* */ +/* OUTPUT */ +/* */ +/* TX_TRUE An exact allocation of that size */ +/* TX_FALSE Anything else */ +/* */ +/* CALLS */ +/* */ +/* _txm_module_manager_allocated_object_find */ +/* Find the module's allocation */ +/* */ +/* CALLED BY */ +/* */ +/* txm_module_manager_* Module manager functions */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_allocated_object_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size) +{ + +ULONG allocated_size; +UINT status; + + + /* Assume the address is not one of this module's allocations. */ + status = TX_FALSE; + + /* Initialize the size, so that nothing is read if no allocation is found. */ + allocated_size = ((ULONG) 0); + + /* Determine if the address is the exact start of one of this module's + allocations. */ + if (_txm_module_manager_allocated_object_find(module_instance, object_ptr, &allocated_size) != TX_NULL) + { + + /* Is the allocation the size the caller expects? An allocation made for a + smaller object does not become a larger one because a service was asked + to treat it as one. */ + if (allocated_size == object_size) + { + + status = TX_TRUE; + } + } + + return(status); +} + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_param_check_typed_object_for_use */ +/* PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function authenticates a kernel object a module has named, */ +/* before a privileged service is allowed to dereference it. It */ +/* establishes that the address is the exact address of a live kernel */ +/* object of the type the service expects. */ +/* */ +/* The address is accepted only if it is on the kernel's created list */ +/* for that type. That list is the record the create and delete */ +/* services maintain, so being on it establishes at once that the */ +/* address is an object start rather than an address inside an object, */ +/* that the object is of this type, and that it has not been deleted. */ +/* It is also how an object the application created and shared with a */ +/* module is authenticated, since the manager allocated no such object */ +/* and has no record of its own to consult. */ +/* */ +/* Nothing a module can influence is used to establish a type. In */ +/* particular the control block ID is not, on its own, evidence of */ +/* anything: a module can arrange for the value of an ID to appear */ +/* inside an object it legitimately owns, which is what lets a shifted */ +/* pointer pass an ID test, and distinct object types of equal size */ +/* exist, so an ID is not even a type at an address known to be an */ +/* object start. It is checked, after the created list has settled the */ +/* question, because it is the check the _txe_ services make and it is */ +/* compiled away with them under TX_DISABLE_ERROR_CHECKING. */ +/* */ +/* INPUT */ +/* */ +/* module_instance Requesting module instance pointer*/ +/* object_ptr Address of object memory area */ +/* object_type Module object type the service */ +/* expects */ +/* */ +/* OUTPUT */ +/* */ +/* TX_TRUE Authenticated object pointer */ +/* TX_FALSE Invalid object pointer */ +/* */ +/* CALLS */ +/* */ +/* _txm_module_manager_object_type_size_get */ +/* Get control block size */ +/* _txm_module_manager_created_object_type_check */ +/* Check kernel created list */ +/* _txm_module_manager_object_id_check Check control block ID */ +/* */ +/* CALLED BY */ +/* */ +/* txm_module_manager_* Module manager functions */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_param_check_typed_object_for_use(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, UINT object_type) +{ + +ULONG object_size; +UINT exact_object; + + + /* Determine if the object pointer is NULL. */ + if ((void *) object_ptr == TX_NULL) + { + + /* Object pointer is NULL, which is invalid. */ + return(TX_FALSE); + } + + /* Pickup the size of the control block this type of service dereferences. */ + if (_txm_module_manager_object_type_size_get(object_type, &object_size) == TX_FALSE) + { + + /* Not an object type this manager authenticates, so it cannot be used. */ + return(TX_FALSE); + } + + /* Determine if the object is outside the calling module. A kernel object inside + the module's own memory is one the module can write behind the kernel's back, + so it is rejected here as it always has been. This also rejects a size that + wraps when added to the address. */ + if (TXM_MODULE_MANAGER_ENSURE_OUTSIDE_MODULE(module_instance, object_ptr, object_size) == TX_FALSE) + { + + /* Object pointer is not outside the module, which is invalid. */ + return(TX_FALSE); + } + + /* Establish that the address is the exact address of a live object of this type, + from the kernel's created list for the type. That list is the record the create + and delete services maintain, so being on it establishes at once that the + address is an object start, that the object is of this type, and that it has not + been deleted. + + It is deliberately the only ground on which an address is accepted. The + manager's own allocation list would establish the address and the size of an + object a module allocated, and would do it by walking a shorter list, but it + records no type, and the type cannot then be taken from the control block + itself: distinct object types of equal size exist -- on a 32-bit target a byte + pool, a mutex and a timer are all the same size -- so a control block whose ID + has been made to read as one of them would be accepted as that type. Nothing a + module can influence is used to establish a type. + + The address is not dereferenced to reach this decision. An address a module + named is not read until a kernel record says there is an object there. */ + exact_object = _txm_module_manager_created_object_type_check(object_ptr, object_type); + + if (exact_object == TX_FALSE) + { + + /* The address is not the start of a live object of this type. */ + return(TX_FALSE); + } + + /* The address is a live object of the requested type. Confirm it against the + control block's own ID, which is the check the _txe_ services would make and + which is compiled away with them under TX_DISABLE_ERROR_CHECKING. */ + if (_txm_module_manager_object_id_check(object_ptr, object_type) == TX_FALSE) + { + + /* The created list and the control block disagree, so the object is not in a + state the manager is prepared to vouch for. */ return(TX_FALSE); } @@ -481,6 +1006,498 @@ UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *modu } +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_created_object_type_check PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function determines whether an address is the exact address */ +/* of an object on the kernel's created list for a module object type. */ +/* */ +/* The created list is the record the create and delete services */ +/* maintain, so being on it establishes at once that the address is an */ +/* object start rather than an address inside an object, that the */ +/* object is of this type, and that it has not been deleted. It is */ +/* also the only record of an object the application created and */ +/* shared with a module, since the manager allocated no such object. */ +/* */ +/* Nothing the module can influence is consulted. In particular the */ +/* control block ID is not: a module can arrange for the value of an */ +/* ID to appear inside memory it owns, and distinct object types of */ +/* equal size exist, so an ID is not evidence that an object is there */ +/* nor of what type it is. */ +/* */ +/* INPUT */ +/* */ +/* object_ptr Address of object memory area */ +/* object_type Module object type */ +/* */ +/* OUTPUT */ +/* */ +/* TX_TRUE A created object of that type */ +/* TX_FALSE Anything else */ +/* */ +/* CALLS */ +/* */ +/* None */ +/* */ +/* CALLED BY */ +/* */ +/* _txm_module_manager_live_object_check Module object liveness check */ +/* _txm_module_manager_param_check_typed_object_for_use */ +/* Module object authentication */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_created_object_type_check(ALIGN_TYPE object_ptr, UINT object_type) +{ + +TX_INTERRUPT_SAVE_AREA + +ULONG objects_examined; +ULONG objects_created; +ALIGN_TYPE candidate_ptr; +UINT status; +TX_BLOCK_POOL *block_pool_ptr; +TX_BYTE_POOL *byte_pool_ptr; +TX_EVENT_FLAGS_GROUP *event_flags_ptr; +TX_MUTEX *mutex_ptr; +TX_QUEUE *queue_ptr; +TX_SEMAPHORE *semaphore_ptr; +TX_THREAD *thread_ptr; +TX_TIMER *timer_ptr; + + + /* Assume the address is not on the created list for this type. */ + status = TX_FALSE; + + /* Disable interrupts. The created lists are maintained with interrupts disabled, + so a scan that runs to completion this way sees a consistent list, and it adds + no blocking point to a kernel request. The cost of one check is bounded by the + number of objects of this type the system has created, which is the price of + authenticating an object the manager did not allocate; a module using its own + allocated objects does not reach this function. */ + TX_DISABLE + + /* Start each list from its head and pick up the count that bounds the walk, so a + list whose links have been damaged cannot make the scan run on. */ + switch (object_type) + { + + case TXM_BLOCK_POOL_OBJECT: + + block_pool_ptr = _tx_block_pool_created_ptr; + objects_created = _tx_block_pool_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (block_pool_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) block_pool_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + block_pool_ptr = block_pool_ptr -> tx_block_pool_created_next; + } + break; + + case TXM_BYTE_POOL_OBJECT: + + byte_pool_ptr = _tx_byte_pool_created_ptr; + objects_created = _tx_byte_pool_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (byte_pool_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) byte_pool_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + byte_pool_ptr = byte_pool_ptr -> tx_byte_pool_created_next; + } + break; + + case TXM_EVENT_FLAGS_OBJECT: + + event_flags_ptr = _tx_event_flags_created_ptr; + objects_created = _tx_event_flags_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (event_flags_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) event_flags_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + event_flags_ptr = event_flags_ptr -> tx_event_flags_group_created_next; + } + break; + + case TXM_MUTEX_OBJECT: + + mutex_ptr = _tx_mutex_created_ptr; + objects_created = _tx_mutex_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (mutex_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) mutex_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + mutex_ptr = mutex_ptr -> tx_mutex_created_next; + } + break; + + case TXM_QUEUE_OBJECT: + + queue_ptr = _tx_queue_created_ptr; + objects_created = _tx_queue_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (queue_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) queue_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + queue_ptr = queue_ptr -> tx_queue_created_next; + } + break; + + case TXM_SEMAPHORE_OBJECT: + + semaphore_ptr = _tx_semaphore_created_ptr; + objects_created = _tx_semaphore_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (semaphore_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) semaphore_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + semaphore_ptr = semaphore_ptr -> tx_semaphore_created_next; + } + break; + + case TXM_THREAD_OBJECT: + + thread_ptr = _tx_thread_created_ptr; + objects_created = _tx_thread_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (thread_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) thread_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + thread_ptr = thread_ptr -> tx_thread_created_next; + } + break; + + case TXM_TIMER_OBJECT: + + timer_ptr = _tx_timer_created_ptr; + objects_created = _tx_timer_created_count; + objects_examined = ((ULONG) 0); + + while ((objects_examined < objects_created) && (timer_ptr != TX_NULL)) + { + candidate_ptr = (ALIGN_TYPE) timer_ptr; + if (candidate_ptr == object_ptr) + { + status = TX_TRUE; + break; + } + objects_examined++; + timer_ptr = timer_ptr -> tx_timer_created_next; + } + break; + + default: + + /* Not a type the manager authenticates. */ + break; + } + + /* Restore interrupts. */ + TX_RESTORE + + return(status); +} + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_object_id_check PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function determines whether the control block at an object */ +/* start carries the ID of a module object type. The kernel writes */ +/* that ID when it creates an object and clears it when it deletes */ +/* one, so at an address already established to be an object start the */ +/* ID reports both the type and whether the object is still created. */ +/* */ +/* This check must not be used on its own to decide that an address is */ +/* an object. A module can place the value of an ID inside an object */ +/* it legitimately owns, so an ID found at an address the manager has */ +/* not otherwise authenticated proves nothing. */ +/* */ +/* The check matters most where the error checking layer is absent: */ +/* with TX_DISABLE_ERROR_CHECKING the _txe_ services that would */ +/* otherwise test the ID are compiled away, and this is then the only */ +/* ID test between a module and a privileged dereference. */ +/* */ +/* INPUT */ +/* */ +/* object_ptr Address of an object start */ +/* object_type Module object type */ +/* */ +/* OUTPUT */ +/* */ +/* TX_TRUE A created object of that type */ +/* TX_FALSE Anything else */ +/* */ +/* CALLS */ +/* */ +/* None */ +/* */ +/* CALLED BY */ +/* */ +/* _txm_module_manager_param_check_typed_object_for_use */ +/* Module object authentication */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_object_id_check(ALIGN_TYPE object_ptr, UINT object_type) +{ + +TX_INTERRUPT_SAVE_AREA + +ULONG object_id; +ULONG expected_id; +UINT status; + + + /* Read the ID through a pointer to the type the caller named, so that the field + read is the one that type declares rather than an assumed offset. */ + TX_DISABLE + + switch (object_type) + { + + case TXM_BLOCK_POOL_OBJECT: + + object_id = ((TX_BLOCK_POOL *) object_ptr) -> tx_block_pool_id; + expected_id = TX_BLOCK_POOL_ID; + break; + + case TXM_BYTE_POOL_OBJECT: + + object_id = ((TX_BYTE_POOL *) object_ptr) -> tx_byte_pool_id; + expected_id = TX_BYTE_POOL_ID; + break; + + case TXM_EVENT_FLAGS_OBJECT: + + object_id = ((TX_EVENT_FLAGS_GROUP *) object_ptr) -> tx_event_flags_group_id; + expected_id = TX_EVENT_FLAGS_ID; + break; + + case TXM_MUTEX_OBJECT: + + object_id = ((TX_MUTEX *) object_ptr) -> tx_mutex_id; + expected_id = TX_MUTEX_ID; + break; + + case TXM_QUEUE_OBJECT: + + object_id = ((TX_QUEUE *) object_ptr) -> tx_queue_id; + expected_id = TX_QUEUE_ID; + break; + + case TXM_SEMAPHORE_OBJECT: + + object_id = ((TX_SEMAPHORE *) object_ptr) -> tx_semaphore_id; + expected_id = TX_SEMAPHORE_ID; + break; + + case TXM_THREAD_OBJECT: + + object_id = ((TX_THREAD *) object_ptr) -> tx_thread_id; + expected_id = TX_THREAD_ID; + break; + + case TXM_TIMER_OBJECT: + + object_id = ((TX_TIMER *) object_ptr) -> tx_timer_id; + expected_id = TX_TIMER_ID; + break; + + default: + + /* Not a type the manager authenticates. Choose values that cannot match. */ + object_id = TX_CLEAR_ID; + expected_id = ~((ULONG) TX_CLEAR_ID); + break; + } + + /* Restore interrupts. */ + TX_RESTORE + + if (object_id == expected_id) + { + + status = TX_TRUE; + } + else + { + + status = TX_FALSE; + } + + return(status); +} + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _txm_module_manager_live_object_check PORTABLE C */ +/* 6.4.3 */ +/* AUTHOR */ +/* */ +/* Eclipse ThreadX contributors */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function determines whether an address is the exact address */ +/* of a live kernel object of any type the Module Manager knows. */ +/* */ +/* It answers the question object deallocation has to ask before it */ +/* gives memory back: is the kernel still going to use these bytes as */ +/* a control block. Deallocation is told an address and nothing else, */ +/* so unlike the checks a typed service makes it cannot be given the */ +/* type to look for, and every type has to be looked for in turn. */ +/* */ +/* The eight created lists are searched whatever the size of the */ +/* allocation at the address. Skipping a type whose control block is */ +/* larger than the allocation would be sound only if every object had */ +/* been created through a size-checked path, and a module running */ +/* without memory protection creates objects without one. */ +/* */ +/* Each list is searched in its own interrupts-disabled window rather */ +/* than all of them in one, so the longest window is bounded by the */ +/* number of objects of a single type. The whole search costs one pass */ +/* over the objects the system has created, and is paid once per */ +/* object deallocation. */ +/* */ +/* INPUT */ +/* */ +/* object_ptr Address of object memory area */ +/* */ +/* OUTPUT */ +/* */ +/* TX_TRUE A live kernel object is there */ +/* TX_FALSE Anything else */ +/* */ +/* CALLS */ +/* */ +/* _txm_module_manager_created_object_type_check */ +/* Check one kernel created list */ +/* */ +/* CALLED BY */ +/* */ +/* _txm_module_manager_object_deallocate Deallocate object memory */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* xx-xx-2026 Eclipse ThreadX Initial Version 6.4.3 */ +/* contributors */ +/* */ +/**************************************************************************/ +UINT _txm_module_manager_live_object_check(ALIGN_TYPE object_ptr) +{ + +UINT object_type; +UINT status; + + + /* Assume no live object is there. */ + status = TX_FALSE; + + /* The eight module object types that have a kernel created list occupy a + contiguous range, so each is asked in turn by walking the range. A value in + the range that the per-type check does not recognise answers TX_FALSE, so a + type the manager stops knowing does not silently pass this search. */ + for (object_type = ((UINT) TXM_BLOCK_POOL_OBJECT); object_type <= ((UINT) TXM_TIMER_OBJECT); object_type++) + { + + if (_txm_module_manager_created_object_type_check(object_ptr, object_type) == TX_TRUE) + { + + /* An address is the start of at most one object, so there is nothing + further to look for. */ + status = TX_TRUE; + break; + } + } + + return(status); +} + + /**************************************************************************/ /* */ /* FUNCTION RELEASE */ diff --git a/common_modules/module_manager/utilities/module_binary_to_c_array.c b/common_modules/module_manager/utilities/module_binary_to_c_array.c index da0cf97c6..e418fbc13 100644 --- a/common_modules/module_manager/utilities/module_binary_to_c_array.c +++ b/common_modules/module_manager/utilities/module_binary_to_c_array.c @@ -1,3 +1,16 @@ +/***************************************************************************/ +/* Copyright (c) 2024 Microsoft Corporation */ +/* 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. */ +/* */ +/* SPDX-License-Identifier: MIT */ +/***************************************************************************/ + +// Portions of this file were generated with AI assistance. + #include #include #include @@ -25,8 +38,11 @@ unsigned long column; { /* Print an error message out and wait for user key hit. */ - printf("module_binary_to_c_array.exe - Copyright (c) Microsoft Corporation v5.8\n"); - printf("**** Error: invalid input parameter for module_binary_to_c_array.exe **** \n"); + printf("module_binary_to_c_array\n"); + printf("(c) 2024 Microsoft Corp\n"); + printf("(c) 2026 Eclipse ThreadX contributors\n"); + printf("v6.5.2.202603\n"); + printf("**** Error: invalid input parameter for module_binary_to_c_array **** \n"); printf(" Command Line Should be:\n\n"); printf(" > module_binary_to_c_array source_binary_file c_array_file \n\n"); return(1); @@ -57,6 +73,10 @@ unsigned long column; /* Print an error message out and wait for user key hit. */ printf("**** Error: invalid format of binary input file **** \n"); printf(" File: %s ", argv[1]); + + /* Close the source file. */ + fclose(source_file); + return(3); } @@ -75,7 +95,9 @@ unsigned long column; fprintf(array_file, "/**************************** Module-Binary-to-C-array Utility **********************************/\n"); fprintf(array_file, "/* */\n"); - fprintf(array_file, "/* Copyright (c) Microsoft Corporation Version 5.4, build date: 03-01-2018 */\n"); + fprintf(array_file, "/* Copyright (c) 2024 Microsoft Corp */\n"); + fprintf(array_file, "/* Copyright (c) 2026 Eclipse ThreadX contributors */\n"); + fprintf(array_file, "/* v6.5.2.202603 */\n"); fprintf(array_file, "/* */\n"); fprintf(array_file, "/************************************************************************************************/\n\n"); fprintf(array_file, "/* \n"); @@ -109,7 +131,7 @@ unsigned long column; { if (address != 0) fprintf(array_file, ",\n"); - fprintf(array_file, "/* 0x%08X */ 0x%02X", address, (unsigned int) alpha); + fprintf(array_file, "/* 0x%08lX */ 0x%02X", address, (unsigned int) alpha); } else fprintf(array_file, ", 0x%02X", (unsigned int) alpha); diff --git a/common_modules/module_manager/utilities/module_to_binary.c b/common_modules/module_manager/utilities/module_to_binary.c index bb4f294d0..0b159cd78 100644 --- a/common_modules/module_manager/utilities/module_to_binary.c +++ b/common_modules/module_manager/utilities/module_to_binary.c @@ -9,11 +9,25 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +// Portions of this file were generated with AI assistance. + #include #include #include +/* MISRA C:2012 Rule 21.3 and Dir 4.12 deviation: dynamic memory is used in this + file. This is a host-side conversion utility executed on the development + machine, not ThreadX runtime code, and the ELF areas being read have sizes + that are only known at run time. Every allocation result is checked for NULL + and every buffer is released before its pointer is reused. */ + +/* MISRA C:2012 Rule 15.5 (advisory) deviation: main() returns from several + error paths instead of having a single point of exit. The project forbids + goto, so an early return is the only way to abandon the conversion, and this + matches the style already used by the parameter and file open checks. */ + + /* Define the file handles. */ FILE *source_file; @@ -137,13 +151,52 @@ unsigned char *buffer; } +/* Close the files and release the ELF areas allocated by main(). This is called + from every exit path taken after the files have been opened, so it must + tolerate being called with resources that were never acquired. The areas it + releases are the file scope pointers declared above. */ + +static void converter_cleanup(void) +{ + + /* Determine if the source file is open. */ + if (source_file != NULL) + { + + /* Close it. */ + fclose(source_file); + source_file = NULL; + } + + /* Determine if the binary output file is open. */ + if (binary_file != NULL) + { + + /* Close it. */ + fclose(binary_file); + binary_file = NULL; + } + + /* Release the ELF areas. Note that free() is defined to do nothing when it + is supplied a NULL pointer, so no test is required here. */ + free(program_header); + program_header = NULL; + free(section_header); + section_header = NULL; + free(section_string_table); + section_string_table = NULL; + free(code_section_array); + code_section_array = NULL; +} + + int main(int argc, char* argv[]) { unsigned long i, j; -unsigned long current_total; unsigned long address; unsigned long size; +unsigned long allocation_size; unsigned char *code_buffer; unsigned long code_section_index; CODE_SECTION_ENTRY code_section_temp; @@ -155,8 +208,11 @@ unsigned char zero_value; { /* Print an error message out and wait for user key hit. */ - printf("module_to_binary.exe - Copyright (c) Microsoft Corporation v5.8\n"); - printf("**** Error: invalid input parameter for module_to_binary.exe **** \n"); + printf("module_to_binary\n"); + printf("(c) 2024 Microsoft Corp\n"); + printf("(c) 2026 Eclipse ThreadX contributors\n"); + printf("v6.5.2.202603\n"); + printf("**** Error: invalid input parameter for module_to_binary **** \n"); printf(" Command Line Should be:\n\n"); printf(" > module_to_binary source_elf_file c_binary_file \n\n"); return(1); @@ -189,29 +245,140 @@ unsigned char zero_value; } /* Read the ELF header. */ - elf_object_read(0, &header, sizeof(header)); + if (elf_object_read(0, &header, sizeof(header)) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on the ELF header **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Allocate memory for the program header(s). */ - program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries); + allocation_size = sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries; + program_header = malloc(allocation_size); + + /* Determine if the memory allocation was successful. Note that an empty area + is not an error, since malloc() is permitted to return NULL for it. */ + if ((program_header == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the program header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } /* Read the program header(s). */ - elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries)); + if (elf_object_read(header.elf_header_program_header_offset, program_header, allocation_size) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on the program header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Allocate memory for the section header(s). */ - section_header = malloc(sizeof(ELF_SECTION_HEADER)*header.elf_header_section_header_entries); + allocation_size = sizeof(ELF_SECTION_HEADER)*header.elf_header_section_header_entries; + section_header = malloc(allocation_size); + + /* Determine if the memory allocation was successful. */ + if ((section_header == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the section header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } /* Read the section header(s). */ - elf_object_read(header.elf_header_section_header_offset, section_header, (sizeof(ELF_SECTION_HEADER)*header.elf_header_section_header_entries)); + if (elf_object_read(header.elf_header_section_header_offset, section_header, allocation_size) != 0) + { + /* Print an error message out. */ + printf("**** Error: read failed on the section header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } + + /* Determine if the section string table index supplied by the ELF header is + inside the section header area that was just read. */ + if (header.elf_header_section_string_index >= header.elf_header_section_header_entries) + { + + /* Print an error message out. */ + printf("**** Error: invalid section string table index in the ELF header **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Alocate memory for the section string table. */ - section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size); + allocation_size = section_header[header.elf_header_section_string_index].elf_section_header_size; + section_string_table = malloc(allocation_size); + + /* Determine if the memory allocation was successful. */ + if ((section_string_table == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the section string table **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } /* Read the section string table. */ - elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size); + if (elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, allocation_size) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on the section string table **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Allocate memory for the code section array. */ - code_section_array = malloc(sizeof(CODE_SECTION_ENTRY)*header.elf_header_section_header_entries); + allocation_size = sizeof(CODE_SECTION_ENTRY)*header.elf_header_section_header_entries; + code_section_array = malloc(allocation_size); + + /* Determine if the memory allocation was successful. */ + if ((code_section_array == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the code section array **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } + code_section_index = 0; /* Print out the section header(s). */ @@ -258,9 +425,8 @@ unsigned char zero_value; if (code_section_index == 0) { - /* Close files. */ - fclose(source_file); - fclose(binary_file); + /* Close the files and release the ELF areas. */ + converter_cleanup(); return(4); } @@ -310,9 +476,34 @@ unsigned char zero_value; /* Now allocate memory for the code section. */ code_buffer = malloc(code_section_array[i].code_section_size); + /* Determine if the memory allocation was successful. */ + if (code_buffer == NULL) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for code section **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } + /* Read in the code area. */ j = code_section_array[i].code_section_index; - elf_object_read(section_header[j].elf_section_header_offset, code_buffer, code_section_array[i].code_section_size); + if (elf_object_read(section_header[j].elf_section_header_offset, code_buffer, code_section_array[i].code_section_size) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on a code section **** \n"); + + /* Release the code section buffer, then close the files and release + the ELF areas. */ + free(code_buffer); + converter_cleanup(); + + return(6); + } /* Write out the contents of this program area. */ size = code_section_array[i].code_section_size; @@ -333,11 +524,14 @@ unsigned char zero_value; /* Move index into buffer. */ j++; } + + /* Release the code section buffer before the next section is read. */ + free(code_buffer); + code_buffer = NULL; } - /* Close files. */ - fclose(source_file); - fclose(binary_file); + /* Close the files and release the ELF areas. */ + converter_cleanup(); return 0; } diff --git a/common_modules/module_manager/utilities/module_to_c_array.c b/common_modules/module_manager/utilities/module_to_c_array.c index d34724164..72e87de0d 100644 --- a/common_modules/module_manager/utilities/module_to_c_array.c +++ b/common_modules/module_manager/utilities/module_to_c_array.c @@ -9,11 +9,25 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +// Portions of this file were generated with AI assistance. + #include #include #include +/* MISRA C:2012 Rule 21.3 and Dir 4.12 deviation: dynamic memory is used in this + file. This is a host-side conversion utility executed on the development + machine, not ThreadX runtime code, and the ELF areas being read have sizes + that are only known at run time. Every allocation result is checked for NULL + and every buffer is released before its pointer is reused. */ + +/* MISRA C:2012 Rule 15.5 (advisory) deviation: main() returns from several + error paths instead of having a single point of exit. The project forbids + goto, so an early return is the only way to abandon the conversion, and this + matches the style already used by the parameter and file open checks. */ + + /* Define the file handles. */ FILE *source_file; @@ -137,13 +151,52 @@ unsigned char *buffer; } +/* Close the files and release the ELF areas allocated by main(). This is called + from every exit path taken after the files have been opened, so it must + tolerate being called with resources that were never acquired. The areas it + releases are the file scope pointers declared above. */ + +static void converter_cleanup(void) +{ + + /* Determine if the source file is open. */ + if (source_file != NULL) + { + + /* Close it. */ + fclose(source_file); + source_file = NULL; + } + + /* Determine if the C array output file is open. */ + if (array_file != NULL) + { + + /* Close it. */ + fclose(array_file); + array_file = NULL; + } + + /* Release the ELF areas. Note that free() is defined to do nothing when it + is supplied a NULL pointer, so no test is required here. */ + free(program_header); + program_header = NULL; + free(section_header); + section_header = NULL; + free(section_string_table); + section_string_table = NULL; + free(code_section_array); + code_section_array = NULL; +} + + int main(int argc, char* argv[]) { unsigned long i, j, k; -unsigned long current_total; unsigned long address; unsigned long size; +unsigned long allocation_size; unsigned long column; unsigned char *code_buffer; unsigned long code_section_index; @@ -155,8 +208,11 @@ CODE_SECTION_ENTRY code_section_temp; { /* Print an error message out and wait for user key hit. */ - printf("module_to_c_array.exe - Copyright (c) Microsoft Corporation v5.8\n"); - printf("**** Error: invalid input parameter for module_to_c_array.exe **** \n"); + printf("module_to_c_array\n"); + printf("(c) 2024 Microsoft Corp\n"); + printf("(c) 2026 Eclipse ThreadX contributors\n"); + printf("v6.5.2.202603\n"); + printf("**** Error: invalid input parameter for module_to_c_array **** \n"); printf(" Command Line Should be:\n\n"); printf(" > module_to_c_array source_elf_file c_array_file \n\n"); return(1); @@ -189,11 +245,23 @@ CODE_SECTION_ENTRY code_section_temp; } /* Read the ELF header. */ - elf_object_read(0, &header, sizeof(header)); + if (elf_object_read(0, &header, sizeof(header)) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on the ELF header **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } fprintf(array_file, "/**************************** Module-to-C-array Utility *****************************************/\n"); fprintf(array_file, "/* */\n"); - fprintf(array_file, "/* Copyright (c) Microsoft Corporation Version 5.8, build date: 03-01-2018 */\n"); + fprintf(array_file, "/* Copyright (c) 2024 Microsoft Corp */\n"); + fprintf(array_file, "/* Copyright (c) 2026 Eclipse ThreadX contributors */\n"); + fprintf(array_file, "/* v6.5.2.202603 */\n"); fprintf(array_file, "/* */\n"); fprintf(array_file, "/************************************************************************************************/\n\n"); fprintf(array_file, "/* \n"); @@ -202,26 +270,127 @@ CODE_SECTION_ENTRY code_section_temp; fprintf(array_file, "*/\n\n"); /* Allocate memory for the program header(s). */ - program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries); + allocation_size = sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries; + program_header = malloc(allocation_size); + + /* Determine if the memory allocation was successful. Note that an empty area + is not an error, since malloc() is permitted to return NULL for it. */ + if ((program_header == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the program header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } /* Read the program header(s). */ - elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries)); + if (elf_object_read(header.elf_header_program_header_offset, program_header, allocation_size) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on the program header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Allocate memory for the section header(s). */ - section_header = malloc(sizeof(ELF_SECTION_HEADER)*header.elf_header_section_header_entries); + allocation_size = sizeof(ELF_SECTION_HEADER)*header.elf_header_section_header_entries; + section_header = malloc(allocation_size); + + /* Determine if the memory allocation was successful. */ + if ((section_header == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the section header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } /* Read the section header(s). */ - elf_object_read(header.elf_header_section_header_offset, section_header, (sizeof(ELF_SECTION_HEADER)*header.elf_header_section_header_entries)); + if (elf_object_read(header.elf_header_section_header_offset, section_header, allocation_size) != 0) + { + /* Print an error message out. */ + printf("**** Error: read failed on the section header(s) **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } + + /* Determine if the section string table index supplied by the ELF header is + inside the section header area that was just read. */ + if (header.elf_header_section_string_index >= header.elf_header_section_header_entries) + { + + /* Print an error message out. */ + printf("**** Error: invalid section string table index in the ELF header **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Alocate memory for the section string table. */ - section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size); + allocation_size = section_header[header.elf_header_section_string_index].elf_section_header_size; + section_string_table = malloc(allocation_size); + + /* Determine if the memory allocation was successful. */ + if ((section_string_table == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the section string table **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } /* Read the section string table. */ - elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size); + if (elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, allocation_size) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on the section string table **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(6); + } /* Allocate memory for the code section array. */ - code_section_array = malloc(sizeof(CODE_SECTION_ENTRY)*header.elf_header_section_header_entries); + allocation_size = sizeof(CODE_SECTION_ENTRY)*header.elf_header_section_header_entries; + code_section_array = malloc(allocation_size); + + /* Determine if the memory allocation was successful. */ + if ((code_section_array == NULL) && (allocation_size != 0)) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for the code section array **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } + code_section_index = 0; /* Print out the section header(s). */ @@ -272,9 +441,8 @@ CODE_SECTION_ENTRY code_section_temp; fprintf(array_file, "unsigned char module_code[] = {0x00};\n\n"); - /* Close files. */ - fclose(source_file); - fclose(array_file); + /* Close the files and release the ELF areas. */ + converter_cleanup(); return(4); } @@ -321,7 +489,7 @@ CODE_SECTION_ENTRY code_section_temp; /* Print out a character with a leading comma, except on the first character. */ if (column == 0) - fprintf(array_file, "/* 0x%08X */ 0x00", address); + fprintf(array_file, "/* 0x%08lX */ 0x00", address); else fprintf(array_file, ", 0x00"); @@ -342,9 +510,34 @@ CODE_SECTION_ENTRY code_section_temp; /* Now allocate memory for the code section. */ code_buffer = malloc(code_section_array[i].code_section_size); + /* Determine if the memory allocation was successful. */ + if (code_buffer == NULL) + { + + /* Print an error message out. */ + printf("**** Error: memory allocation failed for code section **** \n"); + + /* Close the files and release the ELF areas. */ + converter_cleanup(); + + return(5); + } + /* Read in the code area. */ j = code_section_array[i].code_section_index; - elf_object_read(section_header[j].elf_section_header_offset, code_buffer, code_section_array[i].code_section_size); + if (elf_object_read(section_header[j].elf_section_header_offset, code_buffer, code_section_array[i].code_section_size) != 0) + { + + /* Print an error message out. */ + printf("**** Error: read failed on a code section **** \n"); + + /* Release the code section buffer, then close the files and release + the ELF areas. */ + free(code_buffer); + converter_cleanup(); + + return(6); + } /* Write out the contents of this program area. */ size = code_section_array[i].code_section_size; @@ -356,7 +549,7 @@ CODE_SECTION_ENTRY code_section_temp; /* Print out a character with a leading comma, except on the first character. */ if (column == 0) - fprintf(array_file, "/* 0x%08X */ 0x%02X", address, (unsigned int) code_buffer[j]); + fprintf(array_file, "/* 0x%08lX */ 0x%02X", address, (unsigned int) code_buffer[j]); else fprintf(array_file, ", 0x%02X", (unsigned int) code_buffer[j]); @@ -390,14 +583,17 @@ CODE_SECTION_ENTRY code_section_temp; /* Move index into buffer. */ j++; } + + /* Release the code section buffer before the next section is read. */ + free(code_buffer); + code_buffer = NULL; } /* Finally, finish the C array containing the module code. */ fprintf(array_file, "};\n\n"); - /* Close files. */ - fclose(source_file); - fclose(array_file); + /* Close the files and release the ELF areas. */ + converter_cleanup(); return 0; } diff --git a/common_smp/inc/tx_api.h b/common_smp/inc/tx_api.h index 7d0ccbe54..77bd6218b 100644 --- a/common_smp/inc/tx_api.h +++ b/common_smp/inc/tx_api.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,6 +66,17 @@ extern "C" { #include "tx_port.h" +/* Define the qualifier applied to object name strings. Opting in makes every + object name a pointer to const, which the kernel and its tests are written + for. It is off by default because it changes the type of a public struct + field, and application code that copies a name into a writable pointer stops + compiling. */ +#ifdef TX_ENABLE_CONST_NAMES +#define TX_NAME_CONST const +#else +#define TX_NAME_CONST +#endif + /* If not defined by tx_port.h, default the port-specific memory synchronization macro to whitespace. */ @@ -392,7 +405,7 @@ typedef struct TX_TIMER_STRUCT ULONG tx_timer_id; /* Define the timer's name. */ - CHAR *tx_timer_name; + TX_NAME_CONST CHAR *tx_timer_name; /* Define the actual contents of the timer. This is the block that is used in the actual timer expiration processing. */ @@ -466,7 +479,7 @@ typedef struct TX_THREAD_STRUCT is typically defined to whitespace or a pointer type in tx_port.h. */ TX_THREAD_EXTENSION_0 - CHAR *tx_thread_name; /* Pointer to thread's name */ + TX_NAME_CONST CHAR *tx_thread_name; /* Pointer to thread's name */ UINT tx_thread_priority; /* Priority of thread (0-1023) */ UINT tx_thread_state; /* Thread's execution state */ UINT tx_thread_delayed_suspend; /* Delayed suspend flag */ @@ -632,7 +645,7 @@ typedef struct TX_BLOCK_POOL_STRUCT ULONG tx_block_pool_id; /* Define the block pool's name. */ - CHAR *tx_block_pool_name; + TX_NAME_CONST CHAR *tx_block_pool_name; /* Define the number of available memory blocks in the pool. */ UINT tx_block_pool_available; @@ -710,7 +723,7 @@ typedef struct TX_BYTE_POOL_STRUCT ULONG tx_byte_pool_id; /* Define the byte pool's name. */ - CHAR *tx_byte_pool_name; + TX_NAME_CONST CHAR *tx_byte_pool_name; /* Define the number of available bytes in the pool. */ ULONG tx_byte_pool_available; @@ -789,7 +802,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT ULONG tx_event_flags_group_id; /* Define the event flags group's name. */ - CHAR *tx_event_flags_group_name; + TX_NAME_CONST CHAR *tx_event_flags_group_name; /* Define the actual current event flags in this group. A zero in a particular bit indicates the event flag is not set. */ @@ -875,7 +888,7 @@ typedef struct TX_MUTEX_STRUCT ULONG tx_mutex_id; /* Define the mutex's name. */ - CHAR *tx_mutex_name; + TX_NAME_CONST CHAR *tx_mutex_name; /* Define the mutex ownership count. */ UINT tx_mutex_ownership_count; @@ -948,7 +961,7 @@ typedef struct TX_QUEUE_STRUCT ULONG tx_queue_id; /* Define the queue's name. */ - CHAR *tx_queue_name; + TX_NAME_CONST CHAR *tx_queue_name; /* Define the message size that was specified in queue creation. */ UINT tx_queue_message_size; @@ -1027,7 +1040,7 @@ typedef struct TX_SEMAPHORE_STRUCT ULONG tx_semaphore_id; /* Define the semaphore's name. */ - CHAR *tx_semaphore_name; + TX_NAME_CONST CHAR *tx_semaphore_name; /* Define the actual semaphore count. A zero means that no semaphore instance is available. */ @@ -1530,10 +1543,10 @@ VOID tx_application_define(VOID *first_unused_memory); /* Define block memory pool management function prototypes. */ UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -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); UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -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); UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1548,10 +1561,10 @@ UINT _tx_block_release(VOID *block_ptr); application. */ UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -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); UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -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); UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); @@ -1562,10 +1575,10 @@ UINT _txe_block_release(VOID *block_ptr); UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size); UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -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); UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1581,10 +1594,10 @@ UINT _tx_byte_release(VOID *memory_ptr); UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +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 _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -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); UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); @@ -1593,11 +1606,11 @@ UINT _txe_byte_release(VOID *memory_ptr); /* Define event flags management function prototypes. */ -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); UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -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); UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, @@ -1612,11 +1625,11 @@ UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*e /* Define error checking shells for API services. These are only referenced by the application. */ -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); UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -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); UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, @@ -1631,10 +1644,10 @@ VOID _tx_initialize_kernel_enter(VOID); /* Define mutex management function prototypes. */ -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); UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr); UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -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); UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, @@ -1648,10 +1661,10 @@ UINT _tx_mutex_put(TX_MUTEX *mutex_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -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); UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -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); UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr); @@ -1660,11 +1673,11 @@ UINT _txe_mutex_put(TX_MUTEX *mutex_ptr); /* Define queue management function prototypes. */ -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); UINT _tx_queue_delete(TX_QUEUE *queue_ptr); UINT _tx_queue_flush(TX_QUEUE *queue_ptr); -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); UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts); @@ -1680,11 +1693,11 @@ UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wa /* Define error checking shells for API services. These are only referenced by the application. */ -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); UINT _txe_queue_delete(TX_QUEUE *queue_ptr); UINT _txe_queue_flush(TX_QUEUE *queue_ptr); -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); UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); @@ -1696,10 +1709,10 @@ UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG w /* Define semaphore management function prototypes. */ UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -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); UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -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); UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, @@ -1714,10 +1727,10 @@ UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semapho application. */ UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -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); UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -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); UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); @@ -1729,7 +1742,7 @@ UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaph VOID _tx_thread_context_save(VOID); VOID _tx_thread_context_restore(VOID); -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, @@ -1737,7 +1750,7 @@ UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, UINT _tx_thread_delete(TX_THREAD *thread_ptr); UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); TX_THREAD *_tx_thread_identify(VOID); -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); UINT _tx_thread_interrupt_control(UINT new_posture); @@ -1766,14 +1779,14 @@ UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -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 entry_input), 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); UINT _txe_thread_delete(TX_THREAD *thread_ptr); UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); -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); UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, @@ -1793,12 +1806,12 @@ UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr); UINT _tx_timer_activate(TX_TIMER *timer_ptr); UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -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 input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate); UINT _tx_timer_deactivate(TX_TIMER *timer_ptr); UINT _tx_timer_delete(TX_TIMER *timer_ptr); -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); UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts); @@ -1814,12 +1827,12 @@ VOID _tx_time_set(ULONG new_time); UINT _txe_timer_activate(TX_TIMER *timer_ptr); UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -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 input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txe_timer_deactivate(TX_TIMER *timer_ptr); UINT _txe_timer_delete(TX_TIMER *timer_ptr); -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); @@ -1853,6 +1866,19 @@ UINT _tx_trace_interrupt_control(UINT new_posture); #endif +/* Define the number of consecutive stack fill pattern words the thread stack analyze function must + observe, working towards the lowest address of the stack, before it accepts a probe location as + unused. A value of one restores the original behavior, where a single word that happens to still + hold the fill pattern - an unwritten hole inside an otherwise used region, such as the padding of + a partially initialized local array - can make the binary search stop early and under-report the + stack usage. Larger values make the result more accurate at the cost of a few additional reads + per binary search iteration. This can be re-defined in tx_port.h. */ + +#ifndef TX_THREAD_STACK_ANALYZE_FILL_WORDS +#define TX_THREAD_STACK_ANALYZE_FILL_WORDS ((ULONG) 8) +#endif + + /* Add a default macro that can be re-defined in tx_port.h to add processing to the initialize kernel enter function. By default, this is simply defined as whitespace. */ @@ -1920,7 +1946,8 @@ TX_THREAD *_tx_misra_ulong_to_thread_pointer_convert(ULONG value); VOID *_tx_misra_timer_indirect_to_void_pointer_convert(TX_TIMER_INTERNAL **pointer); CHAR *_tx_misra_const_char_to_char_pointer_convert(const char *pointer); TX_THREAD *_tx_misra_void_to_thread_pointer_convert(VOID *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); +const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *pointer, ULONG amount); VOID _tx_misra_event_flags_group_not_used(TX_EVENT_FLAGS_GROUP *group_ptr); VOID _tx_misra_event_flags_set_notify_not_used(VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); VOID _tx_misra_queue_not_used(TX_QUEUE *queue_ptr); @@ -1932,6 +1959,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #define TX_MEMSET(a,b,c) _tx_misra_memset((a), (UINT) (b), (UINT) (c)) #define TX_UCHAR_POINTER_ADD(a,b) _tx_misra_uchar_pointer_add((UCHAR *) (a), (ULONG) (b)) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) _tx_misra_const_uchar_pointer_add((const UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_SUB(a,b) _tx_misra_uchar_pointer_sub((UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_DIF(a,b) _tx_misra_uchar_pointer_dif((UCHAR *) (a), (UCHAR *) (b)) #define TX_ULONG_POINTER_ADD(a,b) _tx_misra_ulong_pointer_add((ULONG *) (a), (ULONG) (b)) @@ -1992,6 +2020,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_UCHAR_POINTER_ADD(a,b) (((UCHAR *) (a)) + ((UINT) (b))) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) (((const UCHAR *) (a)) + ((UINT) (b))) #define TX_UCHAR_POINTER_SUB(a,b) (((UCHAR *) (a)) - ((UINT) (b))) #define TX_UCHAR_POINTER_DIF(a,b) ((ULONG)(((UCHAR *) (a)) - ((UCHAR *) (b)))) #define TX_ULONG_POINTER_ADD(a,b) (((ULONG *) (a)) + ((UINT) (b))) @@ -2039,7 +2068,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT(a) ((CHAR *) ((VOID *) (a))) #define TX_VOID_TO_THREAD_POINTER_CONVERT(a) ((TX_THREAD *) ((VOID *) (a))) -#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) +#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((const UCHAR *) ((const VOID *) (a))) #ifndef TX_EVENT_FLAGS_GROUP_NOT_USED #define TX_EVENT_FLAGS_GROUP_NOT_USED(a) ((void)(a)) #endif @@ -2330,4 +2359,3 @@ void __ghs_rnerr(char *errMsg, int stackLevels, int stackTraceDisplay, void *hex #endif #endif - diff --git a/common_smp/inc/tx_thread.h b/common_smp/inc/tx_thread.h index 7dc7801be..1ffe88287 100644 --- a/common_smp/inc/tx_thread.h +++ b/common_smp/inc/tx_thread.h @@ -9,6 +9,7 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. /**************************************************************************/ /**************************************************************************/ @@ -82,7 +83,7 @@ _tx_thread_stack_error_handler((thread_ptr)); \ TX_DISABLE \ } \ - if (*(((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr) - 1) != TX_STACK_FILL) \ + else if (*(((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr) - 1) != TX_STACK_FILL) \ { \ TX_RESTORE \ _tx_thread_stack_analyze((thread_ptr)); \ @@ -1171,6 +1172,11 @@ TX_THREAD *last_thread; TX_THREAD *thread_remap_list[TX_THREAD_SMP_MAX_CORES]; + /* Limit the supplied core maps to the cores that are actually present. */ + available_cores = available_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK); + thread_possible_cores = thread_possible_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK); + test_possible_cores = test_possible_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK); + /* Clear the last thread cores in the search. */ last_thread_cores = ((ULONG) 0); @@ -1181,6 +1187,9 @@ TX_THREAD *thread_remap_list[TX_THREAD_SMP_MAX_CORES]; queue_first = ((UINT) 0); queue_last = ((UINT) 0); + /* Initialize the first core queue entry. */ + core_queue[0] = ((UINT) 0); + /* Build a list of possible cores for this thread to execute on, starting with the previously mapped core. */ core = schedule_thread -> tx_thread_smp_core_mapped; diff --git a/common_smp/inc/tx_trace.h b/common_smp/inc/tx_trace.h index ea0e59e56..2f4447d40 100644 --- a/common_smp/inc/tx_trace.h +++ b/common_smp/inc/tx_trace.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -452,7 +454,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) \ @@ -515,7 +517,7 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start /* 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); diff --git a/common_smp/inc/tx_user_sample.h b/common_smp/inc/tx_user_sample.h index 64ff9aedb..1514a0dbe 100644 --- a/common_smp/inc/tx_user_sample.h +++ b/common_smp/inc/tx_user_sample.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -100,6 +102,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. @@ -288,4 +296,3 @@ */ #endif - diff --git a/common_smp/src/tx_block_pool_create.c b/common_smp/src/tx_block_pool_create.c index 1d2c803cf..8781dc789 100644 --- a/common_smp/src/tx_block_pool_create.c +++ b/common_smp/src/tx_block_pool_create.c @@ -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) { diff --git a/common_smp/src/tx_block_pool_info_get.c b/common_smp/src/tx_block_pool_info_get.c index 5998f1db4..5e1e89fdd 100644 --- a/common_smp/src/tx_block_pool_info_get.c +++ b/common_smp/src/tx_block_pool_info_get.c @@ -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) { diff --git a/common_smp/src/tx_byte_pool_create.c b/common_smp/src/tx_byte_pool_create.c index 21abbe356..f5c8460dc 100644 --- a/common_smp/src/tx_byte_pool_create.c +++ b/common_smp/src/tx_byte_pool_create.c @@ -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 diff --git a/common_smp/src/tx_byte_pool_info_get.c b/common_smp/src/tx_byte_pool_info_get.c index bd0964407..e9e9efa48 100644 --- a/common_smp/src/tx_byte_pool_info_get.c +++ b/common_smp/src/tx_byte_pool_info_get.c @@ -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) { diff --git a/common_smp/src/tx_event_flags_create.c b/common_smp/src/tx_event_flags_create.c index 2a9c042d6..361fafa44 100644 --- a/common_smp/src/tx_event_flags_create.c +++ b/common_smp/src/tx_event_flags_create.c @@ -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 diff --git a/common_smp/src/tx_event_flags_info_get.c b/common_smp/src/tx_event_flags_info_get.c index 21e85c9a1..51ec345fa 100644 --- a/common_smp/src/tx_event_flags_info_get.c +++ b/common_smp/src/tx_event_flags_info_get.c @@ -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) { diff --git a/common_smp/src/tx_misra.c b/common_smp/src/tx_misra.c index f5dd5f53d..b9144a70c 100644 --- a/common_smp/src/tx_misra.c +++ b/common_smp/src/tx_misra.c @@ -47,7 +47,7 @@ /**************************************************************************/ VOID _tx_misra_memset(VOID *ptr, UINT value, UINT size) { - memset(ptr, value, size); + memset(ptr, (INT)value, size); } @@ -91,7 +91,7 @@ ULONG _tx_misra_uchar_pointer_dif(UCHAR *ptr1, UCHAR *ptr2) ULONG value; - value = ptr1 - ptr2; + value = (ULONG)(ptr1 - ptr2); return(value); } @@ -149,7 +149,7 @@ ULONG _tx_misra_ulong_pointer_dif(ULONG *ptr1, ULONG *ptr2) { ULONG value; - value = ptr1 - ptr2; + value = (ULONG)(ptr1 - ptr2); return(value); } @@ -219,7 +219,7 @@ ULONG _tx_misra_timer_pointer_dif(TX_TIMER_INTERNAL **ptr1, TX_TIMER_INTERNAL * ULONG value; - value = ptr1 - ptr2; + value = (ULONG)(ptr1 - ptr2); return(value); } @@ -625,6 +625,8 @@ TX_MUTEX *_tx_misra_void_to_mutex_pointer_convert(VOID *pointer) UINT _tx_misra_status_get(UINT status) { + (VOID)status; + /* Return a successful status. */ return(TX_SUCCESS); } @@ -817,15 +819,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); } diff --git a/common_smp/src/tx_mutex_create.c b/common_smp/src/tx_mutex_create.c index 436c01f50..a1f5eba85 100644 --- a/common_smp/src/tx_mutex_create.c +++ b/common_smp/src/tx_mutex_create.c @@ -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 diff --git a/common_smp/src/tx_mutex_info_get.c b/common_smp/src/tx_mutex_info_get.c index a24d1e30e..3be2606bb 100644 --- a/common_smp/src/tx_mutex_info_get.c +++ b/common_smp/src/tx_mutex_info_get.c @@ -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) { diff --git a/common_smp/src/tx_queue_create.c b/common_smp/src/tx_queue_create.c index 59ae154e4..afb5648d5 100644 --- a/common_smp/src/tx_queue_create.c +++ b/common_smp/src/tx_queue_create.c @@ -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) { diff --git a/common_smp/src/tx_queue_info_get.c b/common_smp/src/tx_queue_info_get.c index d0ecb2b65..e25da54ef 100644 --- a/common_smp/src/tx_queue_info_get.c +++ b/common_smp/src/tx_queue_info_get.c @@ -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) { diff --git a/common_smp/src/tx_semaphore_create.c b/common_smp/src/tx_semaphore_create.c index 849f5d3b5..14553ca8d 100644 --- a/common_smp/src/tx_semaphore_create.c +++ b/common_smp/src/tx_semaphore_create.c @@ -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 diff --git a/common_smp/src/tx_semaphore_info_get.c b/common_smp/src/tx_semaphore_info_get.c index 89fd94238..2ffad1f7e 100644 --- a/common_smp/src/tx_semaphore_info_get.c +++ b/common_smp/src/tx_semaphore_info_get.c @@ -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) { diff --git a/common_smp/src/tx_thread_create.c b/common_smp/src/tx_thread_create.c index 28a1dae1b..3b158f475 100644 --- a/common_smp/src/tx_thread_create.c +++ b/common_smp/src/tx_thread_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -77,7 +79,7 @@ /* _tx_timer_initialize Create system timer thread */ /* */ /**************************************************************************/ -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +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,19 +95,27 @@ 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 @@ -122,7 +132,7 @@ ALIGN_TYPE updated_stack_start; stack_size = ((stack_size/(sizeof(ULONG))) * (sizeof(ULONG))) - (sizeof(ULONG)); /* Ensure the starting stack address is evenly aligned. */ - new_stack_start = TX_POINTER_TO_ALIGN_TYPE_CONVERT(stack_start); + new_stack_start = (ALIGN_TYPE) ((VOID *) stack_start); updated_stack_start = (((new_stack_start) + ((sizeof(ULONG)) - ((ULONG) 1)) ) & (~((sizeof(ULONG)) - ((ULONG) 1)))); /* Determine if the starting stack address is different. */ @@ -134,7 +144,7 @@ ALIGN_TYPE updated_stack_start; } /* Update the starting stack pointer. */ - stack_start = TX_ALIGN_TYPE_TO_POINTER_CONVERT(updated_stack_start); + stack_start = (VOID *) ((ALIGN_TYPE) updated_stack_start); #endif /* Prepare the thread control block prior to placing it on the created @@ -143,6 +153,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; diff --git a/common_smp/src/tx_thread_delete.c b/common_smp/src/tx_thread_delete.c index 510f6565e..5bbb12c36 100644 --- a/common_smp/src/tx_thread_delete.c +++ b/common_smp/src/tx_thread_delete.c @@ -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) { diff --git a/common_smp/src/tx_thread_info_get.c b/common_smp/src/tx_thread_info_get.c index 740a3b95d..cd0df6ec8 100644 --- a/common_smp/src/tx_thread_info_get.c +++ b/common_smp/src/tx_thread_info_get.c @@ -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) { diff --git a/common_smp/src/tx_thread_relinquish.c b/common_smp/src/tx_thread_relinquish.c index 10982b264..f07d2b56d 100644 --- a/common_smp/src/tx_thread_relinquish.c +++ b/common_smp/src/tx_thread_relinquish.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. + /**************************************************************************/ /**************************************************************************/ @@ -290,8 +292,10 @@ UINT finished; } } while ((next_thread != thread_ptr) && (finished == TX_FALSE)); - /* Determine if we are finished. */ - if (finished == TX_FALSE) + /* Determine if we are finished. A rebalance request means the loop stopped + at a thread it could not place rather than running out of threads, so the + execute list still has to be rebuilt and this is not that case. */ + if ((finished == TX_FALSE) && (rebalance == TX_FALSE)) { /* No other thread is ready at this priority... simply return. */ diff --git a/common_smp/src/tx_thread_reset.c b/common_smp/src/tx_thread_reset.c index da56daf57..8e59f1e7e 100644 --- a/common_smp/src/tx_thread_reset.c +++ b/common_smp/src/tx_thread_reset.c @@ -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? */ diff --git a/common_smp/src/tx_thread_shell_entry.c b/common_smp/src/tx_thread_shell_entry.c index 45fe9d6da..2a16a00b6 100644 --- a/common_smp/src/tx_thread_shell_entry.c +++ b/common_smp/src/tx_thread_shell_entry.c @@ -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)); diff --git a/common_smp/src/tx_thread_sleep.c b/common_smp/src/tx_thread_sleep.c index fd986a0b6..9e3a0afdf 100644 --- a/common_smp/src/tx_thread_sleep.c +++ b/common_smp/src/tx_thread_sleep.c @@ -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); diff --git a/common_smp/src/tx_thread_smp_utilities.c b/common_smp/src/tx_thread_smp_utilities.c index 833a9aab4..0569a8192 100644 --- a/common_smp/src/tx_thread_smp_utilities.c +++ b/common_smp/src/tx_thread_smp_utilities.c @@ -9,6 +9,7 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. /**************************************************************************/ /**************************************************************************/ @@ -654,6 +655,11 @@ TX_THREAD *last_thread; TX_THREAD *thread_remap_list[TX_THREAD_SMP_MAX_CORES]; + /* Limit the supplied core maps to the cores that are actually present. */ + available_cores = available_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK); + thread_possible_cores = thread_possible_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK); + test_possible_cores = test_possible_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK); + /* Clear the last thread cores in the search. */ last_thread_cores = ((ULONG) 0); @@ -664,6 +670,9 @@ TX_THREAD *thread_remap_list[TX_THREAD_SMP_MAX_CORES]; queue_first = ((UINT) 0); queue_last = ((UINT) 0); + /* Initialize the first core queue entry. */ + core_queue[0] = ((UINT) 0); + /* Build a list of possible cores for this thread to execute on, starting with the previously mapped core. */ core = schedule_thread -> tx_thread_smp_core_mapped; diff --git a/common_smp/src/tx_thread_stack_analyze.c b/common_smp/src/tx_thread_stack_analyze.c index 080d00522..ecd7ee13b 100644 --- a/common_smp/src/tx_thread_stack_analyze.c +++ b/common_smp/src/tx_thread_stack_analyze.c @@ -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. */ diff --git a/common_smp/src/tx_thread_terminate.c b/common_smp/src/tx_thread_terminate.c index 86e34baeb..c87efaa0d 100644 --- a/common_smp/src/tx_thread_terminate.c +++ b/common_smp/src/tx_thread_terminate.c @@ -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--; diff --git a/common_smp/src/tx_timer_create.c b/common_smp/src/tx_timer_create.c index 73fa67cd6..81af4c9b7 100644 --- a/common_smp/src/tx_timer_create.c +++ b/common_smp/src/tx_timer_create.c @@ -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_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) { diff --git a/common_smp/src/tx_timer_info_get.c b/common_smp/src/tx_timer_info_get.c index 31c801f9b..0811b5929 100644 --- a/common_smp/src/tx_timer_info_get.c +++ b/common_smp/src/tx_timer_info_get.c @@ -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) { diff --git a/common_smp/src/tx_trace_object_register.c b/common_smp/src/tx_trace_object_register.c index f7cd4a4a1..a2a1e0b4d 100644 --- a/common_smp/src/tx_trace_object_register.c +++ b/common_smp/src/tx_trace_object_register.c @@ -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; } diff --git a/common_smp/src/txe_block_pool_create.c b/common_smp/src/txe_block_pool_create.c index 08ef7e69d..b4c7e13fe 100644 --- a/common_smp/src/txe_block_pool_create.c +++ b/common_smp/src/txe_block_pool_create.c @@ -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) { diff --git a/common_smp/src/txe_block_pool_info_get.c b/common_smp/src/txe_block_pool_info_get.c index f91ca2060..4c6003d75 100644 --- a/common_smp/src/txe_block_pool_info_get.c +++ b/common_smp/src/txe_block_pool_info_get.c @@ -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) { diff --git a/common_smp/src/txe_byte_pool_create.c b/common_smp/src/txe_byte_pool_create.c index 99a896981..9ae72ee99 100644 --- a/common_smp/src/txe_byte_pool_create.c +++ b/common_smp/src/txe_byte_pool_create.c @@ -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 diff --git a/common_smp/src/txe_byte_pool_info_get.c b/common_smp/src/txe_byte_pool_info_get.c index 85e7a233a..a83c907bc 100644 --- a/common_smp/src/txe_byte_pool_info_get.c +++ b/common_smp/src/txe_byte_pool_info_get.c @@ -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) { diff --git a/common_smp/src/txe_event_flags_create.c b/common_smp/src/txe_event_flags_create.c index 4e3fed773..209847381 100644 --- a/common_smp/src/txe_event_flags_create.c +++ b/common_smp/src/txe_event_flags_create.c @@ -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 diff --git a/common_smp/src/txe_event_flags_info_get.c b/common_smp/src/txe_event_flags_info_get.c index e551d025c..d7bddca4e 100644 --- a/common_smp/src/txe_event_flags_info_get.c +++ b/common_smp/src/txe_event_flags_info_get.c @@ -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) { diff --git a/common_smp/src/txe_mutex_create.c b/common_smp/src/txe_mutex_create.c index 392f8b0ed..a04612949 100644 --- a/common_smp/src/txe_mutex_create.c +++ b/common_smp/src/txe_mutex_create.c @@ -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 diff --git a/common_smp/src/txe_mutex_info_get.c b/common_smp/src/txe_mutex_info_get.c index f4ef4168c..93b43f91a 100644 --- a/common_smp/src/txe_mutex_info_get.c +++ b/common_smp/src/txe_mutex_info_get.c @@ -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) { diff --git a/common_smp/src/txe_queue_create.c b/common_smp/src/txe_queue_create.c index 387eacb66..ca3b85312 100644 --- a/common_smp/src/txe_queue_create.c +++ b/common_smp/src/txe_queue_create.c @@ -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) { diff --git a/common_smp/src/txe_queue_info_get.c b/common_smp/src/txe_queue_info_get.c index 78d983924..90fdd4108 100644 --- a/common_smp/src/txe_queue_info_get.c +++ b/common_smp/src/txe_queue_info_get.c @@ -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) { diff --git a/common_smp/src/txe_semaphore_create.c b/common_smp/src/txe_semaphore_create.c index a190b03c0..d538f5fe1 100644 --- a/common_smp/src/txe_semaphore_create.c +++ b/common_smp/src/txe_semaphore_create.c @@ -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 diff --git a/common_smp/src/txe_semaphore_info_get.c b/common_smp/src/txe_semaphore_info_get.c index 7695028e4..85747dc32 100644 --- a/common_smp/src/txe_semaphore_info_get.c +++ b/common_smp/src/txe_semaphore_info_get.c @@ -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) { diff --git a/common_smp/src/txe_thread_create.c b/common_smp/src/txe_thread_create.c index d319bc9e2..cc5033b29 100644 --- a/common_smp/src/txe_thread_create.c +++ b/common_smp/src/txe_thread_create.c @@ -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, diff --git a/common_smp/src/txe_thread_info_get.c b/common_smp/src/txe_thread_info_get.c index ad1db3f7f..19e248ebf 100644 --- a/common_smp/src/txe_thread_info_get.c +++ b/common_smp/src/txe_thread_info_get.c @@ -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) { diff --git a/common_smp/src/txe_timer_change.c b/common_smp/src/txe_timer_change.c index ef503ffa8..7f6d6a36b 100644 --- a/common_smp/src/txe_timer_change.c +++ b/common_smp/src/txe_timer_change.c @@ -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 { diff --git a/common_smp/src/txe_timer_create.c b/common_smp/src/txe_timer_create.c index 02cf7c1aa..8c481bde8 100644 --- a/common_smp/src/txe_timer_create.c +++ b/common_smp/src/txe_timer_create.c @@ -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) { diff --git a/common_smp/src/txe_timer_info_get.c b/common_smp/src/txe_timer_info_get.c index 16ac5f64a..be2e9a13c 100644 --- a/common_smp/src/txe_timer_info_get.c +++ b/common_smp/src/txe_timer_info_get.c @@ -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) { diff --git a/ctest-all.log b/ctest-all.log new file mode 100644 index 000000000..51a050e1e --- /dev/null +++ b/ctest-all.log @@ -0,0 +1,220 @@ +Test project /tmp/claude-1000/-home-fdesbiens-652/bc81907a-b0a7-43d2-b3f5-83c3cfaa53e2/scratchpad/mm/test/tx/cmake/build/default_build_coverage + Start 1: default_build_coverage::threadx_block_memory_basic_test + 1/107 Test #1: default_build_coverage::threadx_block_memory_basic_test ............................. Passed 0.08 sec + Start 2: default_build_coverage::threadx_block_memory_error_detection_test + 2/107 Test #2: default_build_coverage::threadx_block_memory_error_detection_test ................... Passed 0.01 sec + Start 3: default_build_coverage::threadx_block_memory_information_test + 3/107 Test #3: default_build_coverage::threadx_block_memory_information_test ....................... Passed 0.02 sec + Start 4: default_build_coverage::threadx_block_memory_prioritize_test + 4/107 Test #4: default_build_coverage::threadx_block_memory_prioritize_test ........................ Passed 0.03 sec + Start 5: default_build_coverage::threadx_block_memory_suspension_test + 5/107 Test #5: default_build_coverage::threadx_block_memory_suspension_test ........................ Passed 0.01 sec + Start 6: default_build_coverage::threadx_block_memory_suspension_timeout_test + 6/107 Test #6: default_build_coverage::threadx_block_memory_suspension_timeout_test ................ Passed 0.65 sec + Start 7: default_build_coverage::threadx_block_memory_thread_terminate_test + 7/107 Test #7: default_build_coverage::threadx_block_memory_thread_terminate_test .................. Passed 0.01 sec + Start 8: default_build_coverage::threadx_byte_memory_basic_test + 8/107 Test #8: default_build_coverage::threadx_byte_memory_basic_test .............................. Passed 0.03 sec + Start 9: default_build_coverage::threadx_byte_memory_information_test + 9/107 Test #9: default_build_coverage::threadx_byte_memory_information_test ........................ Passed 0.02 sec + Start 10: default_build_coverage::threadx_byte_memory_prioritize_test + 10/107 Test #10: default_build_coverage::threadx_byte_memory_prioritize_test ......................... Passed 0.03 sec + Start 11: default_build_coverage::threadx_byte_memory_suspension_test + 11/107 Test #11: default_build_coverage::threadx_byte_memory_suspension_test ......................... Passed 0.01 sec + Start 12: default_build_coverage::threadx_byte_memory_suspension_timeout_test + 12/107 Test #12: default_build_coverage::threadx_byte_memory_suspension_timeout_test ................. Passed 0.65 sec + Start 13: default_build_coverage::threadx_byte_memory_thread_contention_test + 13/107 Test #13: default_build_coverage::threadx_byte_memory_thread_contention_test .................. Passed 1.36 sec + Start 14: default_build_coverage::threadx_byte_memory_thread_terminate_test + 14/107 Test #14: default_build_coverage::threadx_byte_memory_thread_terminate_test ................... Passed 0.01 sec + Start 15: default_build_coverage::threadx_event_flag_basic_test + 15/107 Test #15: default_build_coverage::threadx_event_flag_basic_test ............................... Passed 0.07 sec + Start 16: default_build_coverage::threadx_event_flag_information_test + 16/107 Test #16: default_build_coverage::threadx_event_flag_information_test ......................... Passed 0.01 sec + Start 17: default_build_coverage::threadx_event_flag_isr_set_clear_test + 17/107 Test #17: default_build_coverage::threadx_event_flag_isr_set_clear_test ....................... Passed 0.91 sec + Start 18: default_build_coverage::threadx_event_flag_isr_wait_abort_test + 18/107 Test #18: default_build_coverage::threadx_event_flag_isr_wait_abort_test ...................... Passed 0.81 sec + Start 19: default_build_coverage::threadx_event_flag_single_thread_terminate_test + 19/107 Test #19: default_build_coverage::threadx_event_flag_single_thread_terminate_test ............. Passed 0.31 sec + Start 20: default_build_coverage::threadx_event_flag_suspension_consume_test + 20/107 Test #20: default_build_coverage::threadx_event_flag_suspension_consume_test .................. Passed 0.01 sec + Start 21: default_build_coverage::threadx_event_flag_suspension_different_bits_consume_test + 21/107 Test #21: default_build_coverage::threadx_event_flag_suspension_different_bits_consume_test ... Passed 0.01 sec + Start 22: default_build_coverage::threadx_event_flag_suspension_different_bits_test + 22/107 Test #22: default_build_coverage::threadx_event_flag_suspension_different_bits_test ........... Passed 0.01 sec + Start 23: default_build_coverage::threadx_event_flag_suspension_test + 23/107 Test #23: default_build_coverage::threadx_event_flag_suspension_test .......................... Passed 0.01 sec + Start 24: default_build_coverage::threadx_event_flag_suspension_timeout_test + 24/107 Test #24: default_build_coverage::threadx_event_flag_suspension_timeout_test .................. Passed 0.68 sec + Start 25: default_build_coverage::threadx_event_flag_thread_terminate_test + 25/107 Test #25: default_build_coverage::threadx_event_flag_thread_terminate_test .................... Passed 0.01 sec + Start 26: default_build_coverage::threadx_interrupt_control_test + 26/107 Test #26: default_build_coverage::threadx_interrupt_control_test .............................. Passed 0.03 sec + Start 27: default_build_coverage::threadx_mutex_basic_test + 27/107 Test #27: default_build_coverage::threadx_mutex_basic_test .................................... Passed 0.09 sec + Start 28: default_build_coverage::threadx_mutex_delete_test + 28/107 Test #28: default_build_coverage::threadx_mutex_delete_test ................................... Passed 0.01 sec + Start 29: default_build_coverage::threadx_mutex_information_test + 29/107 Test #29: default_build_coverage::threadx_mutex_information_test .............................. Passed 0.01 sec + Start 30: default_build_coverage::threadx_mutex_nested_priority_inheritance_test + 30/107 Test #30: default_build_coverage::threadx_mutex_nested_priority_inheritance_test .............. Passed 0.10 sec + Start 31: default_build_coverage::threadx_mutex_no_preemption_test + 31/107 Test #31: default_build_coverage::threadx_mutex_no_preemption_test ............................ Passed 0.01 sec + Start 32: default_build_coverage::threadx_mutex_preemption_test + 32/107 Test #32: default_build_coverage::threadx_mutex_preemption_test ............................... Passed 0.01 sec + Start 33: default_build_coverage::threadx_mutex_priority_inheritance_test + 33/107 Test #33: default_build_coverage::threadx_mutex_priority_inheritance_test ..................... Passed 0.21 sec + Start 34: default_build_coverage::threadx_mutex_proritize_test + 34/107 Test #34: default_build_coverage::threadx_mutex_proritize_test ................................ Passed 0.03 sec + Start 35: default_build_coverage::threadx_mutex_suspension_timeout_test + 35/107 Test #35: default_build_coverage::threadx_mutex_suspension_timeout_test ....................... Passed 0.37 sec + Start 36: default_build_coverage::threadx_mutex_thread_terminate_test + 36/107 Test #36: default_build_coverage::threadx_mutex_thread_terminate_test ......................... Passed 0.01 sec + Start 37: default_build_coverage::threadx_queue_basic_eight_word_test + 37/107 Test #37: default_build_coverage::threadx_queue_basic_eight_word_test ......................... Passed 0.00 sec + Start 38: default_build_coverage::threadx_queue_basic_four_word_test + 38/107 Test #38: default_build_coverage::threadx_queue_basic_four_word_test .......................... Passed 0.00 sec + Start 39: default_build_coverage::threadx_queue_basic_one_word_test + 39/107 Test #39: default_build_coverage::threadx_queue_basic_one_word_test ........................... Passed 0.07 sec + Start 40: default_build_coverage::threadx_queue_basic_sixteen_word_test + 40/107 Test #40: default_build_coverage::threadx_queue_basic_sixteen_word_test ....................... Passed 0.01 sec + Start 41: default_build_coverage::threadx_queue_basic_two_word_test + 41/107 Test #41: default_build_coverage::threadx_queue_basic_two_word_test ........................... Passed 0.00 sec + Start 42: default_build_coverage::threadx_queue_basic_max_message_size_test + 42/107 Test #42: default_build_coverage::threadx_queue_basic_max_message_size_test ................... Passed 0.00 sec + Start 43: default_build_coverage::threadx_queue_empty_suspension_test + 43/107 Test #43: default_build_coverage::threadx_queue_empty_suspension_test ......................... Passed 0.01 sec + Start 44: default_build_coverage::threadx_queue_flush_no_suspension_test + 44/107 Test #44: default_build_coverage::threadx_queue_flush_no_suspension_test ...................... Passed 0.00 sec + Start 45: default_build_coverage::threadx_queue_flush_test + 45/107 Test #45: default_build_coverage::threadx_queue_flush_test .................................... Passed 0.01 sec + Start 46: default_build_coverage::threadx_queue_front_send_test + 46/107 Test #46: default_build_coverage::threadx_queue_front_send_test ............................... Passed 0.01 sec + Start 47: default_build_coverage::threadx_queue_full_suspension_test + 47/107 Test #47: default_build_coverage::threadx_queue_full_suspension_test .......................... Passed 0.01 sec + Start 48: default_build_coverage::threadx_queue_information_test + 48/107 Test #48: default_build_coverage::threadx_queue_information_test .............................. Passed 0.00 sec + Start 49: default_build_coverage::threadx_queue_prioritize + 49/107 Test #49: default_build_coverage::threadx_queue_prioritize .................................... Passed 0.03 sec + Start 50: default_build_coverage::threadx_queue_suspension_timeout_test + 50/107 Test #50: default_build_coverage::threadx_queue_suspension_timeout_test ....................... Passed 0.36 sec + Start 51: default_build_coverage::threadx_queue_thread_terminate_test + 51/107 Test #51: default_build_coverage::threadx_queue_thread_terminate_test ......................... Passed 0.01 sec + Start 52: default_build_coverage::threadx_semaphore_basic_test + 52/107 Test #52: default_build_coverage::threadx_semaphore_basic_test ................................ Passed 0.07 sec + Start 53: default_build_coverage::threadx_semaphore_ceiling_put_test + 53/107 Test #53: default_build_coverage::threadx_semaphore_ceiling_put_test .......................... Passed 0.01 sec + Start 54: default_build_coverage::threadx_semaphore_delete_test + 54/107 Test #54: default_build_coverage::threadx_semaphore_delete_test ............................... Passed 0.01 sec + Start 55: default_build_coverage::threadx_semaphore_information_test + 55/107 Test #55: default_build_coverage::threadx_semaphore_information_test .......................... Passed 0.00 sec + Start 56: default_build_coverage::threadx_semaphore_non_preemption_test + 56/107 Test #56: default_build_coverage::threadx_semaphore_non_preemption_test ....................... Passed 0.01 sec + Start 57: default_build_coverage::threadx_semaphore_preemption_test + 57/107 Test #57: default_build_coverage::threadx_semaphore_preemption_test ........................... Passed 0.01 sec + Start 58: default_build_coverage::threadx_semaphore_prioritize + 58/107 Test #58: default_build_coverage::threadx_semaphore_prioritize ................................ Passed 0.03 sec + Start 59: default_build_coverage::threadx_semaphore_thread_terminate_test + 59/107 Test #59: default_build_coverage::threadx_semaphore_thread_terminate_test ..................... Passed 0.01 sec + Start 60: default_build_coverage::threadx_semaphore_timeout_test + 60/107 Test #60: default_build_coverage::threadx_semaphore_timeout_test .............................. Passed 0.36 sec + Start 61: default_build_coverage::threadx_thread_basic_execution_test + 61/107 Test #61: default_build_coverage::threadx_thread_basic_execution_test ......................... Passed 0.05 sec + Start 62: default_build_coverage::threadx_thread_basic_time_slice_test + 62/107 Test #62: default_build_coverage::threadx_thread_basic_time_slice_test ........................ Passed 0.20 sec + Start 63: default_build_coverage::threadx_thread_completed_test + 63/107 Test #63: default_build_coverage::threadx_thread_completed_test ............................... Passed 0.02 sec + Start 64: default_build_coverage::threadx_thread_create_preemption_threshold_test + 64/107 Test #64: default_build_coverage::threadx_thread_create_preemption_threshold_test ............. Passed 0.03 sec + Start 65: default_build_coverage::threadx_thread_delayed_suspension_test + 65/107 Test #65: default_build_coverage::threadx_thread_delayed_suspension_test ...................... Passed 7.26 sec + Start 66: default_build_coverage::threadx_thread_information_test + 66/107 Test #66: default_build_coverage::threadx_thread_information_test ............................. Passed 0.01 sec + Start 67: default_build_coverage::threadx_thread_misaligned_stack_test + 67/107 Test #67: default_build_coverage::threadx_thread_misaligned_stack_test ........................ Passed 0.06 sec + Start 68: default_build_coverage::threadx_thread_multi_level_preemption_threshold_test + 68/107 Test #68: default_build_coverage::threadx_thread_multi_level_preemption_threshold_test ........ Passed 0.02 sec + Start 69: default_build_coverage::threadx_thread_multiple_non_current_test + 69/107 Test #69: default_build_coverage::threadx_thread_multiple_non_current_test .................... Passed 0.01 sec + Start 70: default_build_coverage::threadx_thread_multiple_sleep_test + 70/107 Test #70: default_build_coverage::threadx_thread_multiple_sleep_test .......................... Passed 1.02 sec + Start 71: default_build_coverage::threadx_thread_multiple_suspension_test + 71/107 Test #71: default_build_coverage::threadx_thread_multiple_suspension_test ..................... Passed 0.01 sec + Start 72: default_build_coverage::threadx_thread_multiple_time_slice_test + 72/107 Test #72: default_build_coverage::threadx_thread_multiple_time_slice_test ..................... Passed 0.54 sec + Start 73: default_build_coverage::threadx_thread_preemptable_suspension_test + 73/107 Test #73: default_build_coverage::threadx_thread_preemptable_suspension_test .................. Passed 0.01 sec + Start 74: default_build_coverage::threadx_thread_preemption_change_test + 74/107 Test #74: default_build_coverage::threadx_thread_preemption_change_test ....................... Passed 0.01 sec + Start 75: default_build_coverage::threadx_thread_priority_change + 75/107 Test #75: default_build_coverage::threadx_thread_priority_change .............................. Passed 0.18 sec + Start 76: default_build_coverage::threadx_thread_relinquish_test + 76/107 Test #76: default_build_coverage::threadx_thread_relinquish_test .............................. Passed 0.01 sec + Start 77: default_build_coverage::threadx_thread_reset_test + 77/107 Test #77: default_build_coverage::threadx_thread_reset_test ................................... Passed 0.01 sec + Start 78: default_build_coverage::threadx_thread_simple_sleep_non_clear_test + 78/107 Test #78: default_build_coverage::threadx_thread_simple_sleep_non_clear_test .................. Passed 0.20 sec + Start 79: default_build_coverage::threadx_thread_simple_sleep_test + 79/107 Test #79: default_build_coverage::threadx_thread_simple_sleep_test ............................ Passed 0.19 sec + Start 80: default_build_coverage::threadx_thread_simple_suspend_test + 80/107 Test #80: default_build_coverage::threadx_thread_simple_suspend_test .......................... Passed 0.00 sec + Start 81: default_build_coverage::threadx_thread_sleep_for_100ticks_test + 81/107 Test #81: default_build_coverage::threadx_thread_sleep_for_100ticks_test ...................... Passed 1.01 sec + Start 82: default_build_coverage::threadx_thread_sleep_terminate_test + 82/107 Test #82: default_build_coverage::threadx_thread_sleep_terminate_test ......................... Passed 0.05 sec + Start 83: default_build_coverage::threadx_thread_stack_checking_test + 83/107 Test #83: default_build_coverage::threadx_thread_stack_checking_test .......................... Passed 0.01 sec + Start 84: default_build_coverage::threadx_thread_stack_fill_value_test + 84/107 Test #84: default_build_coverage::threadx_thread_stack_fill_value_test ........................ Passed 0.01 sec + Start 85: default_build_coverage::threadx_thread_terminate_delete_test + 85/107 Test #85: default_build_coverage::threadx_thread_terminate_delete_test ........................ Passed 0.00 sec + Start 86: default_build_coverage::threadx_thread_exit_callback_transition_test + 86/107 Test #86: default_build_coverage::threadx_thread_exit_callback_transition_test ................ Passed 0.25 sec + Start 87: default_build_coverage::threadx_thread_time_slice_change_test + 87/107 Test #87: default_build_coverage::threadx_thread_time_slice_change_test ....................... Passed 0.10 sec + Start 88: default_build_coverage::threadx_thread_wait_abort_and_isr_test + 88/107 Test #88: default_build_coverage::threadx_thread_wait_abort_and_isr_test ...................... Passed 0.22 sec + Start 89: default_build_coverage::threadx_thread_wait_abort_test + 89/107 Test #89: default_build_coverage::threadx_thread_wait_abort_test .............................. Passed 0.01 sec + Start 90: default_build_coverage::threadx_time_get_set_test + 90/107 Test #90: default_build_coverage::threadx_time_get_set_test ................................... Passed 0.37 sec + Start 91: default_build_coverage::threadx_timer_activate_deactivate_test + 91/107 Test #91: default_build_coverage::threadx_timer_activate_deactivate_test ...................... Passed 0.86 sec + Start 92: default_build_coverage::threadx_timer_deactivate_accuracy_test + 92/107 Test #92: default_build_coverage::threadx_timer_deactivate_accuracy_test ...................... Passed 0.40 sec + Start 93: default_build_coverage::threadx_timer_information_test + 93/107 Test #93: default_build_coverage::threadx_timer_information_test .............................. Passed 1.61 sec + Start 94: default_build_coverage::threadx_timer_large_timer_accuracy_test + 94/107 Test #94: default_build_coverage::threadx_timer_large_timer_accuracy_test ..................... Passed 1.11 sec + Start 95: default_build_coverage::threadx_timer_multiple_accuracy_test + 95/107 Test #95: default_build_coverage::threadx_timer_multiple_accuracy_test ........................ Passed 3.05 sec + Start 96: default_build_coverage::threadx_timer_multiple_test + 96/107 Test #96: default_build_coverage::threadx_timer_multiple_test ................................. Passed 6.07 sec + Start 97: default_build_coverage::threadx_timer_simple_test + 97/107 Test #97: default_build_coverage::threadx_timer_simple_test ................................... Passed 1.65 sec + Start 98: default_build_coverage::threadx_trace_basic_test + 98/107 Test #98: default_build_coverage::threadx_trace_basic_test .................................... Passed 0.01 sec + Start 99: default_build_coverage::threadx_trace_entry_update_test + 99/107 Test #99: default_build_coverage::threadx_trace_entry_update_test ............................. Passed 0.05 sec + Start 100: default_build_coverage::threadx_initialize_kernel_setup_test +100/107 Test #100: default_build_coverage::threadx_initialize_kernel_setup_test ........................ Passed 0.00 sec + Start 101: default_build_coverage::threadx_thread_transition_ni_test +101/107 Test #101: default_build_coverage::threadx_thread_transition_ni_test ........................... Passed 0.00 sec + Start 102: default_build_coverage::threadx_thread_transition_ni_no_error_checking_test +102/107 Test #102: default_build_coverage::threadx_thread_transition_ni_no_error_checking_test ......... Passed 0.00 sec + Start 103: default_build_coverage::threadx_thread_transition_ni_no_notify_test +103/107 Test #103: default_build_coverage::threadx_thread_transition_ni_no_notify_test ................. Passed 0.00 sec + Start 104: default_build_coverage::threadx_thread_transition_no_error_checking_test +104/107 Test #104: default_build_coverage::threadx_thread_transition_no_error_checking_test ............ Passed 0.00 sec + Start 105: default_build_coverage::threadx_module_manager_thread_kernel_stack_test +105/107 Test #105: default_build_coverage::threadx_module_manager_thread_kernel_stack_test ............. Passed 0.00 sec + Start 106: default_build_coverage::threadx_module_manager_object_authentication_test +106/107 Test #106: default_build_coverage::threadx_module_manager_object_authentication_test ........... Passed 0.00 sec + Start 107: default_build_coverage::threadx_module_manager_delete_ownership_test +107/107 Test #107: default_build_coverage::threadx_module_manager_delete_ownership_test ................ Passed 0.00 sec + +100% tests passed out of 107 + +Total Test time (real) = 34.26 sec +CTEST_RC=0 diff --git a/ports/arc_em/metaware/inc/tx_port.h b/ports/arc_em/metaware/inc/tx_port.h index 9dec1e6b7..c30cfc951 100644 --- a/ports/arc_em/metaware/inc/tx_port.h +++ b/ports/arc_em/metaware/inc/tx_port.h @@ -308,7 +308,7 @@ void _tx_initialize_start_interrupts(void); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARCv2_EM/MetaWare Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARCv2_EM/MetaWare Version 6.5.2.202603 *"; #else #ifdef TX_MISRA_ENABLE extern CHAR _tx_version_id[100]; diff --git a/ports/arc_em/metaware/src/tx_thread_context_save.s b/ports/arc_em/metaware/src/tx_thread_context_save.s index fb2a280c4..e8a4bf518 100644 --- a/ports/arc_em/metaware/src/tx_thread_context_save.s +++ b/ports/arc_em/metaware/src/tx_thread_context_save.s @@ -1,5 +1,6 @@ ;/*************************************************************************** ; * Copyright (c) 2024 Microsoft Corporation +; * 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 @@ -8,6 +9,8 @@ ; * SPDX-License-Identifier: MIT ; **************************************************************************/ +; Portions of this file were generated with AI assistance. + ;/**************************************************************************/ ;/**************************************************************************/ ;/** */ @@ -176,19 +179,10 @@ __tx_thread_not_nested_save: ; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp; ; st sp, [r1, 8] ; Save thread's stack pointer - - .ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY ; -; /* Call the ISR enter function to indicate an ISR is executing. */ +; /* Switch to the system stack. */ +; sp = _tx_thread_system_stack_ptr; ; - sub sp, sp, 32 ; Allocating some space on the stack - st blink, [sp, 16] ; Save blink - bl.d _tx_execution_isr_enter ; Call the ISR enter function - nop ; Delay slot - ld blink, [sp, 16] ; Recover blink - add sp, sp, 32 ; Recover the stack space - .endif - .ifdef TX_ENABLE_HW_STACK_CHECKING lr r2, [status32] ; Pickup current STATUS32 and r2, r2, ~STATUS32_SC ; Clear the hardware stack checking enable bit (SC) @@ -199,16 +193,26 @@ __tx_thread_not_nested_save: sr r1, [KSTACK_BASE] ; Setup KSTACK_BASE ld sp, [gp, _tx_thread_system_stack_ptr@sda] ; Switch to system stack or r2, r2, STATUS32_SC ; Or in hardware stack checking enable bit (SC) - j_s.d [blink] ; Return to calling ISR kflag r2 ; Enable hardware stack checking .else + ld sp, [gp, _tx_thread_system_stack_ptr@sda] ; Switch to system stack + .endif + + .ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY ; -; /* Switch to the system stack. */ -; sp = _tx_thread_system_stack_ptr; +; /* Call the ISR enter function to indicate an ISR is executing. The call is +; made after the switch to the system stack so that it does not consume any +; of the interrupted thread's stack. */ ; - j_s.d [blink] ; Return to calling ISR - ld sp, [gp, _tx_thread_system_stack_ptr@sda] ; Switch to system stack + sub sp, sp, 32 ; Allocating some space on the stack + st blink, [sp, 16] ; Save blink + bl.d _tx_execution_isr_enter ; Call the ISR enter function + nop ; Delay slot + ld blink, [sp, 16] ; Recover blink + add sp, sp, 32 ; Recover the stack space .endif + + j_s [blink] ; Return to calling ISR ; ; } ; else diff --git a/ports/arc_hs/metaware/inc/tx_port.h b/ports/arc_hs/metaware/inc/tx_port.h index 724cba6c1..959cd7c4d 100644 --- a/ports/arc_hs/metaware/inc/tx_port.h +++ b/ports/arc_hs/metaware/inc/tx_port.h @@ -322,7 +322,7 @@ VOID tx_thread_register_bank_assign(VOID *thread_ptr, UINT register_bank); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARC_HS/MetaWare Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARC_HS/MetaWare Version 6.5.2.202603 *"; #else #ifdef TX_MISRA_ENABLE extern CHAR _tx_version_id[100]; diff --git a/ports/arc_hs/metaware/src/tx_thread_context_save.s b/ports/arc_hs/metaware/src/tx_thread_context_save.s index 27ee25b52..17cff059f 100644 --- a/ports/arc_hs/metaware/src/tx_thread_context_save.s +++ b/ports/arc_hs/metaware/src/tx_thread_context_save.s @@ -1,5 +1,6 @@ ;/*************************************************************************** ; * Copyright (c) 2024 Microsoft Corporation +; * 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 @@ -8,6 +9,8 @@ ; * SPDX-License-Identifier: MIT ; **************************************************************************/ +; Portions of this file were generated with AI assistance. + ;/**************************************************************************/ ;/**************************************************************************/ ;/** */ @@ -173,10 +176,17 @@ __tx_thread_not_nested_save: ; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp; ; st sp, [r1, 8] ; Save thread's stack pointer +; +; /* Switch to the system stack. */ +; sp = _tx_thread_system_stack_ptr; +; + ld sp, [gp, _tx_thread_system_stack_ptr@sda] ; Switch to system stack .ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY ; -; /* Call the ISR enter function to indicate an ISR is executing. */ +; /* Call the ISR enter function to indicate an ISR is executing. The call is +; made after the switch to the system stack so that it does not consume any +; of the interrupted thread's stack. */ ; sub sp, sp, 32 ; Allocating some space on the stack st blink, [sp, 16] ; Save blink @@ -186,12 +196,7 @@ __tx_thread_not_nested_save: add sp, sp, 32 ; Recover the stack space .endif -; -; /* Switch to the system stack. */ -; sp = _tx_thread_system_stack_ptr; -; - j_s.d [blink] ; Return to calling ISR - ld sp, [gp, _tx_thread_system_stack_ptr@sda] ; Switch to system stack + j_s [blink] ; Return to calling ISR ; ; } ; else diff --git a/ports/arm11/ac5/inc/tx_port.h b/ports/arm11/ac5/inc/tx_port.h index aa741362e..0b66bda47 100644 --- a/ports/arm11/ac5/inc/tx_port.h +++ b/ports/arm11/ac5/inc/tx_port.h @@ -311,7 +311,7 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/AC5 Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/AC5 Version 6.5.2.202603 *"; #else extern CHAR _tx_version_id[]; #endif diff --git a/ports/arm11/gnu/CMakeLists.txt b/ports/arm11/gnu/CMakeLists.txt new file mode 100644 index 000000000..b8166b4d1 --- /dev/null +++ b/ports/arm11/gnu/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) 2026 Eclipse ThreadX contributors +# SPDX-License-Identifier: MIT +# Portions of this file were generated with AI assistance. +# +# ThreadX port sources for arm11, GNU tools. + +target_sources(${PROJECT_NAME} + PRIVATE + # {{BEGIN_TARGET_SOURCES}} + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_context_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_nesting_end.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_nesting_start.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_end.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_start.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_vectored_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S + # {{END_TARGET_SOURCES}} +) + +target_include_directories(${PROJECT_NAME} + SYSTEM + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/inc +) diff --git a/ports/arm11/gnu/example_build/build_threadx.sh b/ports/arm11/gnu/example_build/build_threadx.sh index 25c9f993e..f7253cf16 100755 --- a/ports/arm11/gnu/example_build/build_threadx.sh +++ b/ports/arm11/gnu/example_build/build_threadx.sh @@ -10,6 +10,7 @@ # SPDX-License-Identifier: MIT # # AI Disclosure: This file was largely AI-generated by Copilot (Claude Sonnet 4.6). +# Portions of this file were generated with AI assistance. # 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. @@ -20,241 +21,277 @@ set -e cd "$(dirname "$0")" +# Toolchain selection. The default is the GNU toolchain, so an existing +# invocation of this script behaves exactly as before. Set TOOLCHAIN=atfe to +# build with Arm Toolchain for Embedded, which is LLVM based and is the +# successor to Arm Compiler 6: +# +# TOOLCHAIN=atfe ATFE_CLANG=/path/to/clang ./build_threadx.sh +# +: "${TOOLCHAIN:=gnu}" +case "${TOOLCHAIN}" in + gnu) + CC="arm-none-eabi-gcc" + AR="arm-none-eabi-ar" + TARGET_FLAGS="" + ENTRY_FLAG="-ereset_handler" + SYSCALL_LIB="--specs=nosys.specs" + ;; + atfe) + CC="${ATFE_CLANG:-clang}" + # llvm-ar ships beside clang in the toolchain. + case "${CC}" in + */*) AR="$(dirname "${CC}")/llvm-ar" ;; + *) AR="llvm-ar" ;; + esac + TARGET_FLAGS="--target=arm-none-eabi" + ENTRY_FLAG="-Wl,--entry=reset_handler" + # picolibc leaves _exit to the application; the toolchain's own + # semihosting library supplies it, which suits an example that runs on + # a model. + SYSCALL_LIB="-lsemihost" + ;; + *) + echo "Unknown TOOLCHAIN '${TOOLCHAIN}'; expected gnu or atfe" >&2 + exit 1 + ;; +esac + rm -f tx.a -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s tx_initialize_low_level.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_stack_build.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_schedule.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_system_return.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_context_save.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_context_restore.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_interrupt_control.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_timer_interrupt.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_interrupt_disable.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_interrupt_restore.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_context_save.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_nesting_start.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_irq_nesting_start.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_irq_nesting_end.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_nesting_end.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_context_restore.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s ../src/tx_thread_vectored_context_save.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_release.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_search.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_release.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_high_level.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_enter.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_setup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_priority_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_put.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_flush.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_front_send.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_receive.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_ceiling_put.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_entry_exit_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_identify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_preemption_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_priority_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_relinquish.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_reset.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_resume.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_shell_entry.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_sleep.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_analyze.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_handler.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_suspend.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_preempt_check.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_resume.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_suspend.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_terminate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_timeout.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_wait_abort.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_time_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_time_set.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_activate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_deactivate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_expiration_process.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_activate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_deactivate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_thread_entry.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_enable.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_disable.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_interrupt_control.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_enter_insert.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_exit_insert.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_register.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_unregister.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_user_event_insert.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_buffer_full_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_filter.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_unfilter.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_release.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_release.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_put.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_flush.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_front_send.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_receive.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_ceiling_put.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_entry_exit_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_preemption_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_priority_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_relinquish.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_reset.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_resume.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_suspend.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_terminate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_time_slice_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_wait_abort.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_activate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_change.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_create.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_deactivate.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_info_get.c -arm-none-eabi-ar -r tx.a tx_thread_stack_build.o tx_thread_schedule.o tx_thread_system_return.o tx_thread_context_save.o tx_thread_context_restore.o tx_timer_interrupt.o tx_thread_interrupt_control.o -arm-none-eabi-ar -r tx.a tx_thread_interrupt_disable.o tx_thread_interrupt_restore.o tx_thread_fiq_context_save.o tx_thread_fiq_nesting_start.o tx_thread_irq_nesting_start.o tx_thread_irq_nesting_end.o -arm-none-eabi-ar -r tx.a tx_thread_fiq_nesting_end.o tx_thread_fiq_context_restore.o tx_thread_vectored_context_save.o tx_initialize_low_level.o -arm-none-eabi-ar -r tx.a tx_block_allocate.o tx_block_pool_cleanup.o tx_block_pool_create.o tx_block_pool_delete.o tx_block_pool_info_get.o -arm-none-eabi-ar -r tx.a tx_block_pool_initialize.o tx_block_pool_performance_info_get.o tx_block_pool_performance_system_info_get.o tx_block_pool_prioritize.o -arm-none-eabi-ar -r tx.a tx_block_release.o tx_byte_allocate.o tx_byte_pool_cleanup.o tx_byte_pool_create.o tx_byte_pool_delete.o tx_byte_pool_info_get.o -arm-none-eabi-ar -r tx.a tx_byte_pool_initialize.o tx_byte_pool_performance_info_get.o tx_byte_pool_performance_system_info_get.o tx_byte_pool_prioritize.o -arm-none-eabi-ar -r tx.a tx_byte_pool_search.o tx_byte_release.o tx_event_flags_cleanup.o tx_event_flags_create.o tx_event_flags_delete.o tx_event_flags_get.o -arm-none-eabi-ar -r tx.a tx_event_flags_info_get.o tx_event_flags_initialize.o tx_event_flags_performance_info_get.o tx_event_flags_performance_system_info_get.o -arm-none-eabi-ar -r tx.a tx_event_flags_set.o tx_event_flags_set_notify.o tx_initialize_high_level.o tx_initialize_kernel_enter.o tx_initialize_kernel_setup.o -arm-none-eabi-ar -r tx.a tx_mutex_cleanup.o tx_mutex_create.o tx_mutex_delete.o tx_mutex_get.o tx_mutex_info_get.o tx_mutex_initialize.o tx_mutex_performance_info_get.o -arm-none-eabi-ar -r tx.a tx_mutex_performance_system_info_get.o tx_mutex_prioritize.o tx_mutex_priority_change.o tx_mutex_put.o tx_queue_cleanup.o tx_queue_create.o -arm-none-eabi-ar -r tx.a tx_queue_delete.o tx_queue_flush.o tx_queue_front_send.o tx_queue_info_get.o tx_queue_initialize.o tx_queue_performance_info_get.o -arm-none-eabi-ar -r tx.a tx_queue_performance_system_info_get.o tx_queue_prioritize.o tx_queue_receive.o tx_queue_send.o tx_queue_send_notify.o tx_semaphore_ceiling_put.o -arm-none-eabi-ar -r tx.a tx_semaphore_cleanup.o tx_semaphore_create.o tx_semaphore_delete.o tx_semaphore_get.o tx_semaphore_info_get.o tx_semaphore_initialize.o -arm-none-eabi-ar -r tx.a tx_semaphore_performance_info_get.o tx_semaphore_performance_system_info_get.o tx_semaphore_prioritize.o tx_semaphore_put.o tx_semaphore_put_notify.o -arm-none-eabi-ar -r tx.a tx_thread_create.o tx_thread_delete.o tx_thread_entry_exit_notify.o tx_thread_identify.o tx_thread_info_get.o tx_thread_initialize.o -arm-none-eabi-ar -r tx.a tx_thread_performance_info_get.o tx_thread_performance_system_info_get.o tx_thread_preemption_change.o tx_thread_priority_change.o tx_thread_relinquish.o -arm-none-eabi-ar -r tx.a tx_thread_reset.o tx_thread_resume.o tx_thread_shell_entry.o tx_thread_sleep.o tx_thread_stack_analyze.o tx_thread_stack_error_handler.o -arm-none-eabi-ar -r tx.a tx_thread_stack_error_notify.o tx_thread_suspend.o tx_thread_system_preempt_check.o tx_thread_system_resume.o tx_thread_system_suspend.o -arm-none-eabi-ar -r tx.a tx_thread_terminate.o tx_thread_time_slice.o tx_thread_time_slice_change.o tx_thread_timeout.o tx_thread_wait_abort.o tx_time_get.o -arm-none-eabi-ar -r tx.a tx_time_set.o tx_timer_activate.o tx_timer_change.o tx_timer_create.o tx_timer_deactivate.o tx_timer_delete.o tx_timer_expiration_process.o -arm-none-eabi-ar -r tx.a tx_timer_info_get.o tx_timer_initialize.o tx_timer_performance_info_get.o tx_timer_performance_system_info_get.o tx_timer_system_activate.o -arm-none-eabi-ar -r tx.a tx_timer_system_deactivate.o tx_timer_thread_entry.o tx_trace_enable.o tx_trace_disable.o tx_trace_initialize.o tx_trace_interrupt_control.o -arm-none-eabi-ar -r tx.a tx_trace_isr_enter_insert.o tx_trace_isr_exit_insert.o tx_trace_object_register.o tx_trace_object_unregister.o tx_trace_user_event_insert.o -arm-none-eabi-ar -r tx.a tx_trace_buffer_full_notify.o tx_trace_event_filter.o tx_trace_event_unfilter.o -arm-none-eabi-ar -r tx.a txe_block_allocate.o txe_block_pool_create.o txe_block_pool_delete.o txe_block_pool_info_get.o txe_block_pool_prioritize.o txe_block_release.o -arm-none-eabi-ar -r tx.a txe_byte_allocate.o txe_byte_pool_create.o txe_byte_pool_delete.o txe_byte_pool_info_get.o txe_byte_pool_prioritize.o txe_byte_release.o -arm-none-eabi-ar -r tx.a txe_event_flags_create.o txe_event_flags_delete.o txe_event_flags_get.o txe_event_flags_info_get.o txe_event_flags_set.o -arm-none-eabi-ar -r tx.a txe_event_flags_set_notify.o txe_mutex_create.o txe_mutex_delete.o txe_mutex_get.o txe_mutex_info_get.o txe_mutex_prioritize.o -arm-none-eabi-ar -r tx.a txe_mutex_put.o txe_queue_create.o txe_queue_delete.o txe_queue_flush.o txe_queue_front_send.o txe_queue_info_get.o txe_queue_prioritize.o -arm-none-eabi-ar -r tx.a txe_queue_receive.o txe_queue_send.o txe_queue_send_notify.o txe_semaphore_ceiling_put.o txe_semaphore_create.o txe_semaphore_delete.o -arm-none-eabi-ar -r tx.a txe_semaphore_get.o txe_semaphore_info_get.o txe_semaphore_prioritize.o txe_semaphore_put.o txe_semaphore_put_notify.o txe_thread_create.o -arm-none-eabi-ar -r tx.a txe_thread_delete.o txe_thread_entry_exit_notify.o txe_thread_info_get.o txe_thread_preemption_change.o txe_thread_priority_change.o -arm-none-eabi-ar -r tx.a txe_thread_relinquish.o txe_thread_reset.o txe_thread_resume.o txe_thread_suspend.o txe_thread_terminate.o txe_thread_time_slice_change.o -arm-none-eabi-ar -r tx.a txe_thread_wait_abort.o txe_timer_activate.o txe_timer_change.o txe_timer_create.o txe_timer_deactivate.o txe_timer_delete.o txe_timer_info_get.o +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s tx_initialize_low_level.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_stack_build.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_schedule.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_system_return.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_context_save.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_context_restore.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_interrupt_control.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_timer_interrupt.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_interrupt_disable.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_interrupt_restore.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_context_save.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_nesting_start.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_irq_nesting_start.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_irq_nesting_end.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_nesting_end.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_fiq_context_restore.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s ../src/tx_thread_vectored_context_save.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_block_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_search.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_high_level.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_enter.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_setup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_priority_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_flush.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_front_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_receive.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_ceiling_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_entry_exit_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_identify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_preemption_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_priority_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_relinquish.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_reset.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_resume.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_shell_entry.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_sleep.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_analyze.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_handler.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_suspend.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_preempt_check.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_resume.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_suspend.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_terminate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_timeout.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_wait_abort.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_time_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_time_set.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_activate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_deactivate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_expiration_process.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_activate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_deactivate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_thread_entry.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_enable.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_disable.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_interrupt_control.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_enter_insert.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_exit_insert.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_register.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_unregister.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_user_event_insert.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_buffer_full_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_filter.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_unfilter.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_block_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_flush.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_front_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_receive.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_ceiling_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_entry_exit_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_preemption_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_priority_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_relinquish.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_reset.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_resume.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_suspend.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_terminate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_time_slice_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_wait_abort.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_activate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_deactivate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_info_get.c +"${AR}" -r tx.a tx_thread_stack_build.o tx_thread_schedule.o tx_thread_system_return.o tx_thread_context_save.o tx_thread_context_restore.o tx_timer_interrupt.o tx_thread_interrupt_control.o +"${AR}" -r tx.a tx_thread_interrupt_disable.o tx_thread_interrupt_restore.o tx_thread_fiq_context_save.o tx_thread_fiq_nesting_start.o tx_thread_irq_nesting_start.o tx_thread_irq_nesting_end.o +"${AR}" -r tx.a tx_thread_fiq_nesting_end.o tx_thread_fiq_context_restore.o tx_thread_vectored_context_save.o tx_initialize_low_level.o +"${AR}" -r tx.a tx_block_allocate.o tx_block_pool_cleanup.o tx_block_pool_create.o tx_block_pool_delete.o tx_block_pool_info_get.o +"${AR}" -r tx.a tx_block_pool_initialize.o tx_block_pool_performance_info_get.o tx_block_pool_performance_system_info_get.o tx_block_pool_prioritize.o +"${AR}" -r tx.a tx_block_release.o tx_byte_allocate.o tx_byte_pool_cleanup.o tx_byte_pool_create.o tx_byte_pool_delete.o tx_byte_pool_info_get.o +"${AR}" -r tx.a tx_byte_pool_initialize.o tx_byte_pool_performance_info_get.o tx_byte_pool_performance_system_info_get.o tx_byte_pool_prioritize.o +"${AR}" -r tx.a tx_byte_pool_search.o tx_byte_release.o tx_event_flags_cleanup.o tx_event_flags_create.o tx_event_flags_delete.o tx_event_flags_get.o +"${AR}" -r tx.a tx_event_flags_info_get.o tx_event_flags_initialize.o tx_event_flags_performance_info_get.o tx_event_flags_performance_system_info_get.o +"${AR}" -r tx.a tx_event_flags_set.o tx_event_flags_set_notify.o tx_initialize_high_level.o tx_initialize_kernel_enter.o tx_initialize_kernel_setup.o +"${AR}" -r tx.a tx_mutex_cleanup.o tx_mutex_create.o tx_mutex_delete.o tx_mutex_get.o tx_mutex_info_get.o tx_mutex_initialize.o tx_mutex_performance_info_get.o +"${AR}" -r tx.a tx_mutex_performance_system_info_get.o tx_mutex_prioritize.o tx_mutex_priority_change.o tx_mutex_put.o tx_queue_cleanup.o tx_queue_create.o +"${AR}" -r tx.a tx_queue_delete.o tx_queue_flush.o tx_queue_front_send.o tx_queue_info_get.o tx_queue_initialize.o tx_queue_performance_info_get.o +"${AR}" -r tx.a tx_queue_performance_system_info_get.o tx_queue_prioritize.o tx_queue_receive.o tx_queue_send.o tx_queue_send_notify.o tx_semaphore_ceiling_put.o +"${AR}" -r tx.a tx_semaphore_cleanup.o tx_semaphore_create.o tx_semaphore_delete.o tx_semaphore_get.o tx_semaphore_info_get.o tx_semaphore_initialize.o +"${AR}" -r tx.a tx_semaphore_performance_info_get.o tx_semaphore_performance_system_info_get.o tx_semaphore_prioritize.o tx_semaphore_put.o tx_semaphore_put_notify.o +"${AR}" -r tx.a tx_thread_create.o tx_thread_delete.o tx_thread_entry_exit_notify.o tx_thread_identify.o tx_thread_info_get.o tx_thread_initialize.o +"${AR}" -r tx.a tx_thread_performance_info_get.o tx_thread_performance_system_info_get.o tx_thread_preemption_change.o tx_thread_priority_change.o tx_thread_relinquish.o +"${AR}" -r tx.a tx_thread_reset.o tx_thread_resume.o tx_thread_shell_entry.o tx_thread_sleep.o tx_thread_stack_analyze.o tx_thread_stack_error_handler.o +"${AR}" -r tx.a tx_thread_stack_error_notify.o tx_thread_suspend.o tx_thread_system_preempt_check.o tx_thread_system_resume.o tx_thread_system_suspend.o +"${AR}" -r tx.a tx_thread_terminate.o tx_thread_time_slice.o tx_thread_time_slice_change.o tx_thread_timeout.o tx_thread_wait_abort.o tx_time_get.o +"${AR}" -r tx.a tx_time_set.o tx_timer_activate.o tx_timer_change.o tx_timer_create.o tx_timer_deactivate.o tx_timer_delete.o tx_timer_expiration_process.o +"${AR}" -r tx.a tx_timer_info_get.o tx_timer_initialize.o tx_timer_performance_info_get.o tx_timer_performance_system_info_get.o tx_timer_system_activate.o +"${AR}" -r tx.a tx_timer_system_deactivate.o tx_timer_thread_entry.o tx_trace_enable.o tx_trace_disable.o tx_trace_initialize.o tx_trace_interrupt_control.o +"${AR}" -r tx.a tx_trace_isr_enter_insert.o tx_trace_isr_exit_insert.o tx_trace_object_register.o tx_trace_object_unregister.o tx_trace_user_event_insert.o +"${AR}" -r tx.a tx_trace_buffer_full_notify.o tx_trace_event_filter.o tx_trace_event_unfilter.o +"${AR}" -r tx.a txe_block_allocate.o txe_block_pool_create.o txe_block_pool_delete.o txe_block_pool_info_get.o txe_block_pool_prioritize.o txe_block_release.o +"${AR}" -r tx.a txe_byte_allocate.o txe_byte_pool_create.o txe_byte_pool_delete.o txe_byte_pool_info_get.o txe_byte_pool_prioritize.o txe_byte_release.o +"${AR}" -r tx.a txe_event_flags_create.o txe_event_flags_delete.o txe_event_flags_get.o txe_event_flags_info_get.o txe_event_flags_set.o +"${AR}" -r tx.a txe_event_flags_set_notify.o txe_mutex_create.o txe_mutex_delete.o txe_mutex_get.o txe_mutex_info_get.o txe_mutex_prioritize.o +"${AR}" -r tx.a txe_mutex_put.o txe_queue_create.o txe_queue_delete.o txe_queue_flush.o txe_queue_front_send.o txe_queue_info_get.o txe_queue_prioritize.o +"${AR}" -r tx.a txe_queue_receive.o txe_queue_send.o txe_queue_send_notify.o txe_semaphore_ceiling_put.o txe_semaphore_create.o txe_semaphore_delete.o +"${AR}" -r tx.a txe_semaphore_get.o txe_semaphore_info_get.o txe_semaphore_prioritize.o txe_semaphore_put.o txe_semaphore_put_notify.o txe_thread_create.o +"${AR}" -r tx.a txe_thread_delete.o txe_thread_entry_exit_notify.o txe_thread_info_get.o txe_thread_preemption_change.o txe_thread_priority_change.o +"${AR}" -r tx.a txe_thread_relinquish.o txe_thread_reset.o txe_thread_resume.o txe_thread_suspend.o txe_thread_terminate.o txe_thread_time_slice_change.o +"${AR}" -r tx.a txe_thread_wait_abort.o txe_timer_activate.o txe_timer_change.o txe_timer_create.o txe_timer_deactivate.o txe_timer_delete.o txe_timer_info_get.o diff --git a/ports/arm11/gnu/example_build/build_threadx_sample.bat b/ports/arm11/gnu/example_build/build_threadx_sample.bat index e67e3c20b..1515eb277 100644 --- a/ports/arm11/gnu/example_build/build_threadx_sample.bat +++ b/ports/arm11/gnu/example_build/build_threadx_sample.bat @@ -2,5 +2,5 @@ arm-none-eabi-gcc -c -g -mcpu=arm1136j-s reset.S arm-none-eabi-gcc -c -g -mcpu=arm1136j-s crt0.S arm-none-eabi-gcc -c -g -mcpu=arm1136j-s tx_initialize_low_level.S arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc sample_threadx.c -arm-none-eabi-ld -A arm1136j-s -T sample_threadx.ld reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a libc.a libnosys.a libgcc.a -o sample_threadx.out -M > sample_threadx.map +arm-none-eabi-gcc -g -nostartfiles -mcpu=arm1136j-s -T sample_threadx.ld --specs=nosys.specs -o sample_threadx.out -Wl,-Map=sample_threadx.map reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a diff --git a/ports/arm11/gnu/example_build/build_threadx_sample.sh b/ports/arm11/gnu/example_build/build_threadx_sample.sh index c342ce5a1..97a3a1c56 100755 --- a/ports/arm11/gnu/example_build/build_threadx_sample.sh +++ b/ports/arm11/gnu/example_build/build_threadx_sample.sh @@ -10,6 +10,7 @@ # SPDX-License-Identifier: MIT # # AI Disclosure: This file was largely AI-generated by Copilot (Claude Sonnet 4.6). +# Portions of this file were generated with AI assistance. # 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. @@ -20,9 +21,45 @@ set -e cd "$(dirname "$0")" -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s reset.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s crt0.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s tx_initialize_low_level.S -arm-none-eabi-gcc -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc sample_threadx.c -arm-none-eabi-ld -A arm1136j-s -T sample_threadx.ld reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a libc.a libnosys.a libgcc.a -o sample_threadx.out -M > sample_threadx.map +# Toolchain selection. The default is the GNU toolchain, so an existing +# invocation of this script behaves exactly as before. Set TOOLCHAIN=atfe to +# build with Arm Toolchain for Embedded, which is LLVM based and is the +# successor to Arm Compiler 6: +# +# TOOLCHAIN=atfe ATFE_CLANG=/path/to/clang ./build_threadx_sample.sh +# +: "${TOOLCHAIN:=gnu}" +case "${TOOLCHAIN}" in + gnu) + CC="arm-none-eabi-gcc" + AR="arm-none-eabi-ar" + TARGET_FLAGS="" + ENTRY_FLAG="-ereset_handler" + SYSCALL_LIB="--specs=nosys.specs" + ;; + atfe) + CC="${ATFE_CLANG:-clang}" + # llvm-ar ships beside clang in the toolchain. + case "${CC}" in + */*) AR="$(dirname "${CC}")/llvm-ar" ;; + *) AR="llvm-ar" ;; + esac + TARGET_FLAGS="--target=arm-none-eabi" + ENTRY_FLAG="-Wl,--entry=reset_handler" + # picolibc leaves _exit to the application; the toolchain's own + # semihosting library supplies it, which suits an example that runs on + # a model. + SYSCALL_LIB="-lsemihost" + ;; + *) + echo "Unknown TOOLCHAIN '${TOOLCHAIN}'; expected gnu or atfe" >&2 + exit 1 + ;; +esac + +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s reset.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s crt0.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s tx_initialize_low_level.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm1136j-s -I../../../../common/inc -I../inc sample_threadx.c +"${CC}" ${TARGET_FLAGS} -g -nostartfiles -mcpu=arm1136j-s -T sample_threadx.ld ${SYSCALL_LIB} -o sample_threadx.out -Wl,-Map=sample_threadx.map reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a diff --git a/ports/arm11/gnu/example_build/libnosys.a b/ports/arm11/gnu/example_build/libnosys.a deleted file mode 100644 index b70de4816..000000000 Binary files a/ports/arm11/gnu/example_build/libnosys.a and /dev/null differ diff --git a/ports/arm11/gnu/inc/tx_port.h b/ports/arm11/gnu/inc/tx_port.h index 998b153fd..02555994e 100644 --- a/ports/arm11/gnu/inc/tx_port.h +++ b/ports/arm11/gnu/inc/tx_port.h @@ -300,7 +300,7 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/GNU Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/GNU Version 6.5.2.202603 *"; #else extern CHAR _tx_version_id[]; #endif diff --git a/ports/arm11/iar/example_build/tx.ewp b/ports/arm11/iar/example_build/tx.ewp index 70a97e4f7..a0d47a302 100644 --- a/ports/arm11/iar/example_build/tx.ewp +++ b/ports/arm11/iar/example_build/tx.ewp @@ -1047,7 +1047,7 @@ diff --git a/ports/arm11/iar/inc/tx_port.h b/ports/arm11/iar/inc/tx_port.h index fd139ac76..d5aeac8db 100644 --- a/ports/arm11/iar/inc/tx_port.h +++ b/ports/arm11/iar/inc/tx_port.h @@ -366,7 +366,7 @@ void _tx_thread_interrupt_restore(UINT old_posture); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/IAR Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/IAR Version 6.5.2.202603 *"; #else #ifdef TX_MISRA_ENABLE extern CHAR _tx_version_id[100]; diff --git a/ports/arm11/iar/src/tx_iar.c b/ports/arm11/iar/src/tx_iar.c index 238b485ee..ab6c209cc 100644 --- a/ports/arm11/iar/src/tx_iar.c +++ b/ports/arm11/iar/src/tx_iar.c @@ -9,6 +9,7 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. /**************************************************************************/ /**************************************************************************/ @@ -270,7 +271,7 @@ TX_MUTEX *mutex_ptr; mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++]; /* Check for wrap-around on the next free mutex. */ - if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK) + if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK) { /* Yes, set the free index back to 0. */ @@ -287,7 +288,7 @@ TX_MUTEX *mutex_ptr; } /* Determine if a free mutex was found. */ - if (i >= _MAX_LOCK) + if (i >= _MAX_FLOCK) { /* Error! No more free mutexes! */ @@ -678,7 +679,7 @@ TX_MUTEX *mutex_ptr; mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++]; /* Check for wrap-around on the next free mutex. */ - if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK) + if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK) { /* Yes, set the free index back to 0. */ @@ -695,7 +696,7 @@ TX_MUTEX *mutex_ptr; } /* Determine if a free mutex was found. */ - if (i >= _MAX_LOCK) + if (i >= _MAX_FLOCK) { /* Error! No more free mutexes! */ diff --git a/ports/arm9/ac5/inc/tx_port.h b/ports/arm9/ac5/inc/tx_port.h index 3a8318721..34e6fec22 100644 --- a/ports/arm9/ac5/inc/tx_port.h +++ b/ports/arm9/ac5/inc/tx_port.h @@ -313,7 +313,7 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/AC5 Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/AC5 Version 6.5.2.202603 *"; #else extern CHAR _tx_version_id[]; #endif diff --git a/ports/arm9/gnu/CMakeLists.txt b/ports/arm9/gnu/CMakeLists.txt new file mode 100644 index 000000000..f98d2556d --- /dev/null +++ b/ports/arm9/gnu/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) 2026 Eclipse ThreadX contributors +# SPDX-License-Identifier: MIT +# Portions of this file were generated with AI assistance. +# +# ThreadX port sources for arm9, GNU tools. + +target_sources(${PROJECT_NAME} + PRIVATE + # {{BEGIN_TARGET_SOURCES}} + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_context_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_nesting_end.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_fiq_nesting_start.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_end.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_start.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_vectored_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S + # {{END_TARGET_SOURCES}} +) + +target_include_directories(${PROJECT_NAME} + SYSTEM + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/inc +) diff --git a/ports/arm9/gnu/example_build/build_threadx.sh b/ports/arm9/gnu/example_build/build_threadx.sh index 38aab240a..d8de5055a 100755 --- a/ports/arm9/gnu/example_build/build_threadx.sh +++ b/ports/arm9/gnu/example_build/build_threadx.sh @@ -10,6 +10,7 @@ # SPDX-License-Identifier: MIT # # AI Disclosure: This file was largely AI-generated by Copilot (Claude Sonnet 4.6). +# Portions of this file were generated with AI assistance. # 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. @@ -20,241 +21,277 @@ set -e cd "$(dirname "$0")" +# Toolchain selection. The default is the GNU toolchain, so an existing +# invocation of this script behaves exactly as before. Set TOOLCHAIN=atfe to +# build with Arm Toolchain for Embedded, which is LLVM based and is the +# successor to Arm Compiler 6: +# +# TOOLCHAIN=atfe ATFE_CLANG=/path/to/clang ./build_threadx.sh +# +: "${TOOLCHAIN:=gnu}" +case "${TOOLCHAIN}" in + gnu) + CC="arm-none-eabi-gcc" + AR="arm-none-eabi-ar" + TARGET_FLAGS="" + ENTRY_FLAG="-ereset_handler" + SYSCALL_LIB="--specs=nosys.specs" + ;; + atfe) + CC="${ATFE_CLANG:-clang}" + # llvm-ar ships beside clang in the toolchain. + case "${CC}" in + */*) AR="$(dirname "${CC}")/llvm-ar" ;; + *) AR="llvm-ar" ;; + esac + TARGET_FLAGS="--target=arm-none-eabi" + ENTRY_FLAG="-Wl,--entry=reset_handler" + # picolibc leaves _exit to the application; the toolchain's own + # semihosting library supplies it, which suits an example that runs on + # a model. + SYSCALL_LIB="-lsemihost" + ;; + *) + echo "Unknown TOOLCHAIN '${TOOLCHAIN}'; expected gnu or atfe" >&2 + exit 1 + ;; +esac + rm -f tx.a -arm-none-eabi-gcc -c -g -mcpu=arm9 tx_initialize_low_level.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_stack_build.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_schedule.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_system_return.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_context_save.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_context_restore.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_interrupt_control.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_timer_interrupt.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_interrupt_disable.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_interrupt_restore.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_fiq_context_save.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_fiq_nesting_start.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_irq_nesting_start.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_irq_nesting_end.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_fiq_nesting_end.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_fiq_context_restore.S -arm-none-eabi-gcc -c -g -mcpu=arm9 ../src/tx_thread_vectored_context_save.S -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_release.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_search.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_release.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_high_level.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_enter.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_setup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_priority_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_put.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_flush.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_front_send.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_receive.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_ceiling_put.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_cleanup.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_entry_exit_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_identify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_preemption_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_priority_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_relinquish.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_reset.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_resume.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_shell_entry.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_sleep.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_analyze.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_handler.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_suspend.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_preempt_check.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_resume.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_suspend.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_terminate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_timeout.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_wait_abort.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_time_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_time_set.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_activate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_deactivate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_expiration_process.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_system_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_activate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_deactivate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_thread_entry.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_enable.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_disable.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_initialize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_interrupt_control.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_enter_insert.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_exit_insert.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_register.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_unregister.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_user_event_insert.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_buffer_full_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_filter.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_unfilter.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_release.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_allocate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_release.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_put.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_flush.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_front_send.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_receive.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_ceiling_put.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_prioritize.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_entry_exit_notify.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_info_get.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_preemption_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_priority_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_relinquish.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_reset.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_resume.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_suspend.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_terminate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_time_slice_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_wait_abort.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_activate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_change.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_create.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_deactivate.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_delete.c -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_info_get.c -arm-none-eabi-ar -r tx.a tx_thread_stack_build.o tx_thread_schedule.o tx_thread_system_return.o tx_thread_context_save.o tx_thread_context_restore.o tx_timer_interrupt.o tx_thread_interrupt_control.o -arm-none-eabi-ar -r tx.a tx_thread_interrupt_disable.o tx_thread_interrupt_restore.o tx_thread_fiq_context_save.o tx_thread_fiq_nesting_start.o tx_thread_irq_nesting_start.o tx_thread_irq_nesting_end.o -arm-none-eabi-ar -r tx.a tx_thread_fiq_nesting_end.o tx_thread_fiq_context_restore.o tx_thread_vectored_context_save.o tx_initialize_low_level.o -arm-none-eabi-ar -r tx.a tx_block_allocate.o tx_block_pool_cleanup.o tx_block_pool_create.o tx_block_pool_delete.o tx_block_pool_info_get.o -arm-none-eabi-ar -r tx.a tx_block_pool_initialize.o tx_block_pool_performance_info_get.o tx_block_pool_performance_system_info_get.o tx_block_pool_prioritize.o -arm-none-eabi-ar -r tx.a tx_block_release.o tx_byte_allocate.o tx_byte_pool_cleanup.o tx_byte_pool_create.o tx_byte_pool_delete.o tx_byte_pool_info_get.o -arm-none-eabi-ar -r tx.a tx_byte_pool_initialize.o tx_byte_pool_performance_info_get.o tx_byte_pool_performance_system_info_get.o tx_byte_pool_prioritize.o -arm-none-eabi-ar -r tx.a tx_byte_pool_search.o tx_byte_release.o tx_event_flags_cleanup.o tx_event_flags_create.o tx_event_flags_delete.o tx_event_flags_get.o -arm-none-eabi-ar -r tx.a tx_event_flags_info_get.o tx_event_flags_initialize.o tx_event_flags_performance_info_get.o tx_event_flags_performance_system_info_get.o -arm-none-eabi-ar -r tx.a tx_event_flags_set.o tx_event_flags_set_notify.o tx_initialize_high_level.o tx_initialize_kernel_enter.o tx_initialize_kernel_setup.o -arm-none-eabi-ar -r tx.a tx_mutex_cleanup.o tx_mutex_create.o tx_mutex_delete.o tx_mutex_get.o tx_mutex_info_get.o tx_mutex_initialize.o tx_mutex_performance_info_get.o -arm-none-eabi-ar -r tx.a tx_mutex_performance_system_info_get.o tx_mutex_prioritize.o tx_mutex_priority_change.o tx_mutex_put.o tx_queue_cleanup.o tx_queue_create.o -arm-none-eabi-ar -r tx.a tx_queue_delete.o tx_queue_flush.o tx_queue_front_send.o tx_queue_info_get.o tx_queue_initialize.o tx_queue_performance_info_get.o -arm-none-eabi-ar -r tx.a tx_queue_performance_system_info_get.o tx_queue_prioritize.o tx_queue_receive.o tx_queue_send.o tx_queue_send_notify.o tx_semaphore_ceiling_put.o -arm-none-eabi-ar -r tx.a tx_semaphore_cleanup.o tx_semaphore_create.o tx_semaphore_delete.o tx_semaphore_get.o tx_semaphore_info_get.o tx_semaphore_initialize.o -arm-none-eabi-ar -r tx.a tx_semaphore_performance_info_get.o tx_semaphore_performance_system_info_get.o tx_semaphore_prioritize.o tx_semaphore_put.o tx_semaphore_put_notify.o -arm-none-eabi-ar -r tx.a tx_thread_create.o tx_thread_delete.o tx_thread_entry_exit_notify.o tx_thread_identify.o tx_thread_info_get.o tx_thread_initialize.o -arm-none-eabi-ar -r tx.a tx_thread_performance_info_get.o tx_thread_performance_system_info_get.o tx_thread_preemption_change.o tx_thread_priority_change.o tx_thread_relinquish.o -arm-none-eabi-ar -r tx.a tx_thread_reset.o tx_thread_resume.o tx_thread_shell_entry.o tx_thread_sleep.o tx_thread_stack_analyze.o tx_thread_stack_error_handler.o -arm-none-eabi-ar -r tx.a tx_thread_stack_error_notify.o tx_thread_suspend.o tx_thread_system_preempt_check.o tx_thread_system_resume.o tx_thread_system_suspend.o -arm-none-eabi-ar -r tx.a tx_thread_terminate.o tx_thread_time_slice.o tx_thread_time_slice_change.o tx_thread_timeout.o tx_thread_wait_abort.o tx_time_get.o -arm-none-eabi-ar -r tx.a tx_time_set.o tx_timer_activate.o tx_timer_change.o tx_timer_create.o tx_timer_deactivate.o tx_timer_delete.o tx_timer_expiration_process.o -arm-none-eabi-ar -r tx.a tx_timer_info_get.o tx_timer_initialize.o tx_timer_performance_info_get.o tx_timer_performance_system_info_get.o tx_timer_system_activate.o -arm-none-eabi-ar -r tx.a tx_timer_system_deactivate.o tx_timer_thread_entry.o tx_trace_enable.o tx_trace_disable.o tx_trace_initialize.o tx_trace_interrupt_control.o -arm-none-eabi-ar -r tx.a tx_trace_isr_enter_insert.o tx_trace_isr_exit_insert.o tx_trace_object_register.o tx_trace_object_unregister.o tx_trace_user_event_insert.o -arm-none-eabi-ar -r tx.a tx_trace_buffer_full_notify.o tx_trace_event_filter.o tx_trace_event_unfilter.o -arm-none-eabi-ar -r tx.a txe_block_allocate.o txe_block_pool_create.o txe_block_pool_delete.o txe_block_pool_info_get.o txe_block_pool_prioritize.o txe_block_release.o -arm-none-eabi-ar -r tx.a txe_byte_allocate.o txe_byte_pool_create.o txe_byte_pool_delete.o txe_byte_pool_info_get.o txe_byte_pool_prioritize.o txe_byte_release.o -arm-none-eabi-ar -r tx.a txe_event_flags_create.o txe_event_flags_delete.o txe_event_flags_get.o txe_event_flags_info_get.o txe_event_flags_set.o -arm-none-eabi-ar -r tx.a txe_event_flags_set_notify.o txe_mutex_create.o txe_mutex_delete.o txe_mutex_get.o txe_mutex_info_get.o txe_mutex_prioritize.o -arm-none-eabi-ar -r tx.a txe_mutex_put.o txe_queue_create.o txe_queue_delete.o txe_queue_flush.o txe_queue_front_send.o txe_queue_info_get.o txe_queue_prioritize.o -arm-none-eabi-ar -r tx.a txe_queue_receive.o txe_queue_send.o txe_queue_send_notify.o txe_semaphore_ceiling_put.o txe_semaphore_create.o txe_semaphore_delete.o -arm-none-eabi-ar -r tx.a txe_semaphore_get.o txe_semaphore_info_get.o txe_semaphore_prioritize.o txe_semaphore_put.o txe_semaphore_put_notify.o txe_thread_create.o -arm-none-eabi-ar -r tx.a txe_thread_delete.o txe_thread_entry_exit_notify.o txe_thread_info_get.o txe_thread_preemption_change.o txe_thread_priority_change.o -arm-none-eabi-ar -r tx.a txe_thread_relinquish.o txe_thread_reset.o txe_thread_resume.o txe_thread_suspend.o txe_thread_terminate.o txe_thread_time_slice_change.o -arm-none-eabi-ar -r tx.a txe_thread_wait_abort.o txe_timer_activate.o txe_timer_change.o txe_timer_create.o txe_timer_deactivate.o txe_timer_delete.o txe_timer_info_get.o +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 tx_initialize_low_level.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_stack_build.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_schedule.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_system_return.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_context_save.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_context_restore.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_interrupt_control.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_timer_interrupt.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_interrupt_disable.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_interrupt_restore.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_fiq_context_save.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_fiq_nesting_start.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_irq_nesting_start.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_irq_nesting_end.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_fiq_nesting_end.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_fiq_context_restore.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 ../src/tx_thread_vectored_context_save.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_block_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_pool_search.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_byte_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_event_flags_set_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_high_level.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_enter.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_initialize_kernel_setup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_priority_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_mutex_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_flush.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_front_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_receive.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_queue_send_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_ceiling_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_cleanup.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_semaphore_put_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_entry_exit_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_identify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_preemption_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_priority_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_relinquish.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_reset.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_resume.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_shell_entry.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_sleep.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_analyze.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_handler.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_stack_error_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_suspend.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_preempt_check.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_resume.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_system_suspend.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_terminate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_time_slice_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_timeout.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_thread_wait_abort.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_time_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_time_set.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_activate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_deactivate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_expiration_process.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_performance_system_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_activate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_system_deactivate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_timer_thread_entry.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_enable.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_disable.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_initialize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_interrupt_control.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_enter_insert.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_isr_exit_insert.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_register.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_object_unregister.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_user_event_insert.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_buffer_full_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_filter.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/tx_trace_event_unfilter.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_block_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_allocate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_pool_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_byte_release.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_event_flags_set_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_mutex_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_flush.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_front_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_receive.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_queue_send_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_ceiling_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_prioritize.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_semaphore_put_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_entry_exit_notify.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_info_get.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_preemption_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_priority_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_relinquish.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_reset.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_resume.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_suspend.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_terminate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_time_slice_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_thread_wait_abort.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_activate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_change.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_create.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_deactivate.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_delete.c +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc ../../../../common/src/txe_timer_info_get.c +"${AR}" -r tx.a tx_thread_stack_build.o tx_thread_schedule.o tx_thread_system_return.o tx_thread_context_save.o tx_thread_context_restore.o tx_timer_interrupt.o tx_thread_interrupt_control.o +"${AR}" -r tx.a tx_thread_interrupt_disable.o tx_thread_interrupt_restore.o tx_thread_fiq_context_save.o tx_thread_fiq_nesting_start.o tx_thread_irq_nesting_start.o tx_thread_irq_nesting_end.o +"${AR}" -r tx.a tx_thread_fiq_nesting_end.o tx_thread_fiq_context_restore.o tx_thread_vectored_context_save.o tx_initialize_low_level.o +"${AR}" -r tx.a tx_block_allocate.o tx_block_pool_cleanup.o tx_block_pool_create.o tx_block_pool_delete.o tx_block_pool_info_get.o +"${AR}" -r tx.a tx_block_pool_initialize.o tx_block_pool_performance_info_get.o tx_block_pool_performance_system_info_get.o tx_block_pool_prioritize.o +"${AR}" -r tx.a tx_block_release.o tx_byte_allocate.o tx_byte_pool_cleanup.o tx_byte_pool_create.o tx_byte_pool_delete.o tx_byte_pool_info_get.o +"${AR}" -r tx.a tx_byte_pool_initialize.o tx_byte_pool_performance_info_get.o tx_byte_pool_performance_system_info_get.o tx_byte_pool_prioritize.o +"${AR}" -r tx.a tx_byte_pool_search.o tx_byte_release.o tx_event_flags_cleanup.o tx_event_flags_create.o tx_event_flags_delete.o tx_event_flags_get.o +"${AR}" -r tx.a tx_event_flags_info_get.o tx_event_flags_initialize.o tx_event_flags_performance_info_get.o tx_event_flags_performance_system_info_get.o +"${AR}" -r tx.a tx_event_flags_set.o tx_event_flags_set_notify.o tx_initialize_high_level.o tx_initialize_kernel_enter.o tx_initialize_kernel_setup.o +"${AR}" -r tx.a tx_mutex_cleanup.o tx_mutex_create.o tx_mutex_delete.o tx_mutex_get.o tx_mutex_info_get.o tx_mutex_initialize.o tx_mutex_performance_info_get.o +"${AR}" -r tx.a tx_mutex_performance_system_info_get.o tx_mutex_prioritize.o tx_mutex_priority_change.o tx_mutex_put.o tx_queue_cleanup.o tx_queue_create.o +"${AR}" -r tx.a tx_queue_delete.o tx_queue_flush.o tx_queue_front_send.o tx_queue_info_get.o tx_queue_initialize.o tx_queue_performance_info_get.o +"${AR}" -r tx.a tx_queue_performance_system_info_get.o tx_queue_prioritize.o tx_queue_receive.o tx_queue_send.o tx_queue_send_notify.o tx_semaphore_ceiling_put.o +"${AR}" -r tx.a tx_semaphore_cleanup.o tx_semaphore_create.o tx_semaphore_delete.o tx_semaphore_get.o tx_semaphore_info_get.o tx_semaphore_initialize.o +"${AR}" -r tx.a tx_semaphore_performance_info_get.o tx_semaphore_performance_system_info_get.o tx_semaphore_prioritize.o tx_semaphore_put.o tx_semaphore_put_notify.o +"${AR}" -r tx.a tx_thread_create.o tx_thread_delete.o tx_thread_entry_exit_notify.o tx_thread_identify.o tx_thread_info_get.o tx_thread_initialize.o +"${AR}" -r tx.a tx_thread_performance_info_get.o tx_thread_performance_system_info_get.o tx_thread_preemption_change.o tx_thread_priority_change.o tx_thread_relinquish.o +"${AR}" -r tx.a tx_thread_reset.o tx_thread_resume.o tx_thread_shell_entry.o tx_thread_sleep.o tx_thread_stack_analyze.o tx_thread_stack_error_handler.o +"${AR}" -r tx.a tx_thread_stack_error_notify.o tx_thread_suspend.o tx_thread_system_preempt_check.o tx_thread_system_resume.o tx_thread_system_suspend.o +"${AR}" -r tx.a tx_thread_terminate.o tx_thread_time_slice.o tx_thread_time_slice_change.o tx_thread_timeout.o tx_thread_wait_abort.o tx_time_get.o +"${AR}" -r tx.a tx_time_set.o tx_timer_activate.o tx_timer_change.o tx_timer_create.o tx_timer_deactivate.o tx_timer_delete.o tx_timer_expiration_process.o +"${AR}" -r tx.a tx_timer_info_get.o tx_timer_initialize.o tx_timer_performance_info_get.o tx_timer_performance_system_info_get.o tx_timer_system_activate.o +"${AR}" -r tx.a tx_timer_system_deactivate.o tx_timer_thread_entry.o tx_trace_enable.o tx_trace_disable.o tx_trace_initialize.o tx_trace_interrupt_control.o +"${AR}" -r tx.a tx_trace_isr_enter_insert.o tx_trace_isr_exit_insert.o tx_trace_object_register.o tx_trace_object_unregister.o tx_trace_user_event_insert.o +"${AR}" -r tx.a tx_trace_buffer_full_notify.o tx_trace_event_filter.o tx_trace_event_unfilter.o +"${AR}" -r tx.a txe_block_allocate.o txe_block_pool_create.o txe_block_pool_delete.o txe_block_pool_info_get.o txe_block_pool_prioritize.o txe_block_release.o +"${AR}" -r tx.a txe_byte_allocate.o txe_byte_pool_create.o txe_byte_pool_delete.o txe_byte_pool_info_get.o txe_byte_pool_prioritize.o txe_byte_release.o +"${AR}" -r tx.a txe_event_flags_create.o txe_event_flags_delete.o txe_event_flags_get.o txe_event_flags_info_get.o txe_event_flags_set.o +"${AR}" -r tx.a txe_event_flags_set_notify.o txe_mutex_create.o txe_mutex_delete.o txe_mutex_get.o txe_mutex_info_get.o txe_mutex_prioritize.o +"${AR}" -r tx.a txe_mutex_put.o txe_queue_create.o txe_queue_delete.o txe_queue_flush.o txe_queue_front_send.o txe_queue_info_get.o txe_queue_prioritize.o +"${AR}" -r tx.a txe_queue_receive.o txe_queue_send.o txe_queue_send_notify.o txe_semaphore_ceiling_put.o txe_semaphore_create.o txe_semaphore_delete.o +"${AR}" -r tx.a txe_semaphore_get.o txe_semaphore_info_get.o txe_semaphore_prioritize.o txe_semaphore_put.o txe_semaphore_put_notify.o txe_thread_create.o +"${AR}" -r tx.a txe_thread_delete.o txe_thread_entry_exit_notify.o txe_thread_info_get.o txe_thread_preemption_change.o txe_thread_priority_change.o +"${AR}" -r tx.a txe_thread_relinquish.o txe_thread_reset.o txe_thread_resume.o txe_thread_suspend.o txe_thread_terminate.o txe_thread_time_slice_change.o +"${AR}" -r tx.a txe_thread_wait_abort.o txe_timer_activate.o txe_timer_change.o txe_timer_create.o txe_timer_deactivate.o txe_timer_delete.o txe_timer_info_get.o diff --git a/ports/arm9/gnu/example_build/build_threadx_sample.bat b/ports/arm9/gnu/example_build/build_threadx_sample.bat index c35d2bc63..5c9347f4d 100644 --- a/ports/arm9/gnu/example_build/build_threadx_sample.bat +++ b/ports/arm9/gnu/example_build/build_threadx_sample.bat @@ -2,5 +2,5 @@ arm-none-eabi-gcc -c -g -mcpu=arm9 reset.S arm-none-eabi-gcc -c -g -mcpu=arm9 crt0.S arm-none-eabi-gcc -c -g -mcpu=arm9 tx_initialize_low_level.S arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc sample_threadx.c -arm-none-eabi-ld -A arm9 -T sample_threadx.ld reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a libc.a libgcc.a -o sample_threadx.out -M > sample_threadx.map +arm-none-eabi-gcc -g -nostartfiles -mcpu=arm9 -T sample_threadx.ld --specs=nosys.specs -o sample_threadx.out -Wl,-Map=sample_threadx.map reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a diff --git a/ports/arm9/gnu/example_build/build_threadx_sample.sh b/ports/arm9/gnu/example_build/build_threadx_sample.sh index 33ea66491..d9339bc07 100755 --- a/ports/arm9/gnu/example_build/build_threadx_sample.sh +++ b/ports/arm9/gnu/example_build/build_threadx_sample.sh @@ -10,6 +10,7 @@ # SPDX-License-Identifier: MIT # # AI Disclosure: This file was largely AI-generated by Copilot (Claude Sonnet 4.6). +# Portions of this file were generated with AI assistance. # 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. @@ -20,9 +21,45 @@ set -e cd "$(dirname "$0")" -arm-none-eabi-gcc -c -g -mcpu=arm9 reset.S -arm-none-eabi-gcc -c -g -mcpu=arm9 crt0.S -arm-none-eabi-gcc -c -g -mcpu=arm9 tx_initialize_low_level.S -arm-none-eabi-gcc -c -g -mcpu=arm9 -I../../../../common/inc -I../inc sample_threadx.c -arm-none-eabi-ld -A arm9 -T sample_threadx.ld reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a libc.a libgcc.a -o sample_threadx.out -M > sample_threadx.map +# Toolchain selection. The default is the GNU toolchain, so an existing +# invocation of this script behaves exactly as before. Set TOOLCHAIN=atfe to +# build with Arm Toolchain for Embedded, which is LLVM based and is the +# successor to Arm Compiler 6: +# +# TOOLCHAIN=atfe ATFE_CLANG=/path/to/clang ./build_threadx_sample.sh +# +: "${TOOLCHAIN:=gnu}" +case "${TOOLCHAIN}" in + gnu) + CC="arm-none-eabi-gcc" + AR="arm-none-eabi-ar" + TARGET_FLAGS="" + ENTRY_FLAG="-ereset_handler" + SYSCALL_LIB="--specs=nosys.specs" + ;; + atfe) + CC="${ATFE_CLANG:-clang}" + # llvm-ar ships beside clang in the toolchain. + case "${CC}" in + */*) AR="$(dirname "${CC}")/llvm-ar" ;; + *) AR="llvm-ar" ;; + esac + TARGET_FLAGS="--target=arm-none-eabi" + ENTRY_FLAG="-Wl,--entry=reset_handler" + # picolibc leaves _exit to the application; the toolchain's own + # semihosting library supplies it, which suits an example that runs on + # a model. + SYSCALL_LIB="-lsemihost" + ;; + *) + echo "Unknown TOOLCHAIN '${TOOLCHAIN}'; expected gnu or atfe" >&2 + exit 1 + ;; +esac + +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 reset.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 crt0.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 tx_initialize_low_level.S +"${CC}" ${TARGET_FLAGS} -c -g -mcpu=arm9 -I../../../../common/inc -I../inc sample_threadx.c +"${CC}" ${TARGET_FLAGS} -g -nostartfiles -mcpu=arm9 -T sample_threadx.ld ${SYSCALL_LIB} -o sample_threadx.out -Wl,-Map=sample_threadx.map reset.o crt0.o tx_initialize_low_level.o sample_threadx.o tx.a diff --git a/ports/arm9/gnu/inc/tx_port.h b/ports/arm9/gnu/inc/tx_port.h index 4da69b821..d77d48e14 100644 --- a/ports/arm9/gnu/inc/tx_port.h +++ b/ports/arm9/gnu/inc/tx_port.h @@ -300,7 +300,7 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/GNU Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/GNU Version 6.5.2.202603 *"; #else extern CHAR _tx_version_id[]; #endif diff --git a/ports/arm9/iar/example_build/tx.ewp b/ports/arm9/iar/example_build/tx.ewp index 82bc09aa7..19dab779b 100644 --- a/ports/arm9/iar/example_build/tx.ewp +++ b/ports/arm9/iar/example_build/tx.ewp @@ -1047,7 +1047,7 @@ diff --git a/ports/arm9/iar/inc/tx_port.h b/ports/arm9/iar/inc/tx_port.h index 69e409543..a01805844 100644 --- a/ports/arm9/iar/inc/tx_port.h +++ b/ports/arm9/iar/inc/tx_port.h @@ -366,7 +366,7 @@ void _tx_thread_interrupt_restore(UINT old_posture); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/IAR Version 6.5.1.202602a *"; + "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/IAR Version 6.5.2.202603 *"; #else #ifdef TX_MISRA_ENABLE extern CHAR _tx_version_id[100]; diff --git a/ports/arm9/iar/src/tx_iar.c b/ports/arm9/iar/src/tx_iar.c index 238b485ee..ab6c209cc 100644 --- a/ports/arm9/iar/src/tx_iar.c +++ b/ports/arm9/iar/src/tx_iar.c @@ -9,6 +9,7 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +// Portions of this file were generated with AI assistance. /**************************************************************************/ /**************************************************************************/ @@ -270,7 +271,7 @@ TX_MUTEX *mutex_ptr; mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++]; /* Check for wrap-around on the next free mutex. */ - if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK) + if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK) { /* Yes, set the free index back to 0. */ @@ -287,7 +288,7 @@ TX_MUTEX *mutex_ptr; } /* Determine if a free mutex was found. */ - if (i >= _MAX_LOCK) + if (i >= _MAX_FLOCK) { /* Error! No more free mutexes! */ @@ -678,7 +679,7 @@ TX_MUTEX *mutex_ptr; mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++]; /* Check for wrap-around on the next free mutex. */ - if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK) + if (__tx_iar_file_lock_next_free_mutex >= _MAX_FLOCK) { /* Yes, set the free index back to 0. */ @@ -695,7 +696,7 @@ TX_MUTEX *mutex_ptr; } /* Determine if a free mutex was found. */ - if (i >= _MAX_LOCK) + if (i >= _MAX_FLOCK) { /* Error! No more free mutexes! */ diff --git a/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt b/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt deleted file mode 100644 index 98982c105..000000000 --- a/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt +++ /dev/null @@ -1 +0,0 @@ -"./tx_block_allocate.obj" "./tx_block_pool_cleanup.obj" "./tx_block_pool_create.obj" "./tx_block_pool_delete.obj" "./tx_block_pool_info_get.obj" "./tx_block_pool_initialize.obj" "./tx_block_pool_performance_info_get.obj" "./tx_block_pool_performance_system_info_get.obj" "./tx_block_pool_prioritize.obj" "./tx_block_release.obj" "./tx_byte_allocate.obj" "./tx_byte_pool_cleanup.obj" "./tx_byte_pool_create.obj" "./tx_byte_pool_delete.obj" "./tx_byte_pool_info_get.obj" "./tx_byte_pool_initialize.obj" "./tx_byte_pool_performance_info_get.obj" "./tx_byte_pool_performance_system_info_get.obj" "./tx_byte_pool_prioritize.obj" "./tx_byte_pool_search.obj" "./tx_byte_release.obj" "./tx_event_flags_cleanup.obj" "./tx_event_flags_create.obj" "./tx_event_flags_delete.obj" "./tx_event_flags_get.obj" "./tx_event_flags_info_get.obj" "./tx_event_flags_initialize.obj" "./tx_event_flags_performance_info_get.obj" "./tx_event_flags_performance_system_info_get.obj" "./tx_event_flags_set.obj" "./tx_event_flags_set_notify.obj" "./tx_initialize_high_level.obj" "./tx_initialize_kernel_enter.obj" "./tx_initialize_kernel_setup.obj" "./tx_mutex_cleanup.obj" "./tx_mutex_create.obj" "./tx_mutex_delete.obj" "./tx_mutex_get.obj" "./tx_mutex_info_get.obj" "./tx_mutex_initialize.obj" "./tx_mutex_performance_info_get.obj" "./tx_mutex_performance_system_info_get.obj" "./tx_mutex_prioritize.obj" "./tx_mutex_priority_change.obj" "./tx_mutex_put.obj" "./tx_queue_cleanup.obj" "./tx_queue_create.obj" "./tx_queue_delete.obj" "./tx_queue_flush.obj" "./tx_queue_front_send.obj" "./tx_queue_info_get.obj" "./tx_queue_initialize.obj" "./tx_queue_performance_info_get.obj" "./tx_queue_performance_system_info_get.obj" "./tx_queue_prioritize.obj" "./tx_queue_receive.obj" "./tx_queue_send.obj" "./tx_queue_send_notify.obj" "./tx_semaphore_ceiling_put.obj" "./tx_semaphore_cleanup.obj" "./tx_semaphore_create.obj" "./tx_semaphore_delete.obj" "./tx_semaphore_get.obj" "./tx_semaphore_info_get.obj" "./tx_semaphore_initialize.obj" "./tx_semaphore_performance_info_get.obj" "./tx_semaphore_performance_system_info_get.obj" "./tx_semaphore_prioritize.obj" "./tx_semaphore_put.obj" "./tx_semaphore_put_notify.obj" "./tx_thread_context_restore.obj" "./tx_thread_context_save.obj" "./tx_thread_create.obj" "./tx_thread_delete.obj" "./tx_thread_entry_exit_notify.obj" "./tx_thread_identify.obj" "./tx_thread_info_get.obj" "./tx_thread_initialize.obj" "./tx_thread_interrupt_control.obj" "./tx_thread_performance_info_get.obj" "./tx_thread_performance_system_info_get.obj" "./tx_thread_preemption_change.obj" "./tx_thread_priority_change.obj" "./tx_thread_relinquish.obj" "./tx_thread_reset.obj" "./tx_thread_resume.obj" "./tx_thread_schedule.obj" "./tx_thread_shell_entry.obj" "./tx_thread_sleep.obj" "./tx_thread_stack_analyze.obj" "./tx_thread_stack_build.obj" "./tx_thread_stack_error_handler.obj" "./tx_thread_stack_error_notify.obj" "./tx_thread_suspend.obj" "./tx_thread_system_preempt_check.obj" "./tx_thread_system_resume.obj" "./tx_thread_system_return.obj" "./tx_thread_system_suspend.obj" "./tx_thread_terminate.obj" "./tx_thread_time_slice.obj" "./tx_thread_time_slice_change.obj" "./tx_thread_timeout.obj" "./tx_thread_wait_abort.obj" "./tx_time_get.obj" "./tx_time_set.obj" "./tx_timer_activate.obj" "./tx_timer_change.obj" "./tx_timer_create.obj" "./tx_timer_deactivate.obj" "./tx_timer_delete.obj" "./tx_timer_expiration_process.obj" "./tx_timer_info_get.obj" "./tx_timer_initialize.obj" "./tx_timer_interrupt.obj" "./tx_timer_performance_info_get.obj" "./tx_timer_performance_system_info_get.obj" "./tx_timer_system_activate.obj" "./tx_timer_system_deactivate.obj" "./tx_timer_thread_entry.obj" "./tx_trace_buffer_full_notify.obj" "./tx_trace_disable.obj" "./tx_trace_enable.obj" "./tx_trace_event_filter.obj" "./tx_trace_event_unfilter.obj" "./tx_trace_initialize.obj" "./tx_trace_interrupt_control.obj" "./tx_trace_isr_enter_insert.obj" "./tx_trace_isr_exit_insert.obj" "./tx_trace_object_register.obj" "./tx_trace_object_unregister.obj" "./tx_trace_user_event_insert.obj" "./txe_block_allocate.obj" "./txe_block_pool_create.obj" "./txe_block_pool_delete.obj" "./txe_block_pool_info_get.obj" "./txe_block_pool_prioritize.obj" "./txe_block_release.obj" "./txe_byte_allocate.obj" "./txe_byte_pool_create.obj" "./txe_byte_pool_delete.obj" "./txe_byte_pool_info_get.obj" "./txe_byte_pool_prioritize.obj" "./txe_byte_release.obj" "./txe_event_flags_create.obj" "./txe_event_flags_delete.obj" "./txe_event_flags_get.obj" "./txe_event_flags_info_get.obj" "./txe_event_flags_set.obj" "./txe_event_flags_set_notify.obj" "./txe_mutex_create.obj" "./txe_mutex_delete.obj" "./txe_mutex_get.obj" "./txe_mutex_info_get.obj" "./txe_mutex_prioritize.obj" "./txe_mutex_put.obj" "./txe_queue_create.obj" "./txe_queue_delete.obj" "./txe_queue_flush.obj" "./txe_queue_front_send.obj" "./txe_queue_info_get.obj" "./txe_queue_prioritize.obj" "./txe_queue_receive.obj" "./txe_queue_send.obj" "./txe_queue_send_notify.obj" "./txe_semaphore_ceiling_put.obj" "./txe_semaphore_create.obj" "./txe_semaphore_delete.obj" "./txe_semaphore_get.obj" "./txe_semaphore_info_get.obj" "./txe_semaphore_prioritize.obj" "./txe_semaphore_put.obj" "./txe_semaphore_put_notify.obj" "./txe_thread_create.obj" "./txe_thread_delete.obj" "./txe_thread_entry_exit_notify.obj" "./txe_thread_info_get.obj" "./txe_thread_preemption_change.obj" "./txe_thread_priority_change.obj" "./txe_thread_relinquish.obj" "./txe_thread_reset.obj" "./txe_thread_resume.obj" "./txe_thread_suspend.obj" "./txe_thread_terminate.obj" "./txe_thread_time_slice_change.obj" "./txe_thread_wait_abort.obj" "./txe_timer_activate.obj" "./txe_timer_change.obj" "./txe_timer_create.obj" "./txe_timer_deactivate.obj" "./txe_timer_delete.obj" "./txe_timer_info_get.obj" \ No newline at end of file diff --git a/ports/c667x/ccs/example_build/tx/Release/makefile b/ports/c667x/ccs/example_build/tx/Release/makefile deleted file mode 100644 index 10d8815d5..000000000 --- a/ports/c667x/ccs/example_build/tx/Release/makefile +++ /dev/null @@ -1,351 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -SHELL = cmd.exe - -CG_TOOL_ROOT := C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4 - -GEN_OPTS__FLAG := -GEN_CMDS__FLAG := - -ORDERED_OBJS += \ -"./tx_block_allocate.obj" \ -"./tx_block_pool_cleanup.obj" \ -"./tx_block_pool_create.obj" \ -"./tx_block_pool_delete.obj" \ -"./tx_block_pool_info_get.obj" \ -"./tx_block_pool_initialize.obj" \ -"./tx_block_pool_performance_info_get.obj" \ -"./tx_block_pool_performance_system_info_get.obj" \ -"./tx_block_pool_prioritize.obj" \ -"./tx_block_release.obj" \ -"./tx_byte_allocate.obj" \ -"./tx_byte_pool_cleanup.obj" \ -"./tx_byte_pool_create.obj" \ -"./tx_byte_pool_delete.obj" \ -"./tx_byte_pool_info_get.obj" \ -"./tx_byte_pool_initialize.obj" \ -"./tx_byte_pool_performance_info_get.obj" \ -"./tx_byte_pool_performance_system_info_get.obj" \ -"./tx_byte_pool_prioritize.obj" \ -"./tx_byte_pool_search.obj" \ -"./tx_byte_release.obj" \ -"./tx_event_flags_cleanup.obj" \ -"./tx_event_flags_create.obj" \ -"./tx_event_flags_delete.obj" \ -"./tx_event_flags_get.obj" \ -"./tx_event_flags_info_get.obj" \ -"./tx_event_flags_initialize.obj" \ -"./tx_event_flags_performance_info_get.obj" \ -"./tx_event_flags_performance_system_info_get.obj" \ -"./tx_event_flags_set.obj" \ -"./tx_event_flags_set_notify.obj" \ -"./tx_initialize_high_level.obj" \ -"./tx_initialize_kernel_enter.obj" \ -"./tx_initialize_kernel_setup.obj" \ -"./tx_mutex_cleanup.obj" \ -"./tx_mutex_create.obj" \ -"./tx_mutex_delete.obj" \ -"./tx_mutex_get.obj" \ -"./tx_mutex_info_get.obj" \ -"./tx_mutex_initialize.obj" \ -"./tx_mutex_performance_info_get.obj" \ -"./tx_mutex_performance_system_info_get.obj" \ -"./tx_mutex_prioritize.obj" \ -"./tx_mutex_priority_change.obj" \ -"./tx_mutex_put.obj" \ -"./tx_queue_cleanup.obj" \ -"./tx_queue_create.obj" \ -"./tx_queue_delete.obj" \ -"./tx_queue_flush.obj" \ -"./tx_queue_front_send.obj" \ -"./tx_queue_info_get.obj" \ -"./tx_queue_initialize.obj" \ -"./tx_queue_performance_info_get.obj" \ -"./tx_queue_performance_system_info_get.obj" \ -"./tx_queue_prioritize.obj" \ -"./tx_queue_receive.obj" \ -"./tx_queue_send.obj" \ -"./tx_queue_send_notify.obj" \ -"./tx_semaphore_ceiling_put.obj" \ -"./tx_semaphore_cleanup.obj" \ -"./tx_semaphore_create.obj" \ -"./tx_semaphore_delete.obj" \ -"./tx_semaphore_get.obj" \ -"./tx_semaphore_info_get.obj" \ -"./tx_semaphore_initialize.obj" \ -"./tx_semaphore_performance_info_get.obj" \ -"./tx_semaphore_performance_system_info_get.obj" \ -"./tx_semaphore_prioritize.obj" \ -"./tx_semaphore_put.obj" \ -"./tx_semaphore_put_notify.obj" \ -"./tx_thread_context_restore.obj" \ -"./tx_thread_context_save.obj" \ -"./tx_thread_create.obj" \ -"./tx_thread_delete.obj" \ -"./tx_thread_entry_exit_notify.obj" \ -"./tx_thread_identify.obj" \ -"./tx_thread_info_get.obj" \ -"./tx_thread_initialize.obj" \ -"./tx_thread_interrupt_control.obj" \ -"./tx_thread_performance_info_get.obj" \ -"./tx_thread_performance_system_info_get.obj" \ -"./tx_thread_preemption_change.obj" \ -"./tx_thread_priority_change.obj" \ -"./tx_thread_relinquish.obj" \ -"./tx_thread_reset.obj" \ -"./tx_thread_resume.obj" \ -"./tx_thread_schedule.obj" \ -"./tx_thread_shell_entry.obj" \ -"./tx_thread_sleep.obj" \ -"./tx_thread_stack_analyze.obj" \ -"./tx_thread_stack_build.obj" \ -"./tx_thread_stack_error_handler.obj" \ -"./tx_thread_stack_error_notify.obj" \ -"./tx_thread_suspend.obj" \ -"./tx_thread_system_preempt_check.obj" \ -"./tx_thread_system_resume.obj" \ -"./tx_thread_system_return.obj" \ -"./tx_thread_system_suspend.obj" \ -"./tx_thread_terminate.obj" \ -"./tx_thread_time_slice.obj" \ -"./tx_thread_time_slice_change.obj" \ -"./tx_thread_timeout.obj" \ -"./tx_thread_wait_abort.obj" \ -"./tx_time_get.obj" \ -"./tx_time_set.obj" \ -"./tx_timer_activate.obj" \ -"./tx_timer_change.obj" \ -"./tx_timer_create.obj" \ -"./tx_timer_deactivate.obj" \ -"./tx_timer_delete.obj" \ -"./tx_timer_expiration_process.obj" \ -"./tx_timer_info_get.obj" \ -"./tx_timer_initialize.obj" \ -"./tx_timer_interrupt.obj" \ -"./tx_timer_performance_info_get.obj" \ -"./tx_timer_performance_system_info_get.obj" \ -"./tx_timer_system_activate.obj" \ -"./tx_timer_system_deactivate.obj" \ -"./tx_timer_thread_entry.obj" \ -"./tx_trace_buffer_full_notify.obj" \ -"./tx_trace_disable.obj" \ -"./tx_trace_enable.obj" \ -"./tx_trace_event_filter.obj" \ -"./tx_trace_event_unfilter.obj" \ -"./tx_trace_initialize.obj" \ -"./tx_trace_interrupt_control.obj" \ -"./tx_trace_isr_enter_insert.obj" \ -"./tx_trace_isr_exit_insert.obj" \ -"./tx_trace_object_register.obj" \ -"./tx_trace_object_unregister.obj" \ -"./tx_trace_user_event_insert.obj" \ -"./txe_block_allocate.obj" \ -"./txe_block_pool_create.obj" \ -"./txe_block_pool_delete.obj" \ -"./txe_block_pool_info_get.obj" \ -"./txe_block_pool_prioritize.obj" \ -"./txe_block_release.obj" \ -"./txe_byte_allocate.obj" \ -"./txe_byte_pool_create.obj" \ -"./txe_byte_pool_delete.obj" \ -"./txe_byte_pool_info_get.obj" \ -"./txe_byte_pool_prioritize.obj" \ -"./txe_byte_release.obj" \ -"./txe_event_flags_create.obj" \ -"./txe_event_flags_delete.obj" \ -"./txe_event_flags_get.obj" \ -"./txe_event_flags_info_get.obj" \ -"./txe_event_flags_set.obj" \ -"./txe_event_flags_set_notify.obj" \ -"./txe_mutex_create.obj" \ -"./txe_mutex_delete.obj" \ -"./txe_mutex_get.obj" \ -"./txe_mutex_info_get.obj" \ -"./txe_mutex_prioritize.obj" \ -"./txe_mutex_put.obj" \ -"./txe_queue_create.obj" \ -"./txe_queue_delete.obj" \ -"./txe_queue_flush.obj" \ -"./txe_queue_front_send.obj" \ -"./txe_queue_info_get.obj" \ -"./txe_queue_prioritize.obj" \ -"./txe_queue_receive.obj" \ -"./txe_queue_send.obj" \ -"./txe_queue_send_notify.obj" \ -"./txe_semaphore_ceiling_put.obj" \ -"./txe_semaphore_create.obj" \ -"./txe_semaphore_delete.obj" \ -"./txe_semaphore_get.obj" \ -"./txe_semaphore_info_get.obj" \ -"./txe_semaphore_prioritize.obj" \ -"./txe_semaphore_put.obj" \ -"./txe_semaphore_put_notify.obj" \ -"./txe_thread_create.obj" \ -"./txe_thread_delete.obj" \ -"./txe_thread_entry_exit_notify.obj" \ -"./txe_thread_info_get.obj" \ -"./txe_thread_preemption_change.obj" \ -"./txe_thread_priority_change.obj" \ -"./txe_thread_relinquish.obj" \ -"./txe_thread_reset.obj" \ -"./txe_thread_resume.obj" \ -"./txe_thread_suspend.obj" \ -"./txe_thread_terminate.obj" \ -"./txe_thread_time_slice_change.obj" \ -"./txe_thread_wait_abort.obj" \ -"./txe_timer_activate.obj" \ -"./txe_timer_change.obj" \ -"./txe_timer_create.obj" \ -"./txe_timer_deactivate.obj" \ -"./txe_timer_delete.obj" \ -"./txe_timer_info_get.obj" \ - --include ../makefile.init - -RM := DEL /F -RMDIR := RMDIR /S/Q - -# All of the sources participating in the build are defined here --include sources.mk --include subdir_vars.mk --include subdir_rules.mk --include objects.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C55_DEPS)),) --include $(C55_DEPS) -endif -ifneq ($(strip $(C_UPPER_DEPS)),) --include $(C_UPPER_DEPS) -endif -ifneq ($(strip $(S67_DEPS)),) --include $(S67_DEPS) -endif -ifneq ($(strip $(S62_DEPS)),) --include $(S62_DEPS) -endif -ifneq ($(strip $(S_DEPS)),) --include $(S_DEPS) -endif -ifneq ($(strip $(OPT_DEPS)),) --include $(OPT_DEPS) -endif -ifneq ($(strip $(C??_DEPS)),) --include $(C??_DEPS) -endif -ifneq ($(strip $(ASM_UPPER_DEPS)),) --include $(ASM_UPPER_DEPS) -endif -ifneq ($(strip $(S??_DEPS)),) --include $(S??_DEPS) -endif -ifneq ($(strip $(C64_DEPS)),) --include $(C64_DEPS) -endif -ifneq ($(strip $(CXX_DEPS)),) --include $(CXX_DEPS) -endif -ifneq ($(strip $(S64_DEPS)),) --include $(S64_DEPS) -endif -ifneq ($(strip $(INO_DEPS)),) --include $(INO_DEPS) -endif -ifneq ($(strip $(CLA_DEPS)),) --include $(CLA_DEPS) -endif -ifneq ($(strip $(S55_DEPS)),) --include $(S55_DEPS) -endif -ifneq ($(strip $(SV7A_DEPS)),) --include $(SV7A_DEPS) -endif -ifneq ($(strip $(C62_DEPS)),) --include $(C62_DEPS) -endif -ifneq ($(strip $(C67_DEPS)),) --include $(C67_DEPS) -endif -ifneq ($(strip $(PDE_DEPS)),) --include $(PDE_DEPS) -endif -ifneq ($(strip $(K_DEPS)),) --include $(K_DEPS) -endif -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) -endif -ifneq ($(strip $(CC_DEPS)),) --include $(CC_DEPS) -endif -ifneq ($(strip $(C++_DEPS)),) --include $(C++_DEPS) -endif -ifneq ($(strip $(C43_DEPS)),) --include $(C43_DEPS) -endif -ifneq ($(strip $(S43_DEPS)),) --include $(S43_DEPS) -endif -ifneq ($(strip $(ASM_DEPS)),) --include $(ASM_DEPS) -endif -ifneq ($(strip $(S_UPPER_DEPS)),) --include $(S_UPPER_DEPS) -endif -ifneq ($(strip $(CPP_DEPS)),) --include $(CPP_DEPS) -endif -ifneq ($(strip $(SA_DEPS)),) --include $(SA_DEPS) -endif -endif - --include ../makefile.defs - -# Add inputs and outputs from these tool invocations to the build variables -LIB_OUTPUTS += \ -tx.lib \ - -LIB_OUTPUTS__QUOTED += \ -"tx.lib" \ - - -# All Target -all: tx.lib - -# Tool invocations -tx.lib: $(OBJS) $(OBJ_SRCS) $(LIB_SRCS) -ifneq ($(strip $(ORDERED_OBJS)),) - @echo 'Building target: "$@"' - @echo 'Invoking: C6000 Archiver' - "C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/ar6x" r "tx.lib" $(ORDERED_OBJS) - @echo 'Finished building target: "$@"' - @echo ' ' -endif - -# Other Targets -clean: - -$(RM) $(LIB_OUTPUTS__QUOTED) - -$(RM) "tx_block_allocate.obj" "tx_block_pool_cleanup.obj" "tx_block_pool_create.obj" "tx_block_pool_delete.obj" "tx_block_pool_info_get.obj" "tx_block_pool_initialize.obj" "tx_block_pool_performance_info_get.obj" "tx_block_pool_performance_system_info_get.obj" "tx_block_pool_prioritize.obj" "tx_block_release.obj" "tx_byte_allocate.obj" "tx_byte_pool_cleanup.obj" "tx_byte_pool_create.obj" "tx_byte_pool_delete.obj" "tx_byte_pool_info_get.obj" "tx_byte_pool_initialize.obj" "tx_byte_pool_performance_info_get.obj" "tx_byte_pool_performance_system_info_get.obj" "tx_byte_pool_prioritize.obj" "tx_byte_pool_search.obj" "tx_byte_release.obj" "tx_event_flags_cleanup.obj" "tx_event_flags_create.obj" "tx_event_flags_delete.obj" "tx_event_flags_get.obj" "tx_event_flags_info_get.obj" "tx_event_flags_initialize.obj" "tx_event_flags_performance_info_get.obj" "tx_event_flags_performance_system_info_get.obj" "tx_event_flags_set.obj" "tx_event_flags_set_notify.obj" "tx_initialize_high_level.obj" "tx_initialize_kernel_enter.obj" - -$(RM) "tx_initialize_kernel_setup.obj" "tx_mutex_cleanup.obj" "tx_mutex_create.obj" "tx_mutex_delete.obj" "tx_mutex_get.obj" "tx_mutex_info_get.obj" "tx_mutex_initialize.obj" "tx_mutex_performance_info_get.obj" "tx_mutex_performance_system_info_get.obj" "tx_mutex_prioritize.obj" "tx_mutex_priority_change.obj" "tx_mutex_put.obj" "tx_queue_cleanup.obj" "tx_queue_create.obj" "tx_queue_delete.obj" "tx_queue_flush.obj" "tx_queue_front_send.obj" "tx_queue_info_get.obj" "tx_queue_initialize.obj" "tx_queue_performance_info_get.obj" "tx_queue_performance_system_info_get.obj" "tx_queue_prioritize.obj" "tx_queue_receive.obj" "tx_queue_send.obj" "tx_queue_send_notify.obj" "tx_semaphore_ceiling_put.obj" "tx_semaphore_cleanup.obj" "tx_semaphore_create.obj" "tx_semaphore_delete.obj" "tx_semaphore_get.obj" "tx_semaphore_info_get.obj" "tx_semaphore_initialize.obj" "tx_semaphore_performance_info_get.obj" "tx_semaphore_performance_system_info_get.obj" "tx_semaphore_prioritize.obj" "tx_semaphore_put.obj" "tx_semaphore_put_notify.obj" - -$(RM) "tx_thread_context_restore.obj" "tx_thread_context_save.obj" "tx_thread_create.obj" "tx_thread_delete.obj" "tx_thread_entry_exit_notify.obj" "tx_thread_identify.obj" "tx_thread_info_get.obj" "tx_thread_initialize.obj" "tx_thread_interrupt_control.obj" "tx_thread_performance_info_get.obj" "tx_thread_performance_system_info_get.obj" "tx_thread_preemption_change.obj" "tx_thread_priority_change.obj" "tx_thread_relinquish.obj" "tx_thread_reset.obj" "tx_thread_resume.obj" "tx_thread_schedule.obj" "tx_thread_shell_entry.obj" "tx_thread_sleep.obj" "tx_thread_stack_analyze.obj" "tx_thread_stack_build.obj" "tx_thread_stack_error_handler.obj" "tx_thread_stack_error_notify.obj" "tx_thread_suspend.obj" "tx_thread_system_preempt_check.obj" "tx_thread_system_resume.obj" "tx_thread_system_return.obj" "tx_thread_system_suspend.obj" "tx_thread_terminate.obj" "tx_thread_time_slice.obj" "tx_thread_time_slice_change.obj" "tx_thread_timeout.obj" "tx_thread_wait_abort.obj" "tx_time_get.obj" "tx_time_set.obj" - -$(RM) "tx_timer_activate.obj" "tx_timer_change.obj" "tx_timer_create.obj" "tx_timer_deactivate.obj" "tx_timer_delete.obj" "tx_timer_expiration_process.obj" "tx_timer_info_get.obj" "tx_timer_initialize.obj" "tx_timer_interrupt.obj" "tx_timer_performance_info_get.obj" "tx_timer_performance_system_info_get.obj" "tx_timer_system_activate.obj" "tx_timer_system_deactivate.obj" "tx_timer_thread_entry.obj" "tx_trace_buffer_full_notify.obj" "tx_trace_disable.obj" "tx_trace_enable.obj" "tx_trace_event_filter.obj" "tx_trace_event_unfilter.obj" "tx_trace_initialize.obj" "tx_trace_interrupt_control.obj" "tx_trace_isr_enter_insert.obj" "tx_trace_isr_exit_insert.obj" "tx_trace_object_register.obj" "tx_trace_object_unregister.obj" "tx_trace_user_event_insert.obj" "txe_block_allocate.obj" "txe_block_pool_create.obj" "txe_block_pool_delete.obj" "txe_block_pool_info_get.obj" "txe_block_pool_prioritize.obj" "txe_block_release.obj" "txe_byte_allocate.obj" "txe_byte_pool_create.obj" "txe_byte_pool_delete.obj" "txe_byte_pool_info_get.obj" - -$(RM) "txe_byte_pool_prioritize.obj" "txe_byte_release.obj" "txe_event_flags_create.obj" "txe_event_flags_delete.obj" "txe_event_flags_get.obj" "txe_event_flags_info_get.obj" "txe_event_flags_set.obj" "txe_event_flags_set_notify.obj" "txe_mutex_create.obj" "txe_mutex_delete.obj" "txe_mutex_get.obj" "txe_mutex_info_get.obj" "txe_mutex_prioritize.obj" "txe_mutex_put.obj" "txe_queue_create.obj" "txe_queue_delete.obj" "txe_queue_flush.obj" "txe_queue_front_send.obj" "txe_queue_info_get.obj" "txe_queue_prioritize.obj" "txe_queue_receive.obj" "txe_queue_send.obj" "txe_queue_send_notify.obj" "txe_semaphore_ceiling_put.obj" "txe_semaphore_create.obj" "txe_semaphore_delete.obj" "txe_semaphore_get.obj" "txe_semaphore_info_get.obj" "txe_semaphore_prioritize.obj" "txe_semaphore_put.obj" "txe_semaphore_put_notify.obj" "txe_thread_create.obj" "txe_thread_delete.obj" "txe_thread_entry_exit_notify.obj" "txe_thread_info_get.obj" "txe_thread_preemption_change.obj" "txe_thread_priority_change.obj" "txe_thread_relinquish.obj" - -$(RM) "txe_thread_reset.obj" "txe_thread_resume.obj" "txe_thread_suspend.obj" "txe_thread_terminate.obj" "txe_thread_time_slice_change.obj" "txe_thread_wait_abort.obj" "txe_timer_activate.obj" "txe_timer_change.obj" "txe_timer_create.obj" "txe_timer_deactivate.obj" "txe_timer_delete.obj" "txe_timer_info_get.obj" - -$(RM) "tx_block_allocate.d" "tx_block_pool_cleanup.d" "tx_block_pool_create.d" "tx_block_pool_delete.d" "tx_block_pool_info_get.d" "tx_block_pool_initialize.d" "tx_block_pool_performance_info_get.d" "tx_block_pool_performance_system_info_get.d" "tx_block_pool_prioritize.d" "tx_block_release.d" "tx_byte_allocate.d" "tx_byte_pool_cleanup.d" "tx_byte_pool_create.d" "tx_byte_pool_delete.d" "tx_byte_pool_info_get.d" "tx_byte_pool_initialize.d" "tx_byte_pool_performance_info_get.d" "tx_byte_pool_performance_system_info_get.d" "tx_byte_pool_prioritize.d" "tx_byte_pool_search.d" "tx_byte_release.d" "tx_event_flags_cleanup.d" "tx_event_flags_create.d" "tx_event_flags_delete.d" "tx_event_flags_get.d" "tx_event_flags_info_get.d" "tx_event_flags_initialize.d" "tx_event_flags_performance_info_get.d" "tx_event_flags_performance_system_info_get.d" "tx_event_flags_set.d" "tx_event_flags_set_notify.d" "tx_initialize_high_level.d" "tx_initialize_kernel_enter.d" "tx_initialize_kernel_setup.d" "tx_mutex_cleanup.d" - -$(RM) "tx_mutex_create.d" "tx_mutex_delete.d" "tx_mutex_get.d" "tx_mutex_info_get.d" "tx_mutex_initialize.d" "tx_mutex_performance_info_get.d" "tx_mutex_performance_system_info_get.d" "tx_mutex_prioritize.d" "tx_mutex_priority_change.d" "tx_mutex_put.d" "tx_queue_cleanup.d" "tx_queue_create.d" "tx_queue_delete.d" "tx_queue_flush.d" "tx_queue_front_send.d" "tx_queue_info_get.d" "tx_queue_initialize.d" "tx_queue_performance_info_get.d" "tx_queue_performance_system_info_get.d" "tx_queue_prioritize.d" "tx_queue_receive.d" "tx_queue_send.d" "tx_queue_send_notify.d" "tx_semaphore_ceiling_put.d" "tx_semaphore_cleanup.d" "tx_semaphore_create.d" "tx_semaphore_delete.d" "tx_semaphore_get.d" "tx_semaphore_info_get.d" "tx_semaphore_initialize.d" "tx_semaphore_performance_info_get.d" "tx_semaphore_performance_system_info_get.d" "tx_semaphore_prioritize.d" "tx_semaphore_put.d" "tx_semaphore_put_notify.d" "tx_thread_create.d" "tx_thread_delete.d" "tx_thread_entry_exit_notify.d" "tx_thread_identify.d" "tx_thread_info_get.d" - -$(RM) "tx_thread_initialize.d" "tx_thread_performance_info_get.d" "tx_thread_performance_system_info_get.d" "tx_thread_preemption_change.d" "tx_thread_priority_change.d" "tx_thread_relinquish.d" "tx_thread_reset.d" "tx_thread_resume.d" "tx_thread_shell_entry.d" "tx_thread_sleep.d" "tx_thread_stack_analyze.d" "tx_thread_stack_error_handler.d" "tx_thread_stack_error_notify.d" "tx_thread_suspend.d" "tx_thread_system_preempt_check.d" "tx_thread_system_resume.d" "tx_thread_system_suspend.d" "tx_thread_terminate.d" "tx_thread_time_slice.d" "tx_thread_time_slice_change.d" "tx_thread_timeout.d" "tx_thread_wait_abort.d" "tx_time_get.d" "tx_time_set.d" "tx_timer_activate.d" "tx_timer_change.d" "tx_timer_create.d" "tx_timer_deactivate.d" "tx_timer_delete.d" "tx_timer_expiration_process.d" "tx_timer_info_get.d" "tx_timer_initialize.d" "tx_timer_performance_info_get.d" "tx_timer_performance_system_info_get.d" "tx_timer_system_activate.d" "tx_timer_system_deactivate.d" "tx_timer_thread_entry.d" "tx_trace_buffer_full_notify.d" - -$(RM) "tx_trace_disable.d" "tx_trace_enable.d" "tx_trace_event_filter.d" "tx_trace_event_unfilter.d" "tx_trace_initialize.d" "tx_trace_interrupt_control.d" "tx_trace_isr_enter_insert.d" "tx_trace_isr_exit_insert.d" "tx_trace_object_register.d" "tx_trace_object_unregister.d" "tx_trace_user_event_insert.d" "txe_block_allocate.d" "txe_block_pool_create.d" "txe_block_pool_delete.d" "txe_block_pool_info_get.d" "txe_block_pool_prioritize.d" "txe_block_release.d" "txe_byte_allocate.d" "txe_byte_pool_create.d" "txe_byte_pool_delete.d" "txe_byte_pool_info_get.d" "txe_byte_pool_prioritize.d" "txe_byte_release.d" "txe_event_flags_create.d" "txe_event_flags_delete.d" "txe_event_flags_get.d" "txe_event_flags_info_get.d" "txe_event_flags_set.d" "txe_event_flags_set_notify.d" "txe_mutex_create.d" "txe_mutex_delete.d" "txe_mutex_get.d" "txe_mutex_info_get.d" "txe_mutex_prioritize.d" "txe_mutex_put.d" "txe_queue_create.d" "txe_queue_delete.d" "txe_queue_flush.d" "txe_queue_front_send.d" "txe_queue_info_get.d" - -$(RM) "txe_queue_prioritize.d" "txe_queue_receive.d" "txe_queue_send.d" "txe_queue_send_notify.d" "txe_semaphore_ceiling_put.d" "txe_semaphore_create.d" "txe_semaphore_delete.d" "txe_semaphore_get.d" "txe_semaphore_info_get.d" "txe_semaphore_prioritize.d" "txe_semaphore_put.d" "txe_semaphore_put_notify.d" "txe_thread_create.d" "txe_thread_delete.d" "txe_thread_entry_exit_notify.d" "txe_thread_info_get.d" "txe_thread_preemption_change.d" "txe_thread_priority_change.d" "txe_thread_relinquish.d" "txe_thread_reset.d" "txe_thread_resume.d" "txe_thread_suspend.d" "txe_thread_terminate.d" "txe_thread_time_slice_change.d" "txe_thread_wait_abort.d" "txe_timer_activate.d" "txe_timer_change.d" "txe_timer_create.d" "txe_timer_deactivate.d" "txe_timer_delete.d" "txe_timer_info_get.d" - -$(RM) "tx_thread_context_restore.d" "tx_thread_context_save.d" "tx_thread_interrupt_control.d" "tx_thread_schedule.d" "tx_thread_stack_build.d" "tx_thread_system_return.d" "tx_timer_interrupt.d" - -@echo 'Finished clean' - -@echo ' ' - -.PHONY: all clean dependents -.SECONDARY: - --include ../makefile.targets - diff --git a/ports/c667x/ccs/example_build/tx/Release/objects.mk b/ports/c667x/ccs/example_build/tx/Release/objects.mk deleted file mode 100644 index 742c2da04..000000000 --- a/ports/c667x/ccs/example_build/tx/Release/objects.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -USER_OBJS := - -LIBS := - diff --git a/ports/c667x/ccs/example_build/tx/Release/sources.mk b/ports/c667x/ccs/example_build/tx/Release/sources.mk deleted file mode 100644 index 95c7e8c3e..000000000 --- a/ports/c667x/ccs/example_build/tx/Release/sources.mk +++ /dev/null @@ -1,110 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -C55_SRCS := -A_SRCS := -ASM_UPPER_SRCS := -LDS_UPPER_SRCS := -CPP_SRCS := -CMD_SRCS := -O_SRCS := -C??_SRCS := -C64_SRCS := -C67_SRCS := -SA_SRCS := -S64_SRCS := -OPT_SRCS := -CXX_SRCS := -S67_SRCS := -S??_SRCS := -PDE_SRCS := -SV7A_SRCS := -K_SRCS := -CLA_SRCS := -S55_SRCS := -LD_UPPER_SRCS := -INO_SRCS := -LIB_SRCS := -ASM_SRCS := -S_UPPER_SRCS := -S43_SRCS := -LD_SRCS := -CMD_UPPER_SRCS := -C_UPPER_SRCS := -C++_SRCS := -C43_SRCS := -OBJ_SRCS := -LDS_SRCS := -S_SRCS := -CC_SRCS := -S62_SRCS := -C62_SRCS := -C_SRCS := -C55_DEPS := -C_UPPER_DEPS := -S67_DEPS := -S62_DEPS := -S_DEPS := -OPT_DEPS := -C??_DEPS := -ASM_UPPER_DEPS := -S??_DEPS := -C64_DEPS := -CXX_DEPS := -S64_DEPS := -INO_DEPS := -CLA_DEPS := -S55_DEPS := -SV7A_DEPS := -C62_DEPS := -C67_DEPS := -PDE_DEPS := -K_DEPS := -C_DEPS := -LIB_OUTPUTS := -CC_DEPS := -C++_DEPS := -C43_DEPS := -S43_DEPS := -OBJS := -ASM_DEPS := -S_UPPER_DEPS := -CPP_DEPS := -SA_DEPS := -C++_DEPS__QUOTED := -OPT_DEPS__QUOTED := -S_UPPER_DEPS__QUOTED := -SA_DEPS__QUOTED := -C??_DEPS__QUOTED := -S67_DEPS__QUOTED := -C55_DEPS__QUOTED := -CC_DEPS__QUOTED := -ASM_UPPER_DEPS__QUOTED := -SV7A_DEPS__QUOTED := -S??_DEPS__QUOTED := -OBJS__QUOTED := -C67_DEPS__QUOTED := -LIB_OUTPUTS__QUOTED := -K_DEPS__QUOTED := -S55_DEPS__QUOTED := -INO_DEPS__QUOTED := -C62_DEPS__QUOTED := -C_DEPS__QUOTED := -C_UPPER_DEPS__QUOTED := -C43_DEPS__QUOTED := -CPP_DEPS__QUOTED := -C64_DEPS__QUOTED := -CXX_DEPS__QUOTED := -CLA_DEPS__QUOTED := -S_DEPS__QUOTED := -ASM_DEPS__QUOTED := -S43_DEPS__QUOTED := -S64_DEPS__QUOTED := -S62_DEPS__QUOTED := -PDE_DEPS__QUOTED := - -# Every subdirectory with source files must be described here -SUBDIRS := \ -. \ - diff --git a/ports/c667x/ccs/example_build/tx/Release/subdir_rules.mk b/ports/c667x/ccs/example_build/tx/Release/subdir_rules.mk deleted file mode 100644 index 6ceea2dd3..000000000 --- a/ports/c667x/ccs/example_build/tx/Release/subdir_rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -SHELL = cmd.exe - -# Each subdirectory must supply rules for building sources it contributes -%.obj: ../%.c $(GEN_OPTS) | $(GEN_FILES) - @echo 'Building file: "$<"' - @echo 'Invoking: C6000 Compiler' - "C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/bin/cl6x" -mv6600 --abi=eabi -O2 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4/include" --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="$(basename $( -