Using CMSIS DSP

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

elagil
Posts: 76
Joined: Tue Sep 19, 2017 7:38 am
Has thanked: 7 times
Been thanked: 5 times

Using CMSIS DSP

Postby elagil » Fri Oct 16, 2020 10:30 am

Hello!

I want to use the CMSIS DSP libraries with my STM32F746.

Therefore, I got CMSIS 5 from git and included it with a custom cmsis.mk:

Code: Select all

DSP_ROOT := ./../cmsis/CMSIS/DSP

# List of the CMSIS DSP files
CMSISDSPSRC = ${DSP_ROOT}/Source/$(wildcard */*.c)
CMSISDSPINC = ${DSP_ROOT}/Include ${DSP_ROOT}/Include/dsp

# Shared variables
ALLCSRC += $(CMSISDSPSRC)
ALLINC  += $(CMSISDSPINC)


I include the above file in my main makefile with

Code: Select all

include ./cmsis.mk


The functions are then found in my code, but I get compiler warnings:

Code: Select all

./../cmsis/CMSIS/DSP/Include/arm_math_types.h:102:5: warning: "__ARM_FEATURE_MVE" is not defined [-Wundef]
 #if __ARM_FEATURE_MVE


I assume that I need to tell CMSIS about the feature set of my processor. What is the best way to do it? Is something like this already defined in ChibiOs?

Thanks in advance!

User avatar
Giovanni
Site Admin
Posts: 13063
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 757 times
Been thanked: 636 times
Contact:

Re: Using CMSIS DSP

Postby Giovanni » Fri Oct 16, 2020 11:00 am

Hi,

If I remember well that macro has to be defined by the compiler, you need to use the latest ARM GCC. What version are you using? you may also try to define that macro to zero in the makefile.

Giovanni

elagil
Posts: 76
Joined: Tue Sep 19, 2017 7:38 am
Has thanked: 7 times
Been thanked: 5 times

Re: Using CMSIS DSP

Postby elagil » Fri Oct 16, 2020 11:07 am

Thank you!

Indeed, I was using an old 2016 version of the compiler, due to that bug with STM32F0 series parts.

Switching to the latest 2020 compiler does not define these values either, however the warning changes to

Code: Select all

warning: "__ARM_FEATURE_MVE" is not defined, evaluates to 0 [-Wundef]


I may define it manually then.

User avatar
Giovanni
Site Admin
Posts: 13063
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 757 times
Been thanked: 636 times
Contact:

Re: Using CMSIS DSP

Postby Giovanni » Fri Oct 16, 2020 11:10 am

Note that the latest compiler 9.3.1 fixed the problem with M0 cores, it is safe to use.

Giovanni

elagil
Posts: 76
Joined: Tue Sep 19, 2017 7:38 am
Has thanked: 7 times
Been thanked: 5 times

Re: Using CMSIS DSP

Postby elagil » Fri Oct 16, 2020 11:35 am

That is great to hear, I will use it then.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 3 guests