Skip to main content
Mary Solomo
Associate II
Aug 26, 2019 7:39 AM UTC
Question

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

This topic has been closed for replies.

2 replies

Oct 13, 2019 10:20 AM UTC

Did you resolve this?

Mary Solomo
Associate II
Oct 14, 2019 2:11 AM UTC

No. Currently, we halted the project that's using this MCU. But I'd still would like to know solutions for this issue.