How to run freemaster on S12ZVML through CAN

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run freemaster on S12ZVML through CAN

Jump to solution
622 Views
443115228
Contributor II

Hello,I want to use freemaster with CAN communication on S12ZVMl,Where can I get the example code?

1 Solution
308 Views
MichalH
NXP Employee
NXP Employee

Dear Quangui,

the free CodeWarrior license that you probably use only lets you to build applications up to 64k of code. You need to make the application smaller, or you need to get the full CodeWarrior license.

The FreeMASTER demo is quite large by default because it contains the whole project file and couple of HTML files and images compiled in the application for demonstration purposes. With this feature, you are able to load and open the project directly from the board Flash memory.

You may make the application smaller by turning off some features in the application's freemaster_cfg.h file:

  • Set the FMSTR_DEMO_LARGE_ROM to 0 and see how it impacts the code size. This option disables putting the files into the Flash memory. 
  • Turning off the FMSTR_DEMO_ENOUGH_ROM will disable even smaller text files and links put to the Flash memory for demonstration purposes.
  • Turning off some of the FreeMASTER features will make the image even smaller, but you will loose functionality. For example turning off FMSTR_USE_TSA will remove all code and data used by TSA feature. Read about other features in the driver's user guide.

Best regards,

Michal

View solution in original post

10 Replies
308 Views
MichalH
NXP Employee
NXP Employee

Dear user,

An official S12Z driver and an example application for S12ZVMx12EVB board is available in "FreeMASTER Communication Driver" v2 package in the "downloads" section at www.nxp.com/freemaster

A newer driver and example application which also supports protocol-v4 and all new features of FreeMASTER 3.0 is available unofficially. You can find it as fmstr-s12z-2019-12.zip attachment at this article.

Both driver versions contain UART and CAN examples and should work with FreeMASTER 3.0 out of the box. Be aware that a proper CAN bus termination is needed when running the demo at the default 500 kbps.

Best regards,

Michal

0 Kudos
308 Views
443115228
Contributor II

Hi Michal,

    Thanks for your reply.

     I have downloaded FreeMASTER3.0,but I can't find the example code.So I'm using  fmstr-s12z-2019-12.zip attachment.

     One error occured when I using the example code,and it can not be cleaned.please give me some advice.

error.PNG

clean.PNG

Best regards,

quangui

0 Kudos
308 Views
MichalH
NXP Employee
NXP Employee

Dear Quangui,

you are right, there was an absolute path to /project_settings/mc9s12zvml128.c in the .project file. You can edit the .project file, locate the path and change its entry to 

   <locationURI>PARENT-1-PROJECT_LOC/project_settings/mc9s12zvml128.c</locationURI> 

or you can download a fixed zip file attached to the the original article. I have updated it there just a moment ago.

Regards,

Michal

0 Kudos
308 Views
443115228
Contributor II

Dear Michal,

   Thank you very much.

   The previous error was cleared, but two other errors occurred.

error2.PNG

  How can I solve this problem?

Regards,

 Quangui

0 Kudos
309 Views
MichalH
NXP Employee
NXP Employee

Dear Quangui,

the free CodeWarrior license that you probably use only lets you to build applications up to 64k of code. You need to make the application smaller, or you need to get the full CodeWarrior license.

The FreeMASTER demo is quite large by default because it contains the whole project file and couple of HTML files and images compiled in the application for demonstration purposes. With this feature, you are able to load and open the project directly from the board Flash memory.

You may make the application smaller by turning off some features in the application's freemaster_cfg.h file:

  • Set the FMSTR_DEMO_LARGE_ROM to 0 and see how it impacts the code size. This option disables putting the files into the Flash memory. 
  • Turning off the FMSTR_DEMO_ENOUGH_ROM will disable even smaller text files and links put to the Flash memory for demonstration purposes.
  • Turning off some of the FreeMASTER features will make the image even smaller, but you will loose functionality. For example turning off FMSTR_USE_TSA will remove all code and data used by TSA feature. Read about other features in the driver's user guide.

Best regards,

Michal

View solution in original post

308 Views
443115228
Contributor II

Dear Michal,

      Thanks for your reply.

     I solved the problem according to your suggestion. Now the program can be downloaded to my board, but freemaster can not communicate with my ZLG usbcan_2e_u.Please see the pictures below.

can_config1.PNGcan_config.PNG

In fact, my usbcan_2e_u can work with the cantest software, please see the picture below.

can_recieve.PNG

     How can I solve this problem?

Best regards,

Quangui

0 Kudos
308 Views
443115228
Contributor II

I solved this problem by changing the ZLG software installation directory.We have to install ZLG in 

C:\Program Files\CANTest .Although the identified hardware version number is wrong, it does not affect my use

zlg1.PNG

freemaster_can.PNG

Best regards,

Quangui

0 Kudos
308 Views
MichalH
NXP Employee
NXP Employee

Dear Quanqui,

thank you for your latest update. The hardware device name is retrieved directly from the ZLG driver. Also in my case, it shows USBCAN-E for my USBCAN-2E-U device. I think this is a normal behavior.

Just FYI: You may still install the ZLG to a custom folder, you just need to set a path to this folder in FreeMASTER CAN plug-in configuration dialog.

pastedImage_1.png

Thanks,

Michal

0 Kudos
308 Views
hjhjhj
Contributor IV

Dear Michal Hanak,

I meet such situation as well.I did as you sugguest,but I can't solve it.Can you help me solve it?

The attachment is the driver I install.

Best regards!

11.bmp

22.bmp

33.bmp

0 Kudos
308 Views
MichalH
NXP Employee
NXP Employee

Thank you for creating a new thread. Let's continue our discussion there.

ZLG communication problem 

0 Kudos