Stateflow User's Guide Previous page   Next Page

How Do You Build a Target?

This section gives an overview to the entire process of building a target for models with Stateflow blocks. Use the following steps to find the right procedure for building a target for your model:

  1. Add a Stateflow target, if necessary.
  1. You need to add a Stateflow target to the model for any of the following cases:

    See Adding a Stateflow Target for instructions on adding a Stateflow target to the model.

  1. Configure the target.
  1. See one of the following sections for the target you build:

  1. Include your own custom code in the target.
  1. This is actually a part of step 2 that requires special attention. You can include your own custom C code in the target when you configure it. See Integrating Custom Code with Stateflow Targets for details.

  1. Configure the target for the rest of the Simulink model.
  1. The preceding steps configure a target only for the contribution from the Stateflow blocks in a model. You configure the rest of the model in the Simulink Configuration Parameters dialog. See the The Configuration Parameters Dialog Box in Simulink documentation.

  1. Start the build process.
  1. Stateflow automatically builds or rebuilds simulation targets when you initiate simulation of the Stateflow machine. You must explicitly initiate the build process for other types of targets. See Starting the Build for more information.


Previous page  What Is a Stateflow Target? How Does Stateflow Build into Targets? Next page

© 1994-2005 The MathWorks, Inc.