Main Content

Source Code Generation

Generate and verify source code modules for function deployment and integration

Learn how to initiate source code generation and learn about the files and folders that the code generator produces. To organize large projects, use the code generation project template. Projects help you find required files, manage and share files and settings, interact with source control, generate controller code, and run test harness simulations.

You can start with Generate Code by Using the Quick Start Tool.


Embedded CoderGenerate readable, compact, and fast C and C++ code for embedded processors used in mass production (Since R2019b)


expand all

slbuildBuild standalone executable file or model reference target for model
getBuildDirGet build folder information from model build information
Simulink.fileGenControlSpecify root folders for files generated by diagram updates and model builds


Generate Code

Code Generation with Project

Code Generation Files and Folders