Skip to main content
Visitor II
August 27, 2020
Solved

STM32F767 + CMSIS DSP + Keil = Error.

  • August 27, 2020
  • 1 reply
  • 3306 views

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.
    Best answer by Tesla DeLorean

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

    1 reply

    Graduate II
    August 27, 2020

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

    hashtalaAuthor
    Visitor II
    August 27, 2020

    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

    Technical Moderator
    September 9, 2020

    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