CAN_LDD Init() undefined reference

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CAN_LDD Init() undefined reference

3,587 次查看
stefano_conegia
Contributor I

Hi All,

I'm using  CodeWarrior for MCU, Version: 10.6.4, Build Id:150416 with Cpu of type MK60DN512VMD10
Description: Freescale Kinetis family : MK60 in 144 pin MAPBGA package.

I am using Processor Exports components for various part of my project.

For example, I am using a SPIMaster_LDD without any kinds of problem... as you can see into attached image

Now I need to develop on my board a CAN serial communication component.

Using CAN_LDD, created with PE, when I build my project, I have the following link error:

C:\CFD_Projects\Prod\SM_CFDB0\S251R0_Fnet_Release/../Sources/Serial/canbusProt.c:53: undefined reference to `CANBUS_PROT_Init(void*)'

I use CAN_LDD component with Interrupt enable and CANBUS_PROT is the name of my CAN_LDD component.

Note that I have precompiled and build the BSP library without problems. The linker doesn't see the functions produced by BSP PE build (Init, ReadFrame, SendFrame ecc.)

Thanks in advance for your answers!

Stefano

0 项奖励
回复
7 回复数

3,361 次查看
danielchen
NXP TechSupport
NXP TechSupport

HI Stefano:

Do you use MQX or the bare metal version. If MQX is used, which version.

Regards

Daniel

0 项奖励
回复

3,361 次查看
stefano_conegia
Contributor I

Hi Daniel,

I am using MQX41

Thanks

0 项奖励
回复

3,361 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Stefano:

I tried this with MQX 4.2, it can work on my side, please see below picture. I only installed MQX 4.2 on my PC.

For your issue, the undefined reference maybe you need to check the include path is valid or not. or whether the code is generated.   With MQX 4.1, you also need to check the windows environment variables. The MQX_ROOT, and MQX_PATH .

pastedImage_1.png

Regards

Daniel

0 项奖励
回复

3,361 次查看
stefano_conegia
Contributor I

Hi Daniel,

thanks for your answer. 

what I think is that there is a bug in version 4.1 of MQX, then resolved from version 4.2; in fact if you see the following images are exactly the same as yours and the environment variables are corretc:

pastedImage_11.png

pastedImage_2.png
I also think to have partially solved with this workaround: I copied the 2 files produced by the PE in the folder of my source and the linker no longer gives problems:

pastedImage_14.png
I ask you one last favor: can you send me your 2 files produced by your PE so that I can compare them with mine so as to make sure that the EP has at least generated the correct files?
Thanks for everything and have a nice day,
Stefano

0 项奖励
回复

3,361 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Stefano:

Please refer to the attached two files.  The two files is created based on TWR-K60D100M

Regards

Daniel

0 项奖励
回复

3,361 次查看
stefano_conegia
Contributor I

Hi Daniel,

FYI, I confirm you that the files are identical and my CAN bus works perfectly!

In this case the workaround works!

Thanks again for your support,

bye,

Stefano

0 项奖励
回复

3,361 次查看
danielchen
NXP TechSupport
NXP TechSupport

Welcome~, glad to hear it works:)

Regards

Daniel

0 项奖励
回复