Parameter "ProdEndianess" is not modifiable with device type "Freescale->32bit->Power PC"

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

Parameter "ProdEndianess" is not modifiable with device type "Freescale->32bit->Power PC"

2,797 Views
yujiangwu
Contributor III

Hello Dear Daniel,

 dumitru-daniel.popa

Thanks for the very excellent tutorial on the MBD again, I am currently in PIL lecture of BLDC motor control.

Unfortunately, I encountered the issue shown in the figure below.

pastedImage_3.png

pastedImage_4.png

I made the following change in the configuration.

pastedImage_5.png

And it is still showing the same error. I am just checking if you know a quick fix to this issue. I attached my model as well.  Thank you for the help!

Sincerely,

Yujiang Wu

13 Replies

2,252 Views
aunsal89
Contributor II

Dear Yujiang,

Accroding to Mr. Popa's instructions, I got the same error in Matlab ver. r2018a.

pastedImage_11.png

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

Whether I use your work-around (created an .m file with the given scripts) or not, by hitting the simulate button in normal mode, I got the following error: 

pastedImage_3.png

"An error occurred while calling into the sil or pil target connectivity implementation. Caused by: Too many input arguments"

pastedImage_9.png

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

By using the .m file with your script; if I change the mode to PIL-simulation then I got another error saying that:

pastedImage_2.png

"Detected recursive call to slbuild, which might indicate invalid simultaneous model builds. If only one model build was in progress, and if you previously used dbquit while in the MATLAB debugger or pressed Ctrl-C during the build process, please restart the model build."

pastedImage_1.png

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

Without your script; if I did the simulation again in PIL-simulation mode then I got a different error as shown below:

pastedImage_2.png

pastedImage_13.png

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

Consequently, I would like to know if you or Mr. Popa have an answer to this problem.

Best regards,
Ahmet Halit

0 Kudos

2,251 Views
paulvlase
NXP Employee
NXP Employee

Hi aunsal89@gmail.com‌, yujiangwu

You see that error because starting with R2017a the parameter "ProdEndianess" and a few others are read-only and we are trying to update them in our mbd_pnt_set_pilsil_mode function.

Could you try the attached zip file, which should fix the PIL converter and build?

You have to unzip it over the folder where the toolbox is installed. On my machine it is C:\MBDToolbox\mbdtbx_MPC574xP.

Best regards,

Paul

2,251 Views
aunsal89
Contributor II

Dear Paul,

Thanks for the attached folder yet it did not work with r2018a, here is the error I am getting:

pastedImage_1.png

0 Kudos

2,251 Views
aunsal89
Contributor II

Dear Paul,

I am not seeing an attachment!? 

Regards,

Ahmet

0 Kudos

2,251 Views
aunsal89
Contributor II

Dear all,

Also when I tried to run the simulation on an older version Matlab r2015b, I encountered the following error:

pastedImage_1.png

I am still looking for a suitable fix for this issue.

Best regards,

Ahmet Halit

0 Kudos

2,251 Views
aunsal89
Contributor II

Thanks to Mr. Yujiang, I finally got it working. With Matlab ver. r2017b and according to the script mentioned in Yujiang's post, the simulations run perfectlyy. Yet there is still a problem with r2018a and for that I am waiting for the attachment from Mr. Paul Vlase.

0 Kudos

2,251 Views
paulvlase
NXP Employee
NXP Employee

Hi aunsal89@gmail.com,

I am so sorry that I forgot to attach the zip file.

I updated my last message with the zip file.

Could you try it and tell us if it worked?

In case of Matlab R2018a, could you show us the output of "mex -setup"? I think that PIL is not working on R2018a because the Microsoft Windows SDK 7.1, which is required by our toolbox, is not set up correctly.

0 Kudos

2,251 Views
yujiangwu
Contributor III

Hi Dear Daniel,

dumitru-daniel.popa

I found a workaround. I wrote a script to first configure the ProdHWDeviceType as Customed. Then unify the configuration setting between Parent model and Child model. At the end, I explicitly set the ProdHWDeviceType back as Freescale->32-bit PowerPC. Then if you run PIL directly, it works. 

The script is as follows:

open('BLDC_com.slx');
open('PIL_model.slx');

set_param('BLDC_com','ProdHWDeviceType','Specified');
set_param('PIL_model','ProdHWDeviceType','Specified');


set_param('BLDC_com','TargetLangStandard','C99 (ISO)');
set_param('PIL_model','TargetLangStandard','C99 (ISO)');%C89/C90 (ANSI)

set_param('BLDC_com','ProdLargestAtomicInteger','Long');
set_param('PIL_model','ProdLargestAtomicInteger','Long');

set_param('BLDC_com','ProdLargestAtomicFloat','Double');
set_param('PIL_model','ProdLargestAtomicFloat','Double');

set_param('BLDC_com','ProdEndianess','BigEndian');
set_param('PIL_model','ProdEndianess','BigEndian');

set_param('BLDC_com','SuppressErrorStatus','on');
set_param('PIL_model','SuppressErrorStatus','on');


set_param('BLDC_com','ProdHWDeviceType','Freescale->32-bit PowerPC');
set_param('PIL_model','ProdHWDeviceType','Freescale->32-bit PowerPC');

However, I still suspect that there are some bugs within the "mbdtbx_MPC574xP",especially the following protected code.

pastedImage_1.png  

Please check and make the update if necessary. 

Thank you!

Sincerely,

Yujiang Wu

pastedImage_2.png

0 Kudos

2,251 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Yujiang, 

Can you tell us what MATLAB  version are you using ? We wish to confirm the issue you are seeing on the same setup.

Thank you!

Daniel

0 Kudos

2,251 Views
aunsal89
Contributor II

Dear Daniel,

I am also encountering the same problem with Matlab ver. r2018a. Have you come up with a solution yet?

Regards,

Ahmet

0 Kudos

2,251 Views
yujiangwu
Contributor III

Hi Dear Daniel,

dumitru-daniel.popa

I believe that my colleagues who are using MATLAB 2016b also encountered the same problem.

sincerely,

Yujiang

0 Kudos

2,253 Views
yujiangwu
Contributor III

Hi Daniel,

dumitru-daniel.popa

The Matlab version I am using is 2017a. 

pastedImage_1.png

Thank you!

Sincerely,

Yujiang

0 Kudos

2,253 Views
yujiangwu
Contributor III

After running these scripts, the same problem still exists.

pastedImage_1.png

Sincerely,

Yujiang 

0 Kudos