Main Content

Highlight Potential Data Type Issues in a Report

If you have Embedded Coder®, you have the option to highlight potential data types issues in the code generation report for standalone code generated from MATLAB® code. If you enable this option, on the Code Insights tab, the report identifies single-precision and double-precision operations in the generated C/C++ code. If you have Fixed-Point Designer™, the report also identifies expensive fixed-point operations.

To view potential data type issues in a code generation report:

  1. Click the Code Insights tab.

  2. Expand the Potential data type issues section.

  3. Expand the data type issues section that you want to see.

    For example, this report identifies MATLAB code that results in double-precision operations in the generated code.

The option to highlight potential data type issues is disabled by default.

Enable Highlight Option Using the MATLAB Coder App

  1. On the Generate Code page, to open the Generate dialog box, click the Generate arrow .

  2. Set Build type to one of the following:

    • Source Code

    • Static Library (.lib)

    • Dynamic Library (.dll)

    • Executable (.exe)

  3. Click More Settings.

  4. On the Debugging tab, select the Always create a report and Highlight potential data type issues check boxes.

Enable Highlight Option Using the Command Line Interface

  1. Create an embedded code configuration object for 'lib', 'dll', or 'exe':

    cfg = coder.config('lib','ecoder',true); % or dll or exe

  2. Set the GenerateReport and HighlightPotentialDataTypeIssues configuration object properties to true:

    cfg.GenerateReport = true;
    cfg.HighlightPotentialDataTypeIssues = true;

Related Topics