[Solved] keil arm_math Error: error:  #35: #error directive: “Define according the used Cortex cor

Import arm_math file and compile error:

..\application\arm_math.h(306): error:  #35: #error directive: "Define according the used Cortex cor

 

Solution: Add the following global macro definition
USE_HAL_DRIVER,STM32F407xx,ARM_MATH_CM4,__FPU_USED=1U,__FPU_PRESENT=1U,__CC_ARM,ARM_MATH_MATRIX_CHECK,ARM_MATH_ROUNDING

Read More: