arm_math.h

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

arm_math.h

跳至解决方案
13,307 次查看
hunglam
Contributor II

Hi,

I have a problem when trying to use arm_math.h. I ve just included the arm_math.h and the core_cm4.h in my main file. when I compiled, I got the error: " #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0".  what did I miss?

I used the mcu k64f  and kinetis design studio with ksdk1.3

thanks

标签 (1)
0 项奖励
回复
1 解答
7,245 次查看
alexu
Contributor II

arm_math.h expects a Preprocessor symbol to define what type of core you have. From this setting core specific files are included that are optimized for the available hardware.

Open the project properties and go to C/C++ Build->Settings. Under the "Tool Settings" tab go to "Cross ARM C Compiler"->Preprocessor. There you should see something like "CPU_MK64FN1M0VMD12" defined (since you said you are using a K64 device). Add ""ARM_MATH_CM4"" to the list.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
7,246 次查看
alexu
Contributor II

arm_math.h expects a Preprocessor symbol to define what type of core you have. From this setting core specific files are included that are optimized for the available hardware.

Open the project properties and go to C/C++ Build->Settings. Under the "Tool Settings" tab go to "Cross ARM C Compiler"->Preprocessor. There you should see something like "CPU_MK64FN1M0VMD12" defined (since you said you are using a K64 device). Add ""ARM_MATH_CM4"" to the list.

0 项奖励
回复
7,245 次查看
valeianni
Contributor I

Hi!

I followed the procedure and now, when I try to use a function from arm_math (for example "arm_abs_f32"), I get the following error:

    C:\..\..\..\workspace\K64F_project\Debug/../source/my_functions.h:801: undefined reference to `arm_abs_f32'

I'm using a K64F device with MCUXpresso IDE.

How can I solve this?

Thanks in advance

0 项奖励
回复