Shared code placement
Location of generated code that is shared
Model Configuration Pane: Code Generation / Interface
Description
The Shared code placement parameter specifies the location where the code generator places code for utility functions, exported data type definitions, and declarations of exported data that is configured with a custom storage class.
Settings
Auto
(default) | Shared location
Auto
For a model that contains existing shared code (see Existing shared code (Embedded Coder)) or at least one of these blocks, places utility code within the
codeGenFolder
/slprj/
(ortarget
/_sharedutilscodeGenFolder
/
targetSpecific
/_shared
) folder :Model blocks
Simulink Function blocks
Function Caller blocks
Calls to Simulink Function blocks from Stateflow or MATLAB Function blocks
Stateflow graphical functions when you select the Export Chart Level Functions parameter
If a model does not contain one of the preceding blocks or existing shared code, the code generator places utility code in the build folder (the folder that contains
ormodel
.c
).model
.cppShared location
Places code for utilities in the
codeGenFolder
/slprj/
(ortarget
/_sharedutilscodeGenFolder
/
targetSpecific
/_shared
) folder.
Recommended Settings
Application | Setting |
---|---|
Debugging | Shared location (GRT)No impact (ERT) |
Traceability | Shared location (GRT)No impact (ERT) |
Efficiency | No impact (execution, RAM)Shared location (ROM) |
Safety precaution | No impact |
Programmatic Use
Parameter: UtilityFuncGeneration |
Type: character vector |
Value: 'Auto' | 'Shared location' |
Default: 'Auto' |
Version History
Introduced before R2006a