static
keyword in function declarationsSpecify whether to include the static
keyword in function
declarations in the generated code.
Category: Code Generation > Code Style
Default: on
Include the static
keyword in function declarations in the
generated code. You can link different executables generated from different models
that refer to locally scoped subsystem and utility functions with the same name. This
parameter also impacts these functions:
Stateflow® graphical function
Variant subsystem
MATLAB® subfunction
Privately scoped Simulink® function
When you select this parameter, the generated code is compliant with MISRA C:2012 Rule 8.10.
Remove the static
keyword in function declarations in the
generated code.
This parameter requires Embedded Coder® license when you generate code.
This parameter appears only for ERT-based targets.
This parameter is enabled when you select Compact/Compact(with separate
data file)
file packaging.
Parameter:
PreserveStaticInFcnDecls |
Type: character vector |
Value:
'on' | 'off' |
Default:
'on' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (execution, ROM) |
Safety precaution | No impact |