Static Code Metric Report fails on Simulink

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

Static Code Metric Report fails on Simulink

1,440 Views
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 Kudos
Reply
3 Replies

1,247 Views
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 Kudos
Reply

1,247 Views
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 Kudos
Reply

1,247 Views
brianmckay
Contributor III

dumitru-daniel.popa and JesseBeeker 

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

Cheers,

-Brian

0 Kudos
Reply