Stateflow |
 |
How Stateflow Builds Targets
Stateflow builds a target for its diagrams as follows:
- Stateflow parses the charts that represent the Stateflow machine to ensure that the machine's logic is valid.
- If any errors are found, Stateflow displays the errors in the MATLAB Command Window (see Parsing Stateflow Diagrams) and halts.
- If the charts parse without error, Stateflow next invokes a code generator to convert the charts in the Stateflow machine into C source code.
- The code generator accepts various options that control the code generation process. You can specify these options via the Stateflow user interface (see Adding a Target to a Stateflow Machine).
- The code generator generates a makefile to build the generated source code into an executable program.
- The generated makefile can optionally build custom code that you specify into the target (see Integrating Custom Code with Stateflow Diagrams).
- Stateflow builds the target using a C compiler and make utility that you specify (see Setting Up the Target Compiler for more information).
| Building a Target | | Setting Up the Target Compiler |  |