Code Verification

Behavioral verification of generated code, traceability, code generation reports

Functions

codegen Generate C/C++ code from MATLAB code
coder.config Create MATLAB Coder code generation configuration objects

Classes

coder.CodeConfig codegen configuration object
coder.EmbeddedCodeConfig codegen configuration object that specifies code generation parameters for code generation with an Embedded Coder license
coder.HardwareImplementation codegen configuration object that specifies hardware implementation parameters for code generation
coder.MexCodeConfig codegen configuration object that specifies MEX function generation parameters

Topics

Code Generation Reports

Enable Code Generation Reports

Specify options for producing a code generation report.

Code Generation Reports

Generate and interpret code generation reports from MATLAB Coder.

Generate Traceable Code

Include MATLAB source code as comments in the generated code.

Run-Time Error Detection

Generate Standalone Code That Detects and Reports Run-Time Errors

Detect and fix errors that occur on the target hardware.

Run-Time Error Detection and Reporting in Standalone C/C++ Code

Generate standalone libraries and executables that detect and report run-time errors, such as out-of-bounds array indexing.

Testing Generated Code

Testing Code Generated from MATLAB Code

Verify numerical behavior of generated code.

Verify MEX Functions in the MATLAB Coder App

Compare results of running the original MATLAB® function with the results from running the MEX function.

Verify MEX Functions at the Command Line

Test MEX functions with coder.runTest.

Unit Test Generated Code with MATLAB Coder

Run MATLAB unit tests on generated code.

Unit Test External C Code with MATLAB Coder

Run MATLAB unit tests on generated code that integrates external C code.

Was this topic helpful?