Failure in mbd_s32k_copy_required_files: Index exceeds the number of array elements (0)

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

Failure in mbd_s32k_copy_required_files: Index exceeds the number of array elements (0)

Jump to solution
1,796 Views
viet
Contributor II

Dear community !

I running into the problem when generate the code for my model (the error log attached in this post : Usage_StateFlow_NxpMBD_20210729_143008).

My model is including : Stateflow + UART NXP MBD.
The target hardware : NXPS32K118 Development Kit.
The matlab version : 2021b.
NXP ModelToobox version : 4.2.0

viet_0-1627547962869.png

the model setting : 

viet_1-1627548008000.png


i have no idea with the error, i can run SiL with this model without any error. 

Thanks a lot for support.
Viet

0 Kudos
Reply
1 Solution
1,776 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @viet 

From the log you have attached I found that at some point you have a file which is shadowed by another file. Basically you have a model with the same name as another model and this might be causing your issue. Please try unique names for the reference models or the ones you have in path.

Warning:The file containing block diagram 'stateflow_uart' is shadowed by a file of the same name higher on the MATLAB path. This can cause unexpected behavior. For more information see "Avoiding Problems with Shadowed Files" in the Simulink documentation.

 Regards,

Marius

View solution in original post

0 Kudos
Reply
2 Replies
1,751 Views
viet
Contributor II

thanks the issue was solved

0 Kudos
Reply
1,777 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @viet 

From the log you have attached I found that at some point you have a file which is shadowed by another file. Basically you have a model with the same name as another model and this might be causing your issue. Please try unique names for the reference models or the ones you have in path.

Warning:The file containing block diagram 'stateflow_uart' is shadowed by a file of the same name higher on the MATLAB path. This can cause unexpected behavior. For more information see "Avoiding Problems with Shadowed Files" in the Simulink documentation.

 Regards,

Marius

0 Kudos
Reply