Error 2 Occurred When Using VeriStand Model Generation Support Addon

Updated Jun 26, 2026

Reported In

Software

  • VeriStand
  • MATLAB
  • Simulink
  • VeriStand Model Generation Support for LabVIEW

Other

VeriStand Model Generation Support

Issue Details

I am trying to use a Simulink® or LabVIEW model in VeriStand. To compile the models, I installed the VeriStand Model Generation Support and the NI GCC Cross-Compiler for NI Linux Real-Time targets. However, I consistently get Error 2 during the build process.

In Simulink:

gmake: *** No rule to make target `C:/Users/.../veristand_model_capi.cpp', needed by `veristand_model_capi.obj'. Stop.
E:\517\3.Sim\4.RTTest\Test_veristand_rtw>echo The make command returned an error of 2
The make command returned an error of 2
E:\517\3.Sim\4.RTTest\Test_veristand_rtw>exit /B 1
Test  Failed  Code generation information file does not exist.  
0 of 1 models built (0 models already up to date)
Build duration: 0h 2m 1.1525s
Error: Error(s) encountered while building "Test"

In LabVIEW:

Building model ...ERROR:

Code: 1

Source: An error has occurred.

Error 2 occurred at System Exec.vi.

LabVIEW: (Hex 0x2) Memory is full.

=========================

No Listeners on the GPIB.

Error occurred. No DLL produced.

Solution

Sometimes this error occurs due to spaces in the name of the model, the path to the model, or the path to the files used by the VeriStand Model Generation Support Add-on. You can refer to Gmake Error 2 When Building Simulink Model for Use in VeriStand to resolve this issue. 


If the error continues, you may resolve this error by following these steps:

  1. Make sure you're using compatible versions of Simulink and VeriStand Model Generation Support Add-on.
  2. The error indicates GCC cross-compiler failure. Try repairing the C/C++ Development Tools.
  3. Alternatively:
    1. Uninstall the VeriStand Model Generation Support Add-on.
    2. Change the default installation location of Add-Ons.
Capture.JPG 
    1. Add a new location that doesn't contain any spaces to MATLAB® path.
    2. Restart the MATLAB.
    3. Install the VeriStand Model Generation Support Add-on and close the MATLAB.
    4. Change the installation path of Add-on from D:\MATLABAddOns\Toolboxes\VeriStand Model Generation Support\runtime_support to D:\MATLABAddOns\Toolboxes\VeriStand_Model_Generation_Support\runtime_support with no spaces.
    5. Add the new path to the list of MATLAB paths.
Capture.JPG
    1. Finally, restart MATLAB and try building the model.