| Real-Time Workshop User's Guide | ![]() |
Generating Code and Executables from Subsystems
The Real-Time Workshop can generate code and build an executable from any subsystem within a model. The code generation and build process uses the code generation and build parameters of the root model.
To generate code and build an executable from a subsystem:
Alternatively, you can select Build Subsystem from the Real-Time Workshop submenu of the Tools menu. This menu item is enabled when a subsystem is selected in the current model.
In the illustration above, the parameter K is declared tunable.
subsystem.exe (PC) or subsystem (UNIX), where subsystem is the name of the source subsystem block.
The generated code is in a build subdirectory, named
subsystem_target_rtw, where subsystem is the name of the source
subsystem block and target is the name of the target configuration.
| Note You can generate subsystem code using any target configuration available in the System Target File Browser. However, if the S-function target is selected, Build Subsystem behaves identically to Generate S-function. (See Automated S-Function Generation.) |
| Modularity of Subsystem Code | Parameters: Storage, Interfacing, and Tuning | ![]() |