| Contents | Index |
The Code Generation > Report pane includes the following parameters when the Simulink Coder product is installed on your system and you select a GRT-based target.
![]()
The Code Generation > Report pane includes the following parameters when the Simulink Coder product is installed on your system and you select an ERT-based target. ERT-based target parameters require an Embedded Coder license when generating code.

| On this page… |
|---|
Control the code generation report that the Simulink Coder software automatically creates.
To create a code generation report during the build process, select the Create code generation report parameter.
Generate an HTML Code Generation Report
If you have an Embedded Coder license, see also Report Generation.
Document generated code in an HTML report.
Default: Off
Generates a summary of code generation source files in an HTML report. Places the report files in an html subfolder within the build folder. In the report,
The Summary section lists version and date information. The Configuration Settings at the Time of Code Generation link opens a noneditable view of the Configuration Parameters dialog that shows the Simulink model settings, including TLC options, at the time of code generation.
The Subsystem Report section contains information on nonvirtual subsystems in the model.
The Code Interface Report section provides information about the generated code interface, including model entry point functions and input/output data (requires an Embedded Coder license and the ERT target).
The Traceability Report section allows you to account for Eliminated / Virtual Blocks that are untraceable, versus the listed Traceable Simulink Blocks / Stateflow Objects / MATLAB Scripts, providing a complete mapping between model elements and code (requires an Embedded Coder license and the ERT target).
In the Generated Files section, you can click the names of source code files generated from your model to view their contents in a MATLAB Web browser window. In the displayed source code,
Global variable instances are hyperlinked to their definitions.
If you selected the traceability option Code-to-model, hyperlinks within the displayed source code let you view the blocks or subsystems from which the code was generated. Click on the hyperlinks to view the relevant blocks or subsystems in a Simulink model window (requires an Embedded Coder license and the ERT target).
If you selected the traceability option Model-to-code, you can view the generated code for any block in the model. To highlight a block's generated code in the HTML report, right-click the block and select Code Generation > Navigate to Code (requires an Embedded Coder license and the ERT target).
If you set the Code coverage tool parameter on the Code Generation > SIL and PIL Verification pane, you can view the code coverage data and annotations in the generated code in the HTML Code Generation Report (requires an Embedded Coder license and the ERT target).
Does not generate a summary of files.
This parameter enables and selects
Code-to-model (ERT target)
This parameter enables
Model-to-code (ERT target)
Eliminated / virtual blocks (ERT target)
Traceable Simulink blocks (ERT target)
Traceable Stateflow objects (ERT target)
Traceable MATLAB functions (ERT target)
.
| Parameter: GenerateReport |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Generate an HTML Code Generation Report
If you have an Embedded Coder license, see also Report Generation.
If you have an Embedded Coder license, see also Use a Code Coverage Tool in SIL and PIL Simulations.
Specify whether to display code generation reports automatically.
| Default: Off |
Displays the code generation report automatically in a new browser window.
Does not display the code generation report, but the report is still available in the html folder.
This parameter is enabled and selected by Create code generation report.
| Parameter: LaunchReport |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | No impact |
Generate an HTML Code Generation Report
If you have an Embedded Coder license, see also Report Generation.
Include hyperlinks in the code generation report that link code to the corresponding Simulink blocks, Stateflow objects, and MATLAB functions in the model diagram.
Default: Off
Includes hyperlinks in the code generation report that link code to corresponding Simulink blocks, Stateflow objects, and MATLAB functions in the model diagram. The hyperlinks provide traceability for validating generated code against the source model.
Omits hyperlinks from the generated report.
Clear this parameter to speed up code generation. For large models (containing over 1000 blocks), generation of hyperlinks can be time consuming.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled and selected by Create code generation report.
You must select Include comments on the Code Generation > Comments tab to use this parameter.
| Parameter: IncludeHyperlinkInReport |
| Type: string |
| Value: 'on' | 'off |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Link Simulink blocks, Stateflow objects, and MATLAB functions in a model diagram to corresponding code segments in a generated HTML report so that the generated code for a block can be highlighted on request.
Default: Off
Includes model-to-code highlighting support in the code generation report. To highlight the generated code for a Simulink block, Stateflow object, or MATLAB script in the code generation report, right-click the item and select Code Generation > Navigate to Code.
Omits model-to-code highlighting support from the generated report.
Clear this parameter to speed up code generation. For large models (containing over 1000 blocks), generation of model-to-code highlighting support can be time consuming.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled when you select Create code generation report.
This parameter selects:
You must select the following parameters to use this parameter:
Include comments on the Code Generation > Comments tab
At least one of the following:
| Parameter: GenerateTraceInfo |
| Type: Boolean |
| Value: on | off |
| Default: off |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Include the model Web view in the code generation report to navigate between the code and model within the same window. You can share your model and generated code outside of the MATLAB environment. You must have a Simulink Report Generator™ license to include a Web view of the model in the code generation report.
Default: Off
Include model Web view in the code generation report.
Omit model Web view in the code generation report.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled and selected by Create code generation report.
To enable traceability between the code and model, select Code-to-model and Model-to-code.
| Parameter: GenerateWebview |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | No impact |
Include Model Web View in HTML Code Generation Report
Use the Configure button to open the Model-to-code navigation dialog box. This dialog box provides a way for you to specify a build folder containing previously-generated model code to highlight. Applying your build folder selection will attempt to load traceability information from the earlier build, for which Model-to-code must have been selected.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled by Model-to-code.
Include summary of eliminated and virtual blocks in code generation report.
Default: Off
Includes a summary of eliminated and virtual blocks in the code generation report.
Does not include a summary of eliminated and virtual blocks.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled by Create code generation report.
This parameter is selected by Model-to-code.
| Parameter: GenerateTraceReport |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Include summary of Simulink blocks in code generation report.
Default: Off
Includes a summary of Simulink blocks and the corresponding code location in the code generation report.
Does not include a summary of Simulink blocks.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled by Create code generation report.
This parameter is selected by Model-to-code.
| Parameter: GenerateTraceReportSl |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Include summary of Stateflow objects in code generation report.
Default: Off
Includes a summary of Stateflow objects and the corresponding code location in the code generation report.
Does not include a summary of Stateflow objects.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled by Create code generation report.
This parameter is selected by Model-to-code.
| Parameter: GenerateTraceReportSf |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Traceability of Stateflow Objects in Generated Code
Include summary of MATLAB functions in code generation report.
Default: Off
Includes a summary of MATLAB functions and corresponding code locations in the code generation report.
Does not include a summary of MATLAB functions.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled by Create code generation report.
This parameter is selected by Model-to-code.
| Parameter: GenerateTraceReportEml |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | On |
| Efficiency | No impact |
| Safety precaution | On |
Include static code metrics report in the code generation report.
Default: Off
Include static code metrics report in the code generation report. The static code metrics report does not support the C++ target language.
Omit static code metrics report from the code generation report.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled when you select Create code generation report.
| Parameter: GenerateCodeMetricsReport |
| Type: Boolean |
| Value: on | off |
| Default: off |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Analyze Static Code Metrics of the Generated Code
Include code replacement report summarizing replacement functions used and their associated blocks in the code generation report.
Default: Off
Include code replacement report in the code generation report.
Omit code replacement report from the code generation report.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder license when generating code.
This parameter is enabled when you select Create code generation report.
| Parameter: GenerateCodeReplacementReport |
| Type: Boolean |
| Value: on | off |
| Default: off |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
![]() | Code Generation Pane: General | Code Generation Pane: Comments | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |