Accelerating the pace of engineering and science

Simulink Coder Overview

Tom Erkkinen, MathWorks

Generate C and C++ code from Simulink® and Stateflow® models using Simulink Coder™.

 Video Transcript

Simulink Coder generates standalone C and C++ code from Simulink and Stateflow models for real-time and non-real-time execution.

Read more

The generated source code is ANSI and ISO C compliant so is portable and works with virtually any compiler, operating system, or processor.

The code can be deployed for many purposes such as rapid control prototyping of ECUs, hardware-in-the-loop testing of flight systems, and desktop prototyping of signal processing algorithms.

You can tune parameters and control the code execution using Simulink as the front end. Or you can run and interact with the generated executable completely outside of MATLAB® or Simulink. You can store logged data as MAT-files and analyze them back within MATLAB.

To use Simulink Coder, select your deployment target, choose your code generation options, and build.

Simulink Coder works with nearly every Simulink block and data type, including model blocks and arrays of structures often used for large-scale modeling.

It also supports Stateflow, system toolboxes, Simscape™, and many other Simulink family products. You can incorporate algorithms written in C or MATLAB within your models, then use Simulink Coder to generate C code from them.

Add-on products such as Simulink provide turnkey solutions for rapid prototyping and HIL testing that support FPGA and multicore hardware.

Or if you desire production code generation, try Embedded Coder®, which lets you customize the code and optimize it for performance and readability.

For more information on Simulink Coder or related products, refer to the product page or click a link below.

Product Focus

  • Simulink Coder