Table Of Contents

Selecting a Compiler for a Model from MathWorks Simulink® Software

Last Modified: December 13, 2019

Select compiler tools to convert models made in Simulink software.

Before you begin, install the VeriStand Model Framework on the computer with Simulink software. The framework adds tools you will use during the compile process.
  1. Determine what real-time operating system (RTOS) your target runs.

    If you want to create a compiled model that runs on Windows, skip this step.

  2. Based on the RTOS your target runs, refer to the following table to determine what you need to use to compile the model and create the required output type.
    RTOS Required tools Required output type
    • MinGW-w64 for 32-bit and 64-bit Windows with slsj and win32 options
    • MathWorks Simulink Coder™ software
    Phar Lap ETS
    • Microsoft Visual C++
    • MathWorks Simulink Coder™ software
    NI Linux Real-Time
    • C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition
    • MathWorks Simulink Coder™ software
  3. Determine which tool versions are compatible with your version of VeriStand.
  4. Based on your RTOS, complete the following steps to select the compiler in the MATLAB® Software.
    RTOS Steps
    Windows Create an environment variable that points to the bin folder of the MinGW-w64 installation.
    Phar Lap ETS
    1. Run mex -setup in the MATLAB software.
    2. Select the option number for a compatible version of Microsoft Visual C++.
    NI Linux Real-Time Skip this step.

    You do not need to select a compiler for NI Linux Real-Time when you install C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition.

After choosing your compiler, compile the model.

Recently Viewed Topics