Page 1 of 1

Using CMSIS DSP

Posted: Fri Oct 16, 2020 10:30 am
by elagil
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!

Re: Using CMSIS DSP

Posted: Fri Oct 16, 2020 11:00 am
by Giovanni
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

Re: Using CMSIS DSP

Posted: Fri Oct 16, 2020 11:07 am
by elagil
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.

Re: Using CMSIS DSP

Posted: Fri Oct 16, 2020 11:10 am
by Giovanni
Note that the latest compiler 9.3.1 fixed the problem with M0 cores, it is safe to use.

Giovanni

Re: Using CMSIS DSP

Posted: Fri Oct 16, 2020 11:35 am
by elagil
That is great to hear, I will use it then.