Skip to Main Content Skip to Search
Product Documentation

Trace Code to Model Objects Using Hyperlinks

When using the Simulink Coder product, you can trace code to model objects using the hilite_system command. The Embedded Coder product simplifies traceability with the use of hyperlinks in HTML code generation reports. The reports display hyperlinks in "Regarding," "Outport," and other comment lines in generated code. You can highlight the corresponding block or subsystem in the model diagram by clicking the hyperlinks.

To use hyperlinks for tracing code to model objects:

  1. Open the model and make sure it is configured for an ERT target.

  2. In the Configuration Parameters dialog box, select Code Generation > Report Create code generation report. The parameter is selected by default. When selected, the parameter enables and selects Open report automatically and Code-to-model.

  3. Build or generate code for the model. An HTML code generation report is displayed.

  4. In the HTML report window, click hyperlinks to highlight source blocks. For example, generate an HTML report for model rtwdemo_hyperlinks. In the generated code for the model step function in rtwdemo_hyperlinks.c, click the first UnitDelay block hyperlink .

    In the model window, the corresponding UnitDelay block is highlighted.

  


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