MATLAB Answers

Static code metrics report cannot be created in embedded coder

4 views (last 30 days)
Mike Bardill
Mike Bardill on 15 Jan 2016
Answered: Roman Liubich on 19 Jun 2018
I have a Simulink model that I run in PIL mode on a C6713 DSK target board. I have selected the option to create a static code metrics report in embedded coder. However, the report does not get created due to a number of problems.
1.) A number of .h files cannot be found. There are some custom driver files to support the serial com port on the DSK board. In the PIL build the search path for these is a part of the make file and comes from the custom template make file. These search paths do not feed into the static code metrics report generation. I have tried adding the paths to the Matlab path but still the code metrics report says it cannot find the header files.
2.) Some of the support files require compiler symbols to be defined such as chip type and com port characteristics. Again, these come from the make file for the PIL build but not feed into the code metrics report so the report complains that the symbols are undefined.
Options would be...
Exclude the support files from the code metrics generation as they are only relevant to the PIL build and do not form a part of the final target code.
Be able to define header file search paths and pre-processor symbols to the tool that is creating the code metrics report.
I can't see any obvious way of doing either of these things. The only option seems to be to select static code metrics report on or off in the model configuration. Is there a way to address these issues so that I can get a code metrics report out?

  1 Comment

Mikael Nielsen
Mikael Nielsen on 25 Jan 2016
I am having the same issue. I can not find out how to provide it a path to the stubbed out version of the header files that I am using for simulation.

Sign in to comment.

Answers (2)

CHEN Hongyuan
CHEN Hongyuan on 3 Apr 2017
Hi,Mike Bardill. Have you found a solution to the problem?

  0 Comments

Sign in to comment.


Roman Liubich
Roman Liubich on 19 Jun 2018
Same issue. The tool can't find even trivial compiler files like stdint.h

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by