cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F767 + CMSIS DSP + Keil = Error.

hashtala
Associate II

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???

1 ACCEPTED SOLUTION

Accepted Solutions

>>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 Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4

>>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 Up vote any posts that you find helpful, it shows what's working..

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

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 Accept as Solution on the reply which solved your issue or answered your question.

Thanks Amel

I got it up and running smoothly but do not remember how exactly I solved it

I think I just added definition of __FPU_PRESENT somewhere in my code instead

Thanks for the solution