Static Code Metric Report fails on Simulink

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

Static Code Metric Report fails on Simulink

1,362 次查看
JesseBeeker
Contributor III

Daniel,

In the model configuration you can enable Static Code Metrics Report. This is a very useful way to navigate the generated code. As you can see from the attached files, the report could not generate. I tried several changes to the Matlab path and locations from the files you provided but it always seems to have these errors. I want to make sure that this is normal or if it is an indication that I need to fix something before I start. 

pastedImage_1.pngpastedImage_2.png

0 项奖励
回复
3 回复数

1,169 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi JesseBeeker‌,

I looked over this issue, but i do not think i related with our toolbox.

The files that are reported as not being able to be found can be added in the MATLAB path by:

- adding the generated folder (model_name_rtw) in the MATLAB path

- adding the ...NXP_MBDToolbox_S32K1xx\code\tools folder in the path

These files are GCC or SDK related include files that exists on the host PC (otherwise the build would fail)

After doing so, the edit command in MATLAB can successfully open any of the files reported as fail by the Static Code Metric Report.

I suspect an issue with the Simulink Code Metric itself - most likely it expect to find all the files in the root folder of the generated code. Also, i see that others are reporting similar issues on the Mathworks site: https://www.mathworks.com/matlabcentral/answers/263910-static-code-metrics-report-cannot-be-created-...

brianmckay‌,

Is MW aware of such limitations ?

Thank you!

Daniel

0 项奖励
回复

1,169 次查看
JesseBeeker
Contributor III

Great. Thank you.

Those path changes sound familiar to what was tried last week. We also tried adding them directly in the model configuration. 

It is a tricky situation with multiple companies in the mix to produce the solution. I want to be sure I have the right support direction so I am not tasking the wrong company for help. I have some local attention from Mathworks app team so I will see what can result. 

0 项奖励
回复

1,169 次查看
brianmckay
Contributor III

dumitru-daniel.popa and JesseBeeker 

I have sent email to MathWorks Development to inquire about this issue.

Cheers,

-Brian

0 项奖励
回复