Main Content

Open Code Generation Report

You can refer to existing code generation reports at any time. If you generated a code generation report, in the Simulink® Editor, open the report by clicking Open Report on the C Code tab. A Simulink Coder™ license is required to view the code generation report. An Embedded Coder® license is required to view a code generation report enhanced with Embedded Coder features.

If your current working folder does not contain the code generation files and the code generation report, the following dialog box opens:

Enter the full path of the build folder for your model, ../model_target_rtw and click Open Report.

Alternatively, you can open the code generation report (model_codegen_rpt.html or subsystem_codegen_rpt.html) manually into a MATLAB® Web browser window, or in another Web browser. For the location of the generated report files, see HTML Code Generation Report Location.

Limitation

After building your model or generating the code generation report, if you modify legacy or custom code, you must rebuild your model or regenerate the report for the code generation report to include the updated legacy source files. For example, if you modify your legacy code, and then use the Open Report button to open an existing report, the software does not check if the legacy source file is out of date compared to the generated code. Therefore, the code generation report is not regenerated and the report includes the out-of-date legacy code. This issue also occurs if you open a code generation report using the coder.report.open function.

To regenerate the code generation report, do one of the following:

  • Rebuild your model.

  • Generate the report using the coder.report.generate function.