Skip to content

Added ARMv7-A TX_THREAD offset checks - #800

Open
JeewoongKim wants to merge 1 commit into
eclipse-threadx:devfrom
JeewoongKim:fix/armv7a-gnu-offset-check
Open

JeewoongKim wants to merge 1 commit into
eclipse-threadx:devfrom
JeewoongKim:fix/armv7a-gnu-offset-check

Conversation

@JeewoongKim

Copy link
Copy Markdown

Addresses the ARMv7-A portion of #577.

The ARMv7-A assembly uses hard-coded offsets to access TX_THREAD members.
This change adds compile-time checks to catch mismatches when the structure layout changes.

The checker is added to shared ARMv7-A source tree and propagated to all seven Cortex-A
GNU and AC6 ports using update.sh. The GNU CMake files are also updated to compile it.

I built all seven GNU ports A{5, 7, 8, 9, 12, 15, 17} and confirmed that an incorrect VFP offset
(148 instead of 144) causes a compilation failure. The AC6 ports were not built.

I wrote this change by myself using the existing AI-generated Cortex-R52 offset checker (ports/cortex_r52/gnu/src/tx_port_offset_check.c) as a reference.
ChatGPT reviewed the ARMv7-A assembly to check whether all hard-coded TX_THREAD
member offsets were covered by the checker. I verified the findings against the assembly myself.

PR checklist

  • Updated function header with a short description and version number
  • Added test case for bug fix or new feature
  • Validated on real hardware

The ARMv7-A assembly uses hard-coded offsets to access TX_THREAD
members. Changes to the structure layout could break these accesses.

Added compile-time checks in the shared ARMv7-A source tree and
regenerated the GNU and AC6 port copies.

Built all seven GNU port and verified that an incorrect VFP offset
causes a compilation failure.

Assisted-by: ChatGPT (GPT-5.6 Sol)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant