Skip to main content
Associate III
November 28, 2024
Solved

How to use CMSIS-DSP (arm_math.h) with stm32h742?

  • November 28, 2024
  • 6 replies
  • 2521 views

I want to use arm_math.h in stm32cubeide.

 

Best regards.

Best answer by KDJEM.1

Hello @baby_chicken,

 

Do you want to integrate CMSIS-DSP libraries on an STM32 project?

You can check by opening the ARM.CMSIS.pdsc file in \STM32Cube_FW_H7_Vx.x.x\Drivers\CMSIS folder with notepad to know which CMSIS version is included in the package. 

KDJEM1_0-1732798461422.png

 

Thank you.

Kaouthar

6 replies

Andrew Neil
Super User
November 28, 2024

arm_math.h is just a header file - so you just #include it.

Please give more details on what you're actually trying to do ...

 

EDIT:

So the question is really about using CMSIS-DSP. I've edited the title to make that clear.

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
KDJEM.1Best answer
Technical Moderator
November 28, 2024

Hello @baby_chicken,

 

Do you want to integrate CMSIS-DSP libraries on an STM32 project?

You can check by opening the ARM.CMSIS.pdsc file in \STM32Cube_FW_H7_Vx.x.x\Drivers\CMSIS folder with notepad to know which CMSIS version is included in the package. 

KDJEM1_0-1732798461422.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
November 28, 2024

Since I am using stm32h742 this time, do I need to change M4 to M7 for these two below?

Best regards.

 

baby_chicken_0-1732799800474.png

 

baby_chicken_1-1732799829464.png

 

KDJEM.1
Technical Moderator
November 28, 2024

Hello @baby_chicken,

 

Yes, the libraries depend on the core you are using.

KDJEM1_0-1732800775438.png

So, from Project menu or File menugo to Properties > C/C++ Build > Settings > Tool Settings > MCU CGC Linker > Libraries > Libraries (-l) > Add and insert the following libraries: "arm_cortexM7l_math," "arm_cortexM7lfdp_math" and "arm_cortexM7lfsp_math".

Please use ARM_MATH_CM7 instead of ARM_MATH_CM4.

I think this post: STM32H723 CMSIS DSP can help you.

 

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
November 28, 2024

There is no MCU CGC Linker, but MCU G++ Linker is available.

 

Best regards.

 

baby_chicken_0-1732804173164.png

 

KDJEM.1
Technical Moderator
November 28, 2024

Hello @baby_chicken,

 

Are you using C++?

If you use C++, could you use "MCU G++ Compiler" for including paths and preprocessor and "MCU G++ Linker" for including libraries.

I recommend you to get inspired from the previous post.

Could you 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
November 29, 2024

MCU G++ Linker> Libraries > Libraries (-l) has “arm_cortexM7l_math,” “arm_cortexM7lfdp_math” “arm_cortexM7lfsp_math”. Add these.

baby_chicken_0-1732871358897.png

What should I add to MCU G++ Compiler> Include paths > Include paths(-l)?

baby_chicken_1-1732871647639.png

 

Am I correct in this perception?

Best regards.

 

 

KDJEM.1
Technical Moderator
November 29, 2024

Hello @baby_chicken

>What should I add to MCU G++ Compiler> Include paths > Include paths(-l)?

-->Add ../Drivers/CMSIS/DSP/Include path

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
November 29, 2024

baby_chicken_0-1732876957261.pngbaby_chicken_1-1732876994277.png

 

Is this correct?
The build went through.

Best regards.

 

KDJEM.1
Technical Moderator
November 29, 2024

Hello @baby_chicken,

 

Yes, it is correct.

If your request is answered, click on Accept as Solution on the reply which solved your issue or answered your question.

 

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
November 29, 2024

Thank you very much.