summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/cortex_r52/gnu/CMakeLists.txt12
-rw-r--r--ports/cortex_r52/gnu/readme_threadx.txt9
2 files changed, 13 insertions, 8 deletions
diff --git a/ports/cortex_r52/gnu/CMakeLists.txt b/ports/cortex_r52/gnu/CMakeLists.txt
index af4642f8..26ca3028 100644
--- a/ports/cortex_r52/gnu/CMakeLists.txt
+++ b/ports/cortex_r52/gnu/CMakeLists.txt
@@ -60,13 +60,15 @@ if(TX_R52_ENABLE_FIQ_NESTING)
target_compile_definitions(${PROJECT_NAME} PUBLIC TX_ENABLE_FIQ_NESTING)
endif()
if(TX_R52_ENABLE_VFP)
- target_compile_definitions(${PROJECT_NAME} PUBLIC TX_ENABLE_VFP_SUPPORT)
if(NOT TX_R52_FLOAT_ABI STREQUAL "hard")
- message(WARNING
- "TX_R52_ENABLE_VFP is on but TX_R52_FLOAT_ABI is '${TX_R52_FLOAT_ABI}'. "
- "The compiler will not emit floating-point instructions, so the VFP "
- "context path will never be exercised. Use -DTX_R52_FLOAT_ABI=hard.")
+ message(FATAL_ERROR
+ "TX_R52_ENABLE_VFP requires TX_R52_FLOAT_ABI=hard, but it is "
+ "'${TX_R52_FLOAT_ABI}'. TX_ENABLE_VFP_SUPPORT enables the VMRS, "
+ "VSTMDB and VLDMIA blocks in the port assembly, and a soft float "
+ "ABI leaves the assembler with no FPU to accept them, so this "
+ "combination fails to assemble. Use -DTX_R52_FLOAT_ABI=hard.")
endif()
+ target_compile_definitions(${PROJECT_NAME} PUBLIC TX_ENABLE_VFP_SUPPORT)
endif()
# Armv8-R AEM FVP example builds (boot check now, kernel demo from AR1/M2).
diff --git a/ports/cortex_r52/gnu/readme_threadx.txt b/ports/cortex_r52/gnu/readme_threadx.txt
index ccc2c8d6..4ad3cc34 100644
--- a/ports/cortex_r52/gnu/readme_threadx.txt
+++ b/ports/cortex_r52/gnu/readme_threadx.txt
@@ -25,6 +25,7 @@ is empty, so no A- or R-profile port could previously be built this way.
-DTX_R52_FLOAT_ABI=soft|hard floating-point ABI, default soft
-DTX_R52_ENABLE_VFP=ON lazy VFP context save and restore
+ (requires TX_R52_FLOAT_ABI=hard)
-DTX_R52_ENABLE_FIQ=ON FIQ support
-DTX_R52_ENABLE_IRQ_NESTING=ON nested IRQ support
-DTX_R52_ENABLE_FIQ_NESTING=ON nested FIQ support (requires the above)
@@ -33,9 +34,11 @@ is empty, so no A- or R-profile port could previously be built this way.
-DTX_R52_CONSOLE_PL011=ON console on the PL011 UART, not semihosting
TX_R52_ENABLE_VFP is PUBLIC: it changes which registers the context switch
-saves, so the library and the application must agree. Pair it with
-TX_R52_FLOAT_ABI=hard, otherwise the compiler emits no floating-point
-instructions and the VFP path is never exercised.
+saves, so the library and the application must agree. It requires
+TX_R52_FLOAT_ABI=hard, and configure refuses the combination rather than
+warning about it: the flag enables the VFP blocks in the port assembly, and a
+soft float ABI leaves the assembler with no FPU to accept them, so the build
+fails on the first VMRS rather than quietly skipping the VFP context path.
Cortex-R52 always implements at least a single-precision FPU. GCC rejects
"-mcpu=cortex-r52+nofp" and offers only "+nofp.dp", so the soft-float