Loading...
 

System Workbench for STM32


__SOFTFP__ defined even if hard floating-point ABI is selected

Hello

while trying to enable FPU support for a STM32F732, I have noticed that also the SOFTFP define is set (probably by the GCC compiler) when hard floating-point ABI is selected in the MCU settings. Only VFP_FP should be defined in this case.

This creates problems with CMSIS in core_cm7.h since a check for the presence of conflicting defines is performed:

#if defined (VFP_FP) && !defined(SOFTFP)
#if (__FPU_PRESENT == 1U)
#define __FPU_USED 1U
#else
#error “Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)”
#define __FPU_USED 0U
#endif
#else
#define __FPU_USED 0U
#endif

The result is that FPU_USED is set to zero and the coprocessor units are not enabled in SystemInit.

Rgds,

Alberto