Skip to main content
Mary Solomo
Associate II
August 26, 2019
Question

Problem in using the DSP/ARM Math Library on STM32G4 (Nucleo Board)

  • August 26, 2019
  • 1 reply
  • 1206 views

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.

1 reply

October 13, 2019

Did you resolve this?

Mary Solomo
Associate II
October 14, 2019

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