I installed the "Automotive Math and Motor Control Library set for MPC5748G" following by its user guide.
But I got many error messages while I'm only using the function of "Acos", does anyone know the reason? I'm posting my code and error messages as below.
Code: (omit the unnecessary code)
#include "derivative.h" /* Include peripheral declarations */
#include "project.h" /* Define Macros */
#include "mode.h" /* Change clock modes */
#include "adc.h" /* Configure ADC */
#include "GFLIB_Acos.h"#define GFLIB_ACOS_DEFAULT_F16 &f16gflibAcosCoef
extern uint16_t Result;
tFloat f16Input;
tFloat f16Angle;int main(void)
{...
while(1) {
if (ADC_1.ISR.B.ECH){
ADC1_Read_Chan(); /* Read conversion Results from ADC*/
f16Input = FRAC16(Result);
f16Angle = GFLIB_Acos_F16(f16Input, GFLIB_ACOS_DEFAULT_F16);...
}
}
}
Error message:
And there are many similar prefix "SWLIB_xxx", "MLIB_xxx", "GFLIB_xxx" with the following error "error: operator '==' has no left operand" shown in the console.
While the example on the user guide is very simple, but it causes the same errors as above.
Solved! Go to Solution.
Hi,
regarding error I see only way that you have incorrectly added Library search path - in your screenshot is missing the end of path, so it is not clear if you added correct path including the selected core (e200z2 vs e200z4).
If you have separated project for each core you have to set the library path for each core for those projects.
EWL vs bewlib - this is usually selected in project wizard which will ensure all necessary settings.
regards,
Peter
Hello,
regards,
Peter
Thanks for your response.
I have downloaded the latest version and installed it by the user's guide. And now it only shows 1 error message when build.
which is very strange, because I already add "mpc574xG_AMMCLIB.a" in the library. Please see the screenshot below.
For the 3) you mentioned, do you mean I have to delete the EWL library while I'm using the Ammclib? Or just EWL and AMMClib cannot use it together?
Original code has modified to define the "SWLIBS_DEFAULT_IMPLEMENTATION".
#include "gflib.h"
#include "SWLIBS_Config.h"#define SWLIBS_DEFAULT_IMPLEMENTATION SWLIBS_DEFAULT_IMPLEMENTATION_F16
Regards,
Junyi
Hi,
regarding error I see only way that you have incorrectly added Library search path - in your screenshot is missing the end of path, so it is not clear if you added correct path including the selected core (e200z2 vs e200z4).
If you have separated project for each core you have to set the library path for each core for those projects.
EWL vs bewlib - this is usually selected in project wizard which will ensure all necessary settings.
regards,
Peter