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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,633 次查看
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 项奖励
回复
1 解答
1,613 次查看
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 项奖励
回复
2 回复数
1,588 次查看
viet
Contributor II

thanks the issue was solved

0 项奖励
回复
1,614 次查看
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 项奖励
回复