The ERT system target file supports code generation for discrete and continuous time blocks. If you select model configuration parameter Support: continuous time, you can use these blocks in your models, without restriction.
Note that use of certain blocks is not recommended for production code generation for embedded systems. The Simulink® Block Data Type Support table summarizes characteristics of blocks in the Simulink and Fixed-Point Designer™ block libraries, including whether or not they are recommended for use in production code generation. To view this table, execute the following command and see the “Code Generation Support” column of the table that appears:
The ERT target supports continuous solvers. In the Solver options dialog, you can select an available
solver in the Solver menu. (Note
that the solver Type must be
use with the ERT target.)
Custom targets must be modified to support continuous time. The required modifications are described in Customize System Target Files.
The ERT target supports the stop time for a model. When generating host-based executables, the stop time value is honored if one of these model configuration parameters is selected:
Classic call interface
Otherwise, the executable runs indefinitely.
The ERT system target file provides generated and static examples of the
ert_main.c file. The
ert_main.c file controls the
overall model code execution by calling the
function and optionally checking
StopRequested flags to terminate
execution. For a custom target, if you provide your own custom static
main.c, consider including support for checking these flags.