arm_math.h

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

arm_math.h

Jump to solution
10,841 Views
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

Labels (1)
0 Kudos
1 Solution
4,779 Views
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.

View solution in original post

0 Kudos
2 Replies
4,780 Views
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 Kudos
4,779 Views
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 Kudos