arm_math.h

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
10,875件の閲覧回数
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 解決策
4,813件の閲覧回数
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 返答(返信)
4,814件の閲覧回数
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 件の賞賛
4,813件の閲覧回数
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 件の賞賛