Setting up CAN driver for s32k322 using code configuration tool

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Setting up CAN driver for s32k322 using code configuration tool

ソリューションへジャンプ
4,708件の閲覧回数
pratik_a
Contributor III

Hi,

I'm trying to configure CAN1 which is PTC8 and PTC9 of S32k322 as a CAN transceiver.  As can be seen in image 1.png I have included the necessary components. After updating the code I'm getting the following 5 errors,

Error 1:

workspaceS32DS.3.5\trial21_02_24\trial21_02_24_M7_1\Debug_FLASH/../RTD/src/Can_43_FLEXCAN.c:1135: undefined reference to `CanIf_ControllerModeIndication'

Error 2: 

s32ds.3.5/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/bin/real-ld.exe: workspaceS32DS.3.5\trial21_02_24\trial21_02_24_M7_1\Debug_FLASH/../RTD/src/Can_43_FLEXCAN.c:1184: undefined reference to `CanIf_ControllerModeIndication'

Error 3:

workspaceS32DS.3.5\trial21_02_24\trial21_02_24_M7_1\Debug_FLASH/../RTD/src/Can_43_FLEXCAN.c:2997: undefined reference to `CanIf_ControllerBusOff'

Error 4:

workspaceS32DS.3.5\trial21_02_24\trial21_02_24_M7_1\Debug_FLASH/../RTD/src/Can_43_FLEXCAN_Ipw.c:2613: undefined reference to `CanIf_ControllerModeIndication'

Error 5:

make: *** [makefile:39: trial21_02_24_M7_1.elf] Error 1

 

Any help is appreciated.

Thanks, in advance.

0 件の賞賛
返信
1 解決策
4,609件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @pratik_a,

Please try declaring the functions in your main code for your application, just like in the example:

void CanIf_ControllerBusOff(uint8 ControllerId)
{
    (void)ControllerId;
}

void CanIf_ControllerModeIndication(uint8 ControllerId, Can_ControllerStateType ControllerMode )
{
    (void)ControllerId;
    (void)ControllerMode;
}

Best regards,
Julián

元の投稿で解決策を見る

4 返答(返信)
4,572件の閲覧回数
pratik_a
Contributor III

Hi @Julián_AragónM 

It worked. Thanks

4,692件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @pratik_a,

Firstly, could you share the version of the RTD package you are using? 

Could you also share how did you create the project? Is this from scratch or are you basing this application off of the Can_Example from the RTD? 

Please confirm you are including the necessary file for the driver, as shown in the example (this is not made automatically with the "UpdateCode" button):

 

#include "Can_43_FLEXCAN.h"

 

Best regards,
Julián

0 件の賞賛
返信
4,674件の閲覧回数
pratik_a
Contributor III

Hi @Julián_AragónM 

Thank you for the response.

I'm creating the project from scratch. I selected the controller NXP S32k322 along with SDK named PlatformSDK_S32K3_S32K322_M7_0 version 3.0.0 refer image 1.png and included the modules directly from the components section as can be seen in image 2.png

I also tried including the header file in main.c

#include "Can_43_FLEXCAN.h"

The error still persists.

Best regards,

Pratik 

0 件の賞賛
返信
4,610件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @pratik_a,

Please try declaring the functions in your main code for your application, just like in the example:

void CanIf_ControllerBusOff(uint8 ControllerId)
{
    (void)ControllerId;
}

void CanIf_ControllerModeIndication(uint8 ControllerId, Can_ControllerStateType ControllerMode )
{
    (void)ControllerId;
    (void)ControllerMode;
}

Best regards,
Julián