Table Of Contents

Compiling a Model in MathWorks Simulink® Software

Last Modified: November 16, 2020

Use Simulink software to convert your model for use on real-time targets.

Before you begin, choose a compiler.
  1. Launch Simulink software and load the model you want to convert.
  2. Select Simulation»Model Configuration Parameters.
  3. In the Model Configuration Parameters dialog box, click Solver and configure the following:
    1. Stop time: inf
    2. Type: Fixed-step
  4. Click Code Generation.
  5. If the model specifies any .c or .h files, specify the locations of the source files and directories.
  6. Click Browse and select a compiler for your target from the list based on your target's real-time operating system (RTOS).
    RTOS Compiler Toolchain
    Phar Lap ETS NIVeriStand.tlc—NI Real-Time Target N/A
    Windows VeriStand.tlc—NI Real-Time Target VeriStand Compiler for Windows Targets
    NI Linux Real-Time ARM-based targets VeriStand.tlc—NI Real-Time Target VeriStand Compiler for Linux32ARM Targets
    NI Linux Real-Time Intel x64-based targets VeriStand.tlc—NI Real-Time Target VeriStand Compiler for Linux64 Targets
  7. Click OK.
  8. In the Category section, click Build.
The MATLAB software command window displays the status of the build process and indicates when the Simulink Coder software has completed compiling the model. After compiling the model, add it to the system definition.

Recently Viewed Topics