Model Configuration

Configure models for simulation and code generation

The model configuration parameters for code generation define how the code generator produces code and builds an executable from your model. The Model Advisor checks that your model meets standards and guidelines and is ready to generate code. The Code Generation Advisor reviews your model based on objectives that you specify.

Topics

Getting Started

Code Generation Configuration

Modify the model configuration parameters specific to code generation from the Configuration Parameters Dialog box.

Code Generation Configuration

Configure Code Generation Parameters for Model Programmatically

Modify the model configuration parameters specific to code generation from the MATLAB® command line.

Use Configuration Reference to Select Code Generation Target

Select a code generation target for a model reference hierarchy without modifying individual models.

Model Advisor

Check Your Model Using the Model Advisor

Use the Model Advisor to check a model or subsystem for conditions and configuration settings that you select, including conditions that cause inaccurate or inefficient simulation.

Check Model and Configuration for Code Generation

Assess model readiness to generate code by using the Model Advisor and Code Generation Advisor.

Simulink Coder Model Advisor Checks for Standards and Code Efficiency

Use Simulink® Coder™ Model Advisor checks to assess model readiness to generate code.

Modeling Guidelines for Model Configuration

When you develop models and generate code, use the modeling guideline configuration recommendations.

Code Generation Advisor

Application Objectives Using Code Generation Advisor

Use the Code Generation Advisor to check your model against code generation objectives.

Recommended Settings Summary for Model Configuration Parameters

Summary of code generation parameters for tuning model and target configurations

Code Generation Advisor Checks

Facilitate designing Simulink models and subsystems and troubleshooting code generation by using Code Generation Advisor checks.

Model Configuration Parameters

Model Configuration Parameters: Code Generation

General parameters for defining code generation for a model's active configuration set, including target selection, documentation, and build process.

Model Configuration Parameters: Code Generation Optimization

Parameters for configuring code optimization.

Model Configuration Parameters: Code Generation Report

Parameters for configuring code generation reports.

Model Configuration Parameters: Comments

Parameters for controlling the comments that you want to automatically generate and insert into the generated code.

Model Configuration Parameters: Code Generation Identifiers

Parameters for selecting automatically generated naming rules for identifiers in code generation.

Model Configuration Parameters: Code Generation Custom Code

Parameters for creating a list of custom C code, folders, source files, and libraries to include in generated files.

Model Configuration Parameters: Code Generation Interface

Parameters for selecting the target software environment, output variable name modifier, and data exchange interface.

Recommended Settings Summary for Model Configuration Parameters

Summary of code generation parameters for tuning model and target configurations