Main Content

Model Configuration Parameters: Code Generation Custom Code

TheCode Generation>Custom Codecategory includes parameters for inserting custom C code into the generated code. These parameters require a金宝app®Coder™license.

On the Configuration Parameters dialog box, the following configuration parameters are on theCode Generation>Custom Codepane.

Parameter Description

Use the same custom code settings as Simulation Target

Specify whether to use the same custom code settings as those in theSimulation Target>Custom Codepane.

Source file

Specify custom code to include near the top of the generated model source file.

Header file

Specify custom code to include near the top of the generated model header file.

Initialize function

Specify custom code to include in the generated model initialize function.

Terminate function

Specify custom code to include in the generated model terminate function.

Include directories

Specify a list of include folders to add to the include path.

Source files

Specify a list of additional source files to compile and link with the generated code.

Libraries

Specify a list of additional libraries to link with the generated code.

Defines

Specify preprocessor macro definitions to be added to the compiler command line.

Related Topics