We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I cannot compile project where arm_math.h included:
Added"Options for Target" > "C/C++" > "Defines":
C/C++ :- ARM_MATH_CM4 - __FPU_PRESENT = 1
But cannot compile
Error: L6218E: Undefined symbol arm_pid_init_f32 (referred from main.o).
IlgarSky said:cannot compile
Actually, that's a Linker error - not a problem with compiling.
IlgarSky said:Undefined symbol arm_pid_init_f32
So define that symbol, then!
EDIT
Maybe these help:
https://community.arm.com/search?q=undefined%20symbol%20header%20source&group=33#serpauthor=5397&serpdate=past_year
In particular: https://community.arm.com/developer/tools-software/tools/f/keil-forum/43670/these-are-some-wrong-with-title-files/158876#158876
Thank you for answer.I`ve added following to main.c and compiled successfully and PID starts to work:
void arm_pid_init_f32( arm_pid_instance_f32 * S, int32_t resetStateFlag) { /* Derived coefficient A0 */ S->A0 = S->Kp + S->Ki + S->Kd; /* Derived coefficient A1 */ S->A1 = (-S->Kp) - ((float32_t) 2.0 * S->Kd); /* Derived coefficient A2 */ S->A2 = S->Kd; /* Check whether state needs reset or not */ if(resetStateFlag) { /* Clear the state buffer. The size will be always 3 samples */ memset(S->state, 0, 3u * sizeof(float32_t)); } }