Processor Expert CAN_LDD code generation bool type error?

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

Processor Expert CAN_LDD code generation bool type error?

842 Views
bitjockey
Contributor II

Hello,

I have several projects that are using the PE CAN_LDD component, and I was attempting to enable the methods GetTXFrameState and GetRxFrameState. When I do and generate the PE component code that works fine, however when I go to compile I get the following errors:

 

"../Generated_Code/CAN1.c"
../Generated_Code/CAN1.c:874:6: error: conflicting types for 'CAN1_GetTxFrameState'
bool CAN1_GetTxFrameState(LDD_TDeviceData *DeviceDataPtr, LDD_CAN_TMBIndex BufferIdx)
^
In file included from ../Generated_Code/CAN1.c:156:0:
../Generated_Code/CAN1.h:504:6: note: previous declaration of 'CAN1_GetTxFrameState' was here
bool CAN1_GetTxFrameState(LDD_TDeviceData *DeviceDataPtr, LDD_CAN_TMBIndex BufferIdx);
^
../Generated_Code/CAN1.c:918:6: error: conflicting types for 'CAN1_GetRxFrameState'
bool CAN1_GetRxFrameState(LDD_TDeviceData *DeviceDataPtr, LDD_CAN_TMBIndex BufferIdx)
^
In file included from ../Generated_Code/CAN1.c:156:0:
../Generated_Code/CAN1.h:524:6: note: previous declaration of 'CAN1_GetRxFrameState' was here
bool CAN1_GetRxFrameState(LDD_TDeviceData *DeviceDataPtr, LDD_CAN_TMBIndex BufferIdx);
^

I am assuming there is an issue with the bool return variable, but I am not sure where to go to fix this. Any help is appreciated.

 

Thank You,

Labels (1)
0 Kudos
3 Replies

548 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Brian,

- Does your project includes MQX lib ?

If yes, please add the following definition in the Defined Symbols: bool=_Bool

refer to this thread :

Processor Expert generating code with errors 

- If not ,  could you please attached your project ?

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

548 Views
bitjockey
Contributor II

Alice,

I am not running MQX. I am including a KDS 3.2 Project that has the issue. If you try to build the project you will get errors related to the GetRxFrameState and GetTxFrameState. If you click on the component to open up the settings dialog, and you uncheck the GetRxFrameState and GetTxFrameState methods so that they do not generate code. Re-generate the PE software and rebuild it compiles fine. Do the reverse and you get the errors.

Best Regards,

0 Kudos

548 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Brian,

I test your project on my side , there is no error when build :

pastedImage_1.png

Could you please create a new project ,  then only add the component of CAN_LDD ,  check whether have error .

BR

Alice

0 Kudos