Model Configuration Set Customization
Customize how the code generator produces code
The model configuration set contains parameters that control how the code generator produces code from your model. To control code optimizations, interfaces, code style, build options, and other aspects of the generated code, use configuration parameters. When you want to use the same settings for many models, you can share one configuration set among the models. You can also use scripts to programmatically configure models for code generation.
Model Settings
Topics
Code Generation Configuration Sets
- Code Generation Configuration
Modify the model configuration parameters specific to code generation from the Configuration Parameters Dialog box. - Use Configuration Reference to Select Code Generation Target
Select a code generation target for a model reference hierarchy without modifying individual models. - Configure Code Generation Parameters for Model Programmatically
Modify the model configuration parameters specific to code generation from the MATLAB® command line. - Recommended Settings Summary for Model Configuration Parameters
Summary of code generation parameters for tuning model and target configurations.
Model Configuration Parameters: Code Generation
- 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.
Code Comments
- Configure Code Comments
Configure how code generator inserts comments into generated code. - Include MATLAB Code as Comments in Generated Code
Correlate code generated for a MATLAB Function block with MATLAB source code.
Identifiers
- Construction of Generated Identifiers
For generic real-time (GRT) and rapid simulation (RSim) targets, the code generator automatically constructs identifiers for variables and functions in the generated code. - Reserved Keywords
If you use the code generator to produce C or C++ code, your model must not contain keywords that are reserved for internal use.