Skip to content

Conversation

@mehmetteren
Copy link

Description

Fixes undefined symbol errors (IRQ_MASK / FIQ_MASK) when building Cortex-A ports (GNU/AC6) with TX_ENABLE_VFP_SUPPORT.

These masks (0x80/0x40) are required for the VFP context restore logic but were missing from tx_thread_schedule.S.

Validation

Hardware: Xilinx Zynq-7000 (ZC702)
Toolchain: GNU Arm Embedded
Result: Confirmed successful compilation and context switching with -DTX_ENABLE_VFP_SUPPORT.

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

When TX_ENABLE_VFP_SUPPORT is defined, the build fails due to missing
IRQ_MASK and FIQ_MASK symbols in the restore logic.

This adds the local definitions (0x80 and 0x40) to tx_thread_schedule.S
to match tx_thread_interrupt_restore.S, enabling successful compilation
on GNU and AC6 Cortex-A ports.
Copilot AI review requested due to automatic review settings January 6, 2026 16:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes build failures in Cortex-A ports (A5, A7, A8, A9, A12, A15, A17) when compiling with VFP (Vector Floating Point) support enabled. The issue was that IRQ_MASK and FIQ_MASK constants were referenced in VFP-related interrupt restoration code but were not defined in the tx_thread_schedule.S files.

Key Changes:

  • Added IRQ_MASK = 0x080 definition conditionally when TX_ENABLE_VFP_SUPPORT is defined
  • Added FIQ_MASK = 0x040 definition conditionally when TX_ENABLE_FIQ_SUPPORT is defined

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ports/cortex_a5/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A5 GNU toolchain
ports/cortex_a5/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A5 AC6 toolchain
ports/cortex_a7/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A7 GNU toolchain
ports/cortex_a7/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A7 AC6 toolchain
ports/cortex_a8/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A8 GNU toolchain
ports/cortex_a8/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A8 AC6 toolchain
ports/cortex_a9/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A9 GNU toolchain
ports/cortex_a9/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A9 AC6 toolchain
ports/cortex_a12/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A12 GNU toolchain
ports/cortex_a12/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A12 AC6 toolchain
ports/cortex_a15/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A15 GNU toolchain
ports/cortex_a15/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A15 AC6 toolchain
ports/cortex_a17/gnu/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A17 GNU toolchain
ports/cortex_a17/ac6/src/tx_thread_schedule.S Added IRQ_MASK and FIQ_MASK constant definitions for Cortex-A17 AC6 toolchain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fdesbiens
Copy link
Contributor

Thank you for this contribution, @mehmetteren. I will ask a team member to review it.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants