Compile issue while using match control library in S32 application

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

Compile issue while using match control library in S32 application

1,030 Views
vrushalitaklika
Contributor III

Hi,

I am programming MPC5777C eqdc module. I have used abs function in my code. So for that I have included Math and control library in my code.

#include "derivative.h" /* include peripheral declarations */
#include "stdio.h"
#include "stdlib.h"
#include "MLIB_Abs.h"

During compilation I am facing issue related to MLIB_ABS.h code. However this code is not in my control it is already provided sdk which I included in my code. Please suggest 

In file included from C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Defines.h:47:0,
from C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/MLIB_Abs.h:65,
from ../src/main_Z7_0.c:9:
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:44:38: error: operator '!=' has no left operand
#if((SWLIBS_DEFAULT_IMPLEMENTATION != SWLIBS_DEFAULT_IMPLEMENTATION_F32)&& \
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:54:38: error: operator '==' has no left operand
#if((SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_F32)&&(SWLIBS_SUPPORT_F32 == SWLIBS_STD_OFF))
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:58:38: error: operator '==' has no left operand
#if((SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_F16)&&(SWLIBS_SUPPORT_F16 == SWLIBS_STD_OFF))
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:62:38: error: operator '==' has no left operand
#if((SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_FLT)&&(SWLIBS_SUPPORT_FLT == SWLIBS_STD_OFF))
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:116:38: error: operator '==' has no left operand
#if (SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_F32)
^
In file included from C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Defines.h:47:0,
from C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/MLIB_Abs.h:65,
from ../src/main_Z7_0.c:9:
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:128:38: error: operator '==' has no left operand
#if (SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_F16)
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/SWLIBS_Typedefs.h:140:38: error: operator '==' has no left operand
#if (SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_FLT)
^
In file included from ../src/main_Z7_0.c:9:0:
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/MLIB_Abs.h:78:38: error: operator '==' has no left operand
#if (SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_F32)
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/MLIB_Abs.h:89:38: error: operator '==' has no left operand
#if (SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_F16)
^
C:/Freescale/S32_Power_v1.1/S32DS/AMMCLIB/MPC577xC_AMMCLIB_v1.1.4/include/MLIB_Abs.h:101:38: error: operator '==' has no left operand
#if (SWLIBS_DEFAULT_IMPLEMENTATION == SWLIBS_DEFAULT_IMPLEMENTATION_FLT)
^

0 Kudos
1 Reply

681 Views
stanish
NXP Employee
NXP Employee

Hi,

You should select the default implementation for AMMCLIB (fractional 16/32 bit or float).

This could be selected by SWLIBS_DEFAULT_IMPLEMENTATION macro definition located at the end of in "SWLIBS_Config.h".

I assume you'd use float implementation since the MCU you are targeting has EFPU unit.

/******************************************************************************
* Selection of default implementation
******************************************************************************/
#ifndef SWLIBS_DEFAULT_IMPLEMENTATION
 #define SWLIBS_DEFAULT_IMPLEMENTATION  SWLIBS_SUPPORT_FLT /*!< Selection of default implementation. */
#endif /* SWLIBS_DEFAULT_IMPLEMENTATION */
#endif /* SWLIBS_CONFIG_H */

Hope it helps.
Stan
0 Kudos