How to test i.mx536 SMD can bus in WinEC7

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

How to test i.mx536 SMD can bus in WinEC7

1,483 Views
oobin
Contributor I

Dear all,

I am trying to test i.mx536 can bus function.

My bsp is IMX53_WCE700_1105_BSP_SOURCE and using SMD project.

I refer to i.MX53 ARD Windows Embedded Compact 7 Reference Manual and build CANApp.exe.

But it always shows "Unable to import library CANSDK.dll ! Program will exit".

Does anyone know how to test can bus function ?


Following are my changes and compile steps:


changes:

1) modify "COMMON_FSL_V2" to "COMMON_FSL_V3" in this BSP

2) enable Third Party -> BSP -> Freescale i.MX53 SMD: ARMV7 -> Device Drivers -> CANBUS catalog item (I am using SMD, not ARD !)

3) set BSP_CANBUS1=1 in iMX53_SMD.bat (I got only one can bus interfance )


Compile step:

1) Sysgen (blddemo -q), Build current bsp and Subproject (blddemo -qbsp)

2) Compile CANApp.exe out

3) Start winec7 system, copy CANApp.exe to SD Card and Windows folder.

4) Execute CANApp.exe -s in platform , it always shows error message: "Unable to import library CANSDK.dll ! Program will exit"


Labels (1)
Tags (2)
0 Kudos
6 Replies

780 Views
oobin
Contributor I

I can pass can test now.

CANApp.exe is ok.
execute CANApp.exe -r / CANApp.exe -s simultaneously at two platform


oobin said:

Dear Andrew,

Thx ~! You got it. But my test is still fail.

Do u know the process to test CANApp.exe ???

My platform has only one can bus interface. Thus I try to do CANTransfer between two platforms.

I modify CANApp to use same CanBusIndex for both receiver and sender.

if(0==wcscmp(pi.szProcessorName,TEXT("MX53")))
{
        if( TestCanIndex==0) CanBusIndex= 1;
        else CanBusIndex= 1;    
}

And execute CANApp.exe -r / CANApp.exe -s simultaneously at two platform.

But receiver always report: Error code value is -12.



Andrew I said:

try this

remake platform.bib like this:

#if (defined BSP_CANBUS1 || defined BSP_CANBUS2)
    can.dll        $(_FLATRELEASEDIR)\can.dll                     NK  SHQ
    cansdk.dll      $(_FLATRELEASEDIR)\cansdk.dll                   NK  SHQ
#endif

Q flag added

0 Kudos

780 Views
seetha
Contributor III

Hi,

I am working on CAN protocol on i.MX53 SMD.

I too had faced that dll loading error now solved.

But data transfer has issue, could you please share your thoughts.Could you share your  application changes?

Regards,

Seetharam

0 Kudos

780 Views
oobin
Contributor I

Dear Andrew,

Thx ~! You got it. But my test is still fail.

Do u know the process to test CANApp.exe ???

My platform has only one can bus interface. Thus I try to do CANTransfer between two platforms.

I modify CANApp to use same CanBusIndex for both receiver and sender.

if(0==wcscmp(pi.szProcessorName,TEXT("MX53")))
{
        if( TestCanIndex==0) CanBusIndex= 1;
        else CanBusIndex= 1;    
}

And execute CANApp.exe -r / CANApp.exe -s simultaneously at two platform.

But receiver always report: Error code value is -12.



Andrew I said:

try this

remake platform.bib like this:

#if (defined BSP_CANBUS1 || defined BSP_CANBUS2)
    can.dll        $(_FLATRELEASEDIR)\can.dll                     NK  SHQ
    cansdk.dll      $(_FLATRELEASEDIR)\cansdk.dll                   NK  SHQ
#endif

Q flag added

0 Kudos

780 Views
fear_nada
Contributor II

try this

remake platform.bib like this:

#if (defined BSP_CANBUS1 || defined BSP_CANBUS2)
    can.dll        $(_FLATRELEASEDIR)\can.dll                     NK  SHQ
    cansdk.dll      $(_FLATRELEASEDIR)\cansdk.dll                   NK  SHQ
#endif

Q flag added

0 Kudos

780 Views
oobin
Contributor I

I can see cansdk.dll in wince7 windows folder.

#if (defined BSP_CANBUS1 || defined BSP_CANBUS2)
    can.dll        $(_FLATRELEASEDIR)\can.dll                     NK  SHK
    cansdk.dll      $(_FLATRELEASEDIR)\cansdk.dll                   NK  SHK
#endif

It had been compiled into image.

I can enter CanSDK DllEntry if I write a test can driver, which will use CANOpenHandle SDK function.

But CANApp.exe is unable to import library CANSDK.dll, CANApp.exe also use CANOpenHandle SDK function.

I don't know why this happen ?~

Andre Webster said:

Sounds like the Cansdk.dll is not being built in the image. check in your release directory that the dll is in the folder. If it isn't try and build the can module independently by right clicking in pb on the folder and look at the output of the build.
0 Kudos

780 Views
andrew_questps
Contributor III
Sounds like the Cansdk.dll is not being built in the image. check in your release directory that the dll is in the folder. If it isn't try and build the can module independently by right clicking in pb on the folder and look at the output of the build.
0 Kudos