Main Content

Generate Code

Generate code using Embedded Coder® for the for each software component. An Embedded Coder license is required for code generation.

To generate code for the application and service components:

  1. Open the model file.

    For this example, to find the component model files, navigate to the GenerateEmbeddedCode/ApplicationCmp folder and the GenerateEmbeddedCode/ComponentCmp folder.

    Note

    You can only generate code from the models saved to the ApplicationCmp and ComponentCmp folders. You cannot generate code from the skeleton model, VCUSoftwareSOA.slx.

  2. On the model toolstrip, select the Apps tab and open the Embedded Coder app.

    Embedded Coder toolstrip icon

  3. Check that your model is ready for code generation by running model advisor checks to verify compliance with guidelines and standards. For more information, see Embedded Coder Model Advisor Checks for Standards, Guidelines, and Code Efficiency (Embedded Coder).

  4. To generate code from the model, on the C++ Code tab, click Generate Code.

    C++ Code tab in the model toolstrip

  5. Repeat these steps for each component.

Note

Additional hand code is needed to integrate the generated software component files.

See Also

(Embedded Coder)