Main Content

Model Configuration Parameters: Code Generation Templates

The Code Generation > Templates category includes parameters for customizing the organization of your generated code. On the Configuration Parameters dialog box, the following configuration parameters are on the Code Generation > Templates pane.

ParameterDescription

Code templates: Source file (*.c) template

Specify the code generation template (CGT) file to use when generating a source code file.

Code templates: Header file (*.h) template

Specify the code generation template (CGT) file to use when generating a code header file.

Data templates: Source file (*.c) template

Specify the code generation template (CGT) file to use when generating a data source file.

Data templates: Header file (*.h) template

Specify the code generation template (CGT) file to use when generating a data header file.

File customization template

Specify the custom file processing (CFP) template file to use when generating code.

Generate an example main program

Control whether to generate an example main program for a model.

Target operating system

Specify a target operating system to use when generating model-specific example main program module.

The following parameters in the Advanced parameters section are infrequently used.

ParameterDescription

Generate full file banner

Generate full header including time stamp.

For GRT targets, this parameter is on the Code Generation > Interface pane.

Enable custom file banner

If this option is cleared, the configurations for Code and Data templates are ignored.

Related Topics