Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Generate C/C++ Code for Rapid Prototyping or Production Deployment

If you have a Simulink® Coder™ or Embedded Coder® license, you can generate C or C++ code from models that include Stateflow® blocks. The following table directs you to code generation information based on your goals.

Goal

See the Following Information in the Simulink Coder documentation

Generate C/C++ source code

Code Generation Basics (Simulink Coder)

You cannot generate code only for the Stateflow blocks in a library model. You must first create a link to the library block in your main model and then generate code for the main model.

Generate C/C++ source code and build executable

Build Process (Simulink Coder)

Optimize generated code

Reduce Memory Usage for Boolean and State Configuration Variables (Simulink Coder) and Design Tips for Optimizing Generated Code for Stateflow Objects (Simulink Coder)

Integrate external code

External Code Integration (Simulink Coder)

Include external code only for library charts in a portable, self-contained library for use in multiple models

Integrate External Code for Library Charts (Simulink Coder)

Was this topic helpful?