Fix VFP build failure in Cortex-A tx_thread_schedule.S#493
Fix VFP build failure in Cortex-A tx_thread_schedule.S#493fdesbiens merged 2 commits intoeclipse-threadx:devfrom
Conversation
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.
There was a problem hiding this comment.
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 = 0x080definition conditionally whenTX_ENABLE_VFP_SUPPORTis defined - Added
FIQ_MASK = 0x040definition conditionally whenTX_ENABLE_FIQ_SUPPORTis 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.
|
Thank you for this contribution, @mehmetteren. I will ask a team member to review it. |
|
Hi @mehmetteren. Thank you again for this contribution. I propose a few changes to your original PR.
If you are fine with those, I will be happy to merge this to the dev branch right away. This would ship with our Q1 2026 release in a few days. Let me know what you think! |
|
LGTM, thanks for the changes @fdesbiens ! |
Description
Fixes undefined symbol errors (
IRQ_MASK/FIQ_MASK) when building Cortex-A ports (GNU/AC6) withTX_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