Error Locating NI Linux Real-Time Toolchain While Compiling Simulink® Model

Updated Nov 12, 2022

Reported In

Software

  • VeriStand
  • VeriStand Model Framework

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

I'm building a model using MathWorks Simulink® to deploy it on my NI Linux Real-Time target using VeriStand 2020R6. The compilation is done through VeriStand Model Framework. However, when trying to build the model in MathWorks Simulink®, I encounter the following error:

Error locating the NI Linux Real-Time 2017 toolchain. Confirm the C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2017 was properly installed.

Solution

This error could appear due to multiple reasons. Follow the steps below to resolve the problem:
 

1. The build process through the VeriStand Model Framework involves setting a few Windows registry keys. Ensure that the user has sufficient administrative privileges when running MathWorks Simulink® software. If required, run MathWorks Simulink® as administrator.

2. Add the following file paths to Path system variable under environment variables, if not present already. Refer to External Link : Add Tool Locations to the PATH Environment Variable for instructions.
C:\build\17.0\arm\sysroots\i686-nilrtsdk-mingw32\usr\libexec\arm-nilrt-linux-gnueabi\gcc\arm-nilrt-linux-gnueabi\4.9.2
C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\libexec\x86_64-nilrt-linux\gcc\x86_64-nilrt-linux\4.9.2
Path system variable

3. Add the following system variables if not present already:
GCCPATH: C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux
GCCSYSROOTPATH: ​​​​​​C:\build\17.0\x64\sysroots\core2-64-nilrt-linux
GCCUTILITIESC:\VeriStand\2020\ModelInterface\tmw\toolchain\gcc
System variables
 
 

Additional Information

The batch file responsible for setting registry keys can be found in this file path - C:\VeriStand\20xx\ModelInterface\tmw\toolchain