Skip to content

Conversation

@mehmetteren
Copy link

@mehmetteren mehmetteren commented Dec 16, 2025

Description

This PR fixes a compilation error in tx_thread_schedule.S for ARM Cortex-A ports (GNU and AC6) when TX_ENABLE_VFP_SUPPORT is defined.

When VFP support is enabled, the context restore logic at the end of the scheduling loop attempts to use IRQ_MASK and FIQ_MASK to manage interrupt state. However, these symbols are not defined in the assembly files, leading to build failures:
undefined symbol IRQ_MASK used as an immediate value

This issue appears to be present across multiple Cortex-A ports (GNU and AC6). This PR adds the missing definitions (IRQ_MASK = 0x80, FIQ_MASK = 0x40) to the affected files.

Fix

Added local definitions for IRQ_MASK and FIQ_MASK in tx_thread_schedule.S. This aligns with the definitions found in tx_thread_interrupt_restore.S and enables successful compilation of the VFP context switch logic.

Validation

Hardware: Xilinx Zynq-7000 (ZC702)
Toolchain: GNU Arm Embedded Toolchain
Verification:

  1. Configured BSP with -DTX_ENABLE_VFP_SUPPORT.
  2. Encountered build failure due to missing symbols.
  3. Applied the fix.
  4. Validated successful compilation and basic context switching on hardware.

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

Copilot AI review requested due to automatic review settings December 16, 2025 15:59
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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