Stateflow |
 |
Starting the Build
This section describes how to start a build for a simulation target (sfun
) or Real-Time Workshop target (rtw
) in the following topics:
While building a target, Stateflow displays a stream of progress messages in the MATLAB Command Window. You can determine the success or failure of the build by examining these messages (see Parsing Stateflow Diagrams).
Starting a Simulation Target Build
You can start a target build for a simulation target (sfun
) in one of the following ways:
- By selecting Start from the Stateflow or Simulink editor's Simulation menu
- Automatically builds and runs a simulation target.
- By selecting Debug from the Stateflow editor's Tools menu
- Automatically builds and runs a simulation target. This is equivalent to the previous method.
- By selecting the Build button on the Simulation Target Builder dialog box for the target
- Use this option if you want to build a simulation target without running it. You would typically want to do this to ensure that Stateflow can build a target containing custom code.
Using the target builder to launch the build allows you to choose between an incremental build, a full build, and a build without code generation. See Specifying Build Options for a Target for more information.
Starting an RTW Target Build
You can start a target build for an Real-Time Workshop (rtw
) target in one of the following ways:
- By selecting the Build RTW button on the RTW Target Builder dialog box for the target
- You must use this option to build stand-alone targets. Using the target builder to launch the build allows you to choose between full build or rebuild and a build of Stateflow code only. See Specifying Build Options for a Target for more information.
- By selecting the Build button on the RTW panel of Simulink's Simulation Parameters dialog box
- Select Real-Time Workshop options on the RTW Target Builder dialog box to access the Simulation Parameters dialog box of Simulink. See Specifying Build Options for a Target for more information.
| Calling Graphical Functions from Custom Code | | Parsing Stateflow Diagrams |  |