The code generator produces code for Stateflow® blocks for rapid prototyping. If you have an Embedded Coder® license, you can generate production code for Stateflow blocks.
The following sections compare two ways of generating code.
You generate code for the entire model in one file and look through that entire file to find code for a specific part of the chart.
You specify code generation parameters so that code for an atomic subchart appears in a separate file. This method of code generation enables unit testing for a specific part of a chart. You can avoid searching through unrelated code and focus only on the part that interests you.
Note
Unreachable Stateflow states are optimized out and are not included in the generated code.