Generating Models from The Mathworks, Inc. Simulink® Software for Deployment on VxWorks Systems

Updated Dec 22, 2023

I have a Simulink® model that I would like to compile for my NI CompactRIO running VxWorks. How can I properly configure my modeling environment to build my model?

Before following these configuration steps, make sure you have installed versions of MATLAB®, Simulink®, and Real-Time Workshop® onto your development machine that are compatible with NI VeriStand.

In order to build a .out file, you will need a GNU toolchain to help with the build process. Follow the steps below to use the WindRiver compiler on Windows Vista or later.
  1. Download the WindRiver VxWorks GNU Toolchain  (Please ignore the readme file in this zip file and follow these instructions for use with Simulink® and NI VeriStand.)
  2. From the downloaded zip file, copy the gccdist folder to C:\
  3. Navigate to C:\gccdist\supplemental, then right-click on setup-gcc.bat and select Edit
  4. To correct the environment paths in the setup-gcc.bat file, replace the following line:
    set LM_LICENSE_FILE=%GCCPATH%\supp\zwrsLicense.lic
    set LM_LICENSE_FILE=%GCCPATH%\supplemental\zwrsLicense.lic
Before attempting to compile your model, please use an installer disc or a downloaded installer to install NI Veristand and the NI VeriStand Model Framework .

With the NI VeriStand Model Framework and the GCC compiler prepared, you can now build the .out file for your model using The Mathworks, Inc. Real-Time Workshop® software:
  1. Open Simulink®. From within your model, go to Simulation»Configuration Parameters.
  2. In the Solver tab, please ensure the Stop Time is set to inf and the Type is set to Fixed-step.
  3. Under the Real-Time Workshop® category select the NIVeriStand VxWorks.tlc file click Apply
  4. In the NI Configuration section under Real-Time Workshop®, input the correct WindRiver GNU Toolchain Setup Path which should be C:\gccdist\supplemental\setup-gcc.bat
  5. Click Apply and then click Build to compile the model.
Simulink® and Real-Time Workshop® are registered trademarks of The MathWorks, Inc. All other trademarks are the property of their respective owners.