| Using Stateflow | Search  Help Desk |
Compilation Error Messages
If compilation errors indicate the existence of undeclared identifiers, verify that variable expressions in state, condition, and transition actions are defined. Consider, for example, an action language expression such asa=b+c. In addition to entering this expression in the Stateflow diagram, you must create data objects for a, b, and c using the Explorer. If the data objects are not defined, the parser assumes that these unknown variables are defined in the Custom code portion of the target (which is included at the beginning of the generated code). This is why the error messages are encountered at compile time and not at code generation time.
If the code generator assumes that undefined data is defined in custom code, it generates a warning for each undefined item.
Overview9-2
How Stateflow Builds Targets9-3
Parse the Machine or the Stateflow Diagram9-17