when i use the MBD Tool box for S12ZVM ,my module aborted due to an error

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

when i use the MBD Tool box for S12ZVM ,my module aborted due to an error

Jump to solution
1,693 Views
niequanwei
Contributor III

Hi

Sorry to brother you!  when I use the NXP MBD tool box for S12ZVM  I had the same problem that you ever had.

follow the picture:

2.png

Can you give me some suggestion?

Thank you very much!

Labels (2)
1 Solution
1,297 Views
constantinrazva
NXP Employee
NXP Employee

Hello niequanwei@aochutec.com‌,

The problems you are facing are due to wrong paths to the toolbox. To fix this, can you save your work for this toolbox somewhere temporary and uninstall the toolbox? And you can save the license so you don't need to generate it again later. And please put the MATLAB path back to default and save (as explained earlier).

After you've done that, close the MATLAB and please follow these steps:

1 - Run installation 'setup.exe' downloaded from here (probably the same link you've got it from in the first place, but I wanted to be sure).

2 - Click through the dialogs, entering in the appropriate location for the installation (it is recommended to NOT be installed on a network drive).

3 - Licensing - you can use the license you've saved earlier.

4 - Set up the target compilers (defining the environment variables for the compiler you want to use - e.g. CS_TOOL or CW_TOOL).

5 - Setting up the path for the toolbox - go to {toolbox installation folder}/mctbx_9s12zvm and run the mctbx_path script. After this step you should get the following output 

   

   Treating 'C:\MCToolbox\mctbx_9s12zvm' as MCD Toolbox installation root.

   MCD Toolbox path prepended.

   Successful.

After this, can you try running an example from our toolbox? You can find them in the Examples folder. Just open one and click on "Build". It should generate the code and compile it, having an executable file generated in the end. Please let me know if this works and your model doesn't or if they both fail.

Kind regards,

Razvan.

View solution in original post

6 Replies
1,297 Views
constantinrazva
NXP Employee
NXP Employee

Hello niequanwei@aochutec.com‌,

There seems to be a problem with the MATLAB path - "FOC_Sensorless is shadowed by another file[...]". This usually happens if you have 2 files with identical name in 2 different locations. You can go to:

- MATLAB Home tab -> Set Path -> Default -> Save

Capture.JPG

Untitled.png

and then run the mcd_s12_path script again, so you install the path for the toolbox over a fresh, default MATLAB path. This could resolve the other problems. If this does not work, can you share your model so we can take a look and replicate your issue? 

Hope this helps,

Razvan.

1,297 Views
niequanwei
Contributor III

First, thank you for your enthusiastic  reply!   After I did what what you told me, the result are as follows:

5.png

And i don't know how to deal with it for I am a freshman in MBD. 

looking forward to your reply !

Best wishes, Thank you!

here is the NXP module.

0 Kudos
Reply
1,297 Views
constantinrazva
NXP Employee
NXP Employee

Hello niequanwei@aochutec.com‌,

I can't reproduce your problem. I opened your model and built it successfully (with the exception of 2 warnings, everything was all right). Can you please send me some details about what version of MATLAB you are using? Can you run the following command in MATLAB terminal and give me it's output?

ver

This is a setup problem if I'm not able to reproduce the issue on my side, so it should be easily fixed.

I'm awaiting for your reply.

Kind regards,

Razvan.

1,297 Views
niequanwei
Contributor III

Thank you for your enthusiastic reply!  I  used the 2014A, now I use the 2017B.  I  run the module agagin and the result are as follows:

4.jpg

I  tried to find out the reason,but I failed. 

6.jpg

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Another question:

when I run the ''Trapezoidal ''module that  download from NXP.  The result are as follows:

7.jpg

-------

8.jpg

9.jpg

Could you give me some advice? 

Thank you for your patient reply!

Best Wishes!

0 Kudos
Reply
1,298 Views
constantinrazva
NXP Employee
NXP Employee

Hello niequanwei@aochutec.com‌,

The problems you are facing are due to wrong paths to the toolbox. To fix this, can you save your work for this toolbox somewhere temporary and uninstall the toolbox? And you can save the license so you don't need to generate it again later. And please put the MATLAB path back to default and save (as explained earlier).

After you've done that, close the MATLAB and please follow these steps:

1 - Run installation 'setup.exe' downloaded from here (probably the same link you've got it from in the first place, but I wanted to be sure).

2 - Click through the dialogs, entering in the appropriate location for the installation (it is recommended to NOT be installed on a network drive).

3 - Licensing - you can use the license you've saved earlier.

4 - Set up the target compilers (defining the environment variables for the compiler you want to use - e.g. CS_TOOL or CW_TOOL).

5 - Setting up the path for the toolbox - go to {toolbox installation folder}/mctbx_9s12zvm and run the mctbx_path script. After this step you should get the following output 

   

   Treating 'C:\MCToolbox\mctbx_9s12zvm' as MCD Toolbox installation root.

   MCD Toolbox path prepended.

   Successful.

After this, can you try running an example from our toolbox? You can find them in the Examples folder. Just open one and click on "Build". It should generate the code and compile it, having an executable file generated in the end. Please let me know if this works and your model doesn't or if they both fail.

Kind regards,

Razvan.

1,297 Views
niequanwei
Contributor III

Thank you for your help.  When  I  added another  patch file in "F:\MCToolbox\mctbx_9s12zvm\mctbx_s12zvm\mctbx_s12zvm\mscripts"for the change of  Matlab' API.  You helped me a lot !Now I can start my work!

Best Wishes! 

0 Kudos
Reply