Specify external source code
For a model that includes the Model Source block,
the code generator adds external code that you specify to the source
file (
or model
.c
)
that it generates. You can specify code for the code generator to
add near the top and bottom of the source file.model
.cpp
If you include this block in a referenced model, the code generator ignores the block for simulation target builds, but processes the block for other system target files.
See Add External Code to Generated Start Function (Simulink Coder).
Model Header | System Disable | System Outputs | System Update | System Derivatives | System Enable | System Initialize | System Start | System Terminate