Problem in using the DSP/ARM Math Library on STM32G4 (Nucleo Board)
Hello,
I am working on STM32G4 and used the STM32CubeMX and STM32IDE tools. After generating the code using the CubeMX and copying DSP libraries from CubeMX repository to project/Drivers folder, I encounter this error during compile: Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)
Well, for this MCU, __FPU_PRESENT is already set to 1. But, Upon checking core_cm4.h, I noticed that SOFTFP is defined, and thus FPU_USED will be set to 0.
Please let me know how to resolve the SOFTFP issue or is there anything I missed.
#elif defined ( __GNUC__ )
#if defined (__VFP_FP__) || !defined(__SOFTFP__)
#if defined (__FPU_PRESENT) && (__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
Note that I've used the DSP library for STM32F4 and Atollic Truestudio and never encountered this problem.
Thanks
