Skip to main content
hashtala
Associate III
Aug 27, 2020 9:08 PM UTC
Solved

STM32F767 + CMSIS DSP + Keil = Error.

Im trying to use rftt_q15 from CMSIS DSP libraries on my STM32F767Zi

The following error I get is quite strange. it says

 #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS, ARM_MATH_CM0, ARM_MATH_ARMV8MBL, ARM_MATH_ARMV8MML"

which is called from this:

#if defined(ARM_MATH_CM7)

 #include "core_cm7.h"

 #define ARM_MATH_DSP

#elif defined (ARM_MATH_CM4)

 #include "core_cm4.h"

 #define ARM_MATH_DSP

#elif defined (ARM_MATH_CM3)

 #include "core_cm3.h"

#elif defined (ARM_MATH_CM0)

 #include "core_cm0.h"

 #define ARM_MATH_CM0_FAMILY

#elif defined (ARM_MATH_CM0PLUS)

 #include "core_cm0plus.h"

 #define ARM_MATH_CM0_FAMILY

#elif defined (ARM_MATH_ARMV8MBL)

 #include "core_armv8mbl.h"

 #define ARM_MATH_CM0_FAMILY

#elif defined (ARM_MATH_ARMV8MML)

 #include "core_armv8mml.h"

 #if (defined (__DSP_PRESENT) && (__DSP_PRESENT == 1))

  #define ARM_MATH_DSP

 #endif

#else

 #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS, ARM_MATH_CM0, ARM_MATH_ARMV8MBL, ARM_MATH_ARMV8MML"

#endif

However I have defined in main:

#define ARM_MATH_CM7;

then I removed this code and did what it would do if it saw ARM_MATH_CM7

#include "core_cm7.h" but if gave 35 errors saying that:

..\Drivers\CMSIS\DSP\Include\arm_math.h(5791): error: #757: function "int32_t" is not a type name

and other funny things like that

I have added include and source paths and also Included them from Keil project window

any ideas???

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Aug 27, 2020 9:21 PM UTC

>>However I have defined in main: #define ARM_MATH_CM7;

Normally you'd put it in the compiler's command line define list, and without semicolons

ARM_MATH_CM7

__FPU_PRESENT=1U

I'd expect stm32f7xx_hal.h to define uint32_t

otherwise stdint.h

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

4 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Aug 27, 2020 9:21 PM UTC

>>However I have defined in main: #define ARM_MATH_CM7;

Normally you'd put it in the compiler's command line define list, and without semicolons

ARM_MATH_CM7

__FPU_PRESENT=1U

I'd expect stm32f7xx_hal.h to define uint32_t

otherwise stdint.h

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
hashtala
hashtalaAuthor
Associate III
Aug 27, 2020 9:51 PM UTC

Thank you Clive or your response

I am a little bit confused however

0693W000002lbP6QAI.png

I am guessing I didn't specify it in a correct place.

where exactly do I need to write that down?

Do I need to add something to the blue circle related to CMSIS or do I leave it as it is

again, thanks for your response

Amel NASRI
ST Technical Moderator
Sep 9, 2020 11:34 AM UTC

Hi @hashtala​ ,

If you didn't yet found the answer to your question: the new defines need to appear in "Preprocessor Symbols" section.

Look to the configuration used in the project STM32CubeExpansion_AN4667_F7_V4.0.0\Projects\STM32F769I_EVAL\stm32f7_performances for example:

0693W000003RA8QQAW.png

This example with some other ones are available in the package X-CUBE-32F7PERF.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.