Main Content

Document Generated Code

This example shows how to use the Simulink® Report Generator with Simulink® Coder™ to automatically generate documentation for a model and its generated code.

Open the model rtwdemo_codegenrpt.


Generate code for the model.


After generating the code, Simulink Coder displays an HTML code generation report that includes embedded hyperlinks to the generated source files.

To generate a project document, use the Simulink Report Generator.

    Beginning report
    Looping on model "rtwdemo_codegenrpt"
    Looping on system "rtwdemo_codegenrpt"
    Looping on system "Amplifier"
    Looping on system "Counter"
    Converting report
    Report complete

The generated report documents the model and the generated code. The report includes:

  • Snapshots of the model, including subsystems.

  • A block execution order list.

  • A summary of the generated code.

  • Full listings of generated code files in the build folder.

Close the model.


If you have a Simulink Report Generator license, you can customize the generated document by using the Report Explorer.

Related Topics