Specify where extern
, typedef
,
and #define
statements are to be declared.
Category: Code Generation > Code Placement
Default: Auto
Auto
Lets the code generator determine where the declarations should be located.
Data declared in source file
Places declarations in .c
source files where
functions are located. The data header template file is not used.
The code generator places the declarations 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 declarations in the data header file specified in the Data declaration filename field. The code generator organizes and formats the declarations based on the data header template specified by the header file (*.h) template parameter in the data section of the Code Generation pane: Templates tab.
Limitation
This parameter applies to data with storage classes except these:
ExportedGlobal
ImportedExtern
ImportedExternPointer
BitField
FileScope
Localizable
Struct
CompilerFlag
This parameter enables Data declaration filename.
Parameter: GlobalDataReference |
Type: character vector |
Value: 'Auto' | 'InSourceFile' | 'InSeparateHeaderFile' |
Default: 'Auto' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | A valid value |
Efficiency | No impact |
Safety precaution | No impact |