Skip to Main Content Skip to Search
Product Documentation

Include Traceability in HTML Code Generation Report

This example shows how to create an HTML code generation report which includes links to trace between the source code and the Simulink model window.

  1. With your ERT-based model open, open the Configuration Parameters dialog box or Model Explorer and navigate to the Code Generation > Report pane.

  2. Select Create code generation report if it is not already selected. By default, Open report automatically and Code-to-model are selected. Model-to-code is not selected.

  3. Select the Model-to-code parameter.

  4. If your model contains referenced models and you want to enable traceability for the referenced model's code generation report, repeat steps 2–3 for each referenced model.

  5. Generate code for your model by clicking Build on the Code Generation pane of the Configuration Parameters dialog box. The build process opens the code generation report in a MATLAB Web browser.

  6. In the left navigation pane, select a source code file. In the source code in the right pane, there are hyperlinks to blocks in the model.

  7. Click a hyperlink in the code. The model diagram window displays and highlights the corresponding block in the model.

  8. To highlight the generated code for a block in your Simulink model, right-click the block and select Code Generation > Navigate to Code. This selection highlights the generated code for the block in the HTML code generation report.

  9. If you have a referenced model in your model, in the left navigation pane, below Reference Models, click the link to a referenced model. The code generation report for the referenced model is now displayed in the window.

  10. In the left navigation pane, click the Back button as many times as needed to go back to the previous code generation report.

For more information about navigating between the generated code and the model diagram, see:

  


Related Products & Applications

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