Main Content

Code Generation

Code generation and debugging, report generation

After iterating on a model design, configure how the code generator produces C or non-class C++ code from the model. You can configure the code generator to produce code that interfaces with external code and between components and subcomponents. Code interface configuration involves selecting an output type and mapping model elements to code definitions (storage classes and function customization templates).

When your configuration is complete, use the Model Advisor to check whether a model is ready for code generation. From the model, generate source code, object code or an executable program. Optionally, generate an HTML report that you can use to review, analyze, publish, or archive code generation results.

Use the generated code for real-time and non-real-time applications, including rapid prototyping and simulation acceleration. You can generate code that represents a complete algorithm, or standalone utility code that several model blocks share.

To get started, see Simulink Coder.

Categories