Table Of Contents

Compiling a Model in MathWorks Simulink® Software

Last Modified: June 10, 2021

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
    Phar Lap ETS NIVeriStand_Pharlap.tlc
    Windows NIVeriStand.tlc
    NI Linux Real-Time ARM-based targets NIVeriStand_Linux_ARM_32.tlc
    NI Linux Real-Time Intel x64-based targets NIVeriStand_Linux_64.tlc
  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