Skip to main content
Explorer
January 2, 2024
Question

Compilation error while integrating DSP library

  • January 2, 2024
  • 4 replies
  • 3219 views

While replicating the method of integrating DSP libraries into my STM32 project as discussed in the following thread: tutorial , I encountered the error #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" during the project compilation. I'd like to share a solution that proved effective in resolving this issue.

Upon inspecting the "arm_math.h" file, I observed that, after the preprocessor directives, there is an inclusion of the header file containing information related to the device's peripheral access layer, in my case, "stm32f407xx.h". The solution involved simply moving the `#include "stm32f407xx.h"` directive to the beginning of the "arm_math.h" file. Following this modification and performing a clean build of the project, the error disappeared.

Note: The microcontroller used is STM32F407VET6.

I hope this solution proves helpful to other members of the STM32 community who might face similar challenges when integrating DSP libraries into their projects. If you need further details or have other suggestions, feel free to discuss.

 

ErrorError

moving includemoving include

resultresult

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    February 5, 2024
    Technical Moderator
    February 8, 2024

    Hello @isaac-vinicius and welcome to the Community :),

    Thank you for reporting this issue and the solution tin the STCommunity.

    To check the issue, could you please give more details about the STM32CubeIDE version and the STM32CubeF4 revision are you using?

    What level of optimization are you using?

    KDJEM1_0-1707408429147.png

    May be this discussion can help you DSP Installing

    Thank you.

    Kaouthar

     

    Explorer
    February 8, 2024

     

    Hello,

    Thank you for welcome. Below, I'll provide screenshots containing the information about the versions I'm using. If needed, I can supply additional images.

    Best regards,
    [Isaac Vinicius]

     STM32CubeIDE version:

    version.png

    STM32CubeF4 revision:

    STM32CubeF4pack.png

    Level of optimization (Default):

    optimization.png

    Technical Moderator
    February 13, 2024

    Hello @isaac-vinicius,

    I made a test and I follow the steps shared in How to integrate DSP Libraries on STM32 project? An example using STM32F429 FAQ but I didn't reproduce the issue.

    The project (in attachment) build without error. 

    Thank you.

    Kaouthar