2016-07-15 03:32 AM
Please remove
2016-07-15 03:55 AM
Hiprzenioslo.lukas.001,
Why do you want to remove this discussion? Subject:Problem with math.h in thenewest mxCube
Body: Hello there, I have just updated mxCube to version 4.0. I am genereting startup code for SW4STM I am using arm_math libarry. Since this version, I am getting warning I should not be getting... For example:M:/5/Software/trunk/Embedded/eclipse_embedded_projects/SmartServo2/Drivers/CMSIS/Include/arm_math.h: In function
'arm_pid_q15'
:
M:/5/Software/trunk/Embedded/eclipse_embedded_projects/SmartServo2/Drivers/CMSIS/Include/arm_math.h:4889:19: warning: implicit declaration of function
'__SMUAD'
[-Wimplicit-function-declaration]
acc = (q31_t) __SMUAD((uint32_t)S->A0, (uint32_t)in);
And the thing is, I am not even using this __SMUAD macro, because my MCU is cortex M4 and I have the define ARM_MATH_CM4 set properly. So the preprocessor should not even consider this part of code and for some reason he is doing that and giving me a lot of warnings. Is there a way to suppress this somehow?
This is the part of code in arm_math.h:
#ifndef ARM_MATH_CM0_FAMILY
__SIMD32_TYPE *vstate;
/* Implementation of PID controller */
/* acc = A0 * x[n] */
acc = (q31_t) __SMUAD((uint32_t)S->A0, (uint32_t)in);
/* acc += A1 * x[n-1] + A2 * x[n-2] */
vstate = __SIMD32_CONST(S->state);
acc = (q63_t)__SMLALD((uint32_t)S->A1, (uint32_t)*vstate, (uint64_t)acc);
#else
/* acc = A0 * x[n] */
acc = ((q31_t) S->A0) * in;
/* acc += A1 * x[n-1] + A2 * x[n-2] */
acc += (q31_t) S->A1 * S->state[0];
acc += (q31_t) S->A2 * S->state[1];
#endif
ARM_MATH_CM0_FAMILY is not defined in my project, so why does he give the warning? I would appreciate all help. -Mayla-
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.