Refused the Cortex-R52 VFP option without a hard float ABI - #686
Merged
fdesbiens merged 1 commit intoSep 1, 2026
Merged
Conversation
TX_R52_ENABLE_VFP with the default soft float ABI cannot build. The option defines TX_ENABLE_VFP_SUPPORT, which enables the VMRS, VSTMDB and VLDMIA blocks in the port assembly, and -mfloat-abi=soft leaves the assembler with no FPU to accept them. The configuration fails with eight errors of the form tx_thread_system_return.S:118: Error: selected processor does not support `vmrs r4,FPSCR' in ARM mode none of which mentions the float ABI, so a user has to reason from VMRS back to the option that enabled it. The guard that exists said otherwise. It warned that "the compiler will not emit floating-point instructions, so the VFP context path will never be exercised", which describes a build that succeeds and is merely pointless -- and then let configure finish, so the warning scrolled past well before the assembler errors appeared. It is now a FATAL_ERROR that names the fix, which is what the same file already does six lines above for TX_R52_ENABLE_FIQ_NESTING without TX_R52_ENABLE_FIQ. That combination is rejected for being "meaningless", while this one, which cannot assemble at all, was only warned about. The severities were the wrong way round. The option's definition also moves below the check, so the block reads like the FIQ nesting one. The ABI is not promoted to hard automatically. TX_R52_FLOAT_ABI is a cache variable the user may have set deliberately, and silently overriding an explicit choice is worse than refusing a combination that cannot work. readme_threadx.txt carried the same claim, and its option list marked the FIQ nesting dependency inline but not this one. Both corrected. No regression test. Nothing in the tree asserts a configure-time failure -- there is no harness for it, and the sibling FIQ nesting guard has none either -- so a test for this would have to introduce that mechanism for one case. Verified by hand in both directions instead: the soft-ABI combination now stops at configure with the message above, and the hard-ABI feature build (VFP, FIQ, IRQ nesting, FIQ nesting) builds its eight images clean and passes ctest 8/8 on the Armv8-R AEM FVP. scripts/check_gcc.sh passes unchanged; it configures the Cortex-R52 CMake stage without TX_R52_ENABLE_VFP, so the new branch is not on its path. Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
This was referenced Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TX_R52_ENABLE_VFPwith the default soft float ABI cannot build, and the guard that exists says otherwise.What happens today
The option defines
TX_ENABLE_VFP_SUPPORT, which enables theVMRS,VSTMDBandVLDMIAblocks in the port assembly.-mfloat-abi=softleaves the assembler with no FPU to accept them, so:None of them mentions the float ABI, so a user has to reason from
VMRSback to the option that enabled it.The port did warn, but the warning described the wrong outcome — "the compiler will not emit floating-point instructions, so the VFP context path will never be exercised", which is a build that succeeds and is merely pointless. Configure then completed, so by the time the assembler errors appeared the warning was a couple of hundred lines up the scrollback.
The change
WARNINGbecomesFATAL_ERROR, with a message that names the fix.This is what the same file already does six lines above, for
TX_R52_ENABLE_FIQ_NESTINGwithoutTX_R52_ENABLE_FIQ— rejected outright for being "meaningless". So the file was treating a merely pointless combination as fatal and an unbuildable one as a warning. The severities were the wrong way round; this makes them consistent. The option'starget_compile_definitionsalso moves below the check so the two blocks read the same way.The ABI is deliberately not promoted to
hardautomatically.TX_R52_FLOAT_ABIis a cache variable a user may have set on purpose, and silently overriding an explicit choice is worse than refusing a combination that cannot work.readme_threadx.txtcarried the same wrong claim, and its option list marked the FIQ-nesting dependency inline but not this one. Both corrected.Verification
Both directions, by hand:
TX_R52_ENABLE_VFP requires TX_R52_FLOAT_ABI=hard, but it is 'soft'.and an explanation of why.hardwithout VFP both still configure cleanly.scripts/check_gcc.shpasses. Its Cortex-R52 CMake stage configures withoutTX_R52_ENABLE_VFP, so the new branch is not on its path.Toolchain GNU Arm 14.3.1.
No regression test, and why
Nothing in the tree asserts a configure-time failure — there is no harness for it, and the sibling FIQ-nesting guard has none either. A test for this one case would have to introduce that mechanism. If a configure-failure harness is wanted, it is worth having for both guards at once rather than bolted on here.
The guard block dates from #579 and is unrelated to any module-manager work.