Specify where to place definitions of global variables.
Category: Code Generation > Code Placement
Default: Auto
Auto
Lets the code generator determine where the definitions should be located.
Data defined in source file
Places definitions in .c
source files where
functions are located. The code generator places the definitions in
one or more function .c
files, depending on the
number of function source files and the file partitioning previously
selected in the Simulink® model.
Data defined in a single separate
source file
Places definitions in the source file specified in the Data definition filename field. The code generator organizes and formats the definitions based on the data source template specified by the Source file (*.c) template parameter in the data section of the Templates pane.
This parameter applies to data with custom storage classes only.
This parameter enables Data definition filename.
Parameter: GlobalDataDefinition |
Type: character vector |
Value: 'Auto' | 'InSourceFile' | 'InSeparateSourceFile' |
Default: 'Auto' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | A valid value |
Efficiency | No impact |
Safety precaution | No impact |