Skip to main content
Associate III
August 28, 2024
Solved

How to use DSP libraries (e.g. arm_math.h) in STM32cubeIDE

  • August 28, 2024
  • 6 replies
  • 6246 views

Hello All,

I wanted to copy two files from the STM32Cube directory to use arm_math.h, but those files are nowhere to be found.

 

STM32Cube\Repository\STM32Cube_FW_F4_Vxxxx\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib
STM32Cube\Repository\STM32Cube_FW_F4_Vxxxx\Drivers\CMSIS\Lib\GCC\libarm_cortexM4lf_math.a

 

What should we do when these two are not available?

 

best regards.

 

STM32F407vgt6,cubeIDE Version: 1.14.1,CMSIS Version5.9.0

 

    Best answer by KDJEM.1

    Hi @baby_chicken ,

     

    Could you please add the ../Drivers/CMSIS_DSP/Include path and the ../Drivers/CMSIS_DSP/PrivateInclude path to "MCU G++ Compiler" "Include paths"

    KDJEM1_0-1725012421772.png

    KDJEM1_1-1725012492309.png

     

    Thank you;

    Kaouthar

     

    6 replies

    Andrew Neil
    Super User
    August 28, 2024
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Associate III
    August 28, 2024

    @Andrew Neil ,Thank you for your response.

     

    I have done all of the above and still get an error. What should I do?

     

    error: arm_math.h: No such file or directory

     

    best regards.

    Andrew Neil
    Super User
    August 28, 2024

    @baby_chicken wrote:

    error: arm_math.h: No such file or directory


    So have you checked if that file does actually exist somewhere - anywhere - in your project?

    Clearly, if it doesn't exist then the compiler is correct in saying, "no such file"!

    If it does exist, then is it in a place where your project is configured to find it? ie, is it somewhere as defined in your Include Paths?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    KDJEM.1
    Technical Moderator
    August 28, 2024

    Hello @baby_chicken ,

     

    If you want to use 5.8.0 version of CMSIS or higher, I advise you to follow the steps shared in this FAQ: How to integrate CMSIS-DSP libraries on a STM32 project

    Please let me know if the issue is solved or not?

     

    Thank you.

    Kaouthar

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    Associate III
    August 28, 2024

    @KDJEM.1  ,Thank you for your response

     

    When I try this method, I get an error “error: arm_math.h: No such file or directory”.

     

    What should I do?

    best regards.

     

    KDJEM.1
    Technical Moderator
    August 28, 2024

    Hi @baby_chicken ,

     

    Are you copy the Include Drivers from STM32Cube_FW_F4_V1.28.0\CMSIS\DSP\Include to your generate project?

     

    KDJEM1_2-1724854251907.png

    For that please, ensure that steps 3, 4 and 7 shared in the FAQ are followed properly.

    KDJEM1_0-1724853603217.png

     

    Thank you.

    Kaouthar

     

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    Associate III
    August 28, 2024

    @KDJEM.1  ,Thank you for your response.

     

    I just checked and copied it to the project generated from STM32Cube_FW_F4_V1.28.0\CMSIS\DSP\Include.

     

    best regards.

    KDJEM.1
    Technical Moderator
    August 28, 2024

    Hi @baby_chicken ,

     

    Are your issue is solved or not?

    If not could you please share your project?

     

    Thank you.

    Kaouthar

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    Associate III
    August 28, 2024

    @KDJEM.1  ,Thank you for your response.

     

    The problem has not yet been resolved.
    It is a little difficult to give you the entire project as it is because of all the things involved. We are really sorry.

     

    best regards.

    Andrew Neil
    Super User
    August 28, 2024

    @baby_chicken wrote:

    It is a little difficult to give you the entire project as it is because of all the things involved. We are really sorry.


    Create a minimum but complete project which demonstrates the issue, and share that.

    In doing so, you might actually get a working project - which you could then compare to your real project to see what's different ...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    KDJEM.1
    Technical Moderator
    August 29, 2024

    Hi @baby_chicken ,

     

    Sure, you are always welcome :).

    If you want you can send a minimum project by Private Message.

     

    Thank you.

    Kaouthar

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    Associate III
    August 29, 2024

    Thank you so much @KDJEM.1 .

    KDJEM.1
    KDJEM.1Best answer
    Technical Moderator
    August 30, 2024

    Hi @baby_chicken ,

     

    Could you please add the ../Drivers/CMSIS_DSP/Include path and the ../Drivers/CMSIS_DSP/PrivateInclude path to "MCU G++ Compiler" "Include paths"

    KDJEM1_0-1725012421772.png

    KDJEM1_1-1725012492309.png

     

    Thank you;

    Kaouthar

     

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.