modules: trusted-firmware-m: Fix TF-M floating point options
Fix setting of TF-M floating point options when floating point is
enabled in the application.
FP design in Armv8.0-M architecture requires consistent FP ABI types
between SPE and NSPE.
@@ -262,10 +262,13 @@ if (CONFIG_BUILD_WITH_TFM)
endif()
if(CONFIG_FPU AND CONFIG_FP_HARDABI)
- list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_FP=hard)
+ list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_ENABLE_FP=ON)
+ # Note: This is not a cmake option in TF-M.
+ # This should be specified by the platform in preload.cmake
+ # This works as a workaround for the platforms that do not have this.
list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_FP_ARCH=${FPU_FOR_${GCC_M_CPU}})
else()
- list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_FP=soft)
+ list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_ENABLE_FP=OFF)
endif()
file(MAKE_DIRECTORY ${TFM_BINARY_DIR})
