Archived:NI myRIO C and C++ Development Support and Examples

Updated Jul 27, 2023

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Environment

Hardware

  • myRIO Student Embedded Device

Software

  • C/C++ Development Tools
  • C Support for myRIO
  • LabVIEW myRIO Toolkit

Programming Language

  • C
  • C++

For New Projects, a Modernized Toolchain Is Advised Instead

This article explains how to use Eclipse C/C++ Development Tools for NI Linux Real-Time to achieve cross-compiling tasks. This toolset is not actively maintained anymore. It was last updated in 2018 and is currently not advised to be used for new projects.

Instead, NI created extensive documentation for a modernized toolchain, which is easier to learn and utilize. That documentation also provides information on typical steps, like building, deploying, and debugging a shared library. If you are planning to do C/C++ development and are searching for the right toolchain, then visit Getting Started with C/C++ Development for NI Linux Real-Time.
 

Overview of the Following Eclipse-Based Content

NI myRIO is an embedded hardware device designed specifically to help students design real, complex engineering systems more quickly and affordably than ever before. NI myRIO is based on NI reconfigurable I/O (RIO) technology, which gives you the ability to program both a processor running a real-time OS and a customizable FPGA. In addition to NI LabVIEW software, the NI myRIO processor is fully programmable in C or C++ using the default shipping personality placed on the FPGA . You can only customize the FPGA using the LabVIEW FPGA Module. Follow the steps below to start programming the NI myRIO processor in C.

Install Development Tools, Toolkit, Examples and Documentation

 
  1. Install the C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition , typically the latest version.
  2. Download and install the LabVIEW myRIO Toolkit. This toolkit provides you with the necessary drivers to use NI myRIO as well as some software utilities, which offer useful information about your device.
  3. Download the NI myRIO C Support. The NI myRIO C examples are written in C. However, C++ is also supported if you use the tools provided in Step 1.  This download also includes examples for using the myRIO with Accelerometers, Analog I/O, Digital I/O, Encoders, I2C, IRG, PWM, SPI, and UART.
  4. Connect power to the NI myRIO device.
  5. Connect the USB cable from NI myRIO to your development computer.
  6. The NI myRIO USB Monitor appears and displays the IP address of the NI myRIO device.
Click Launch the Getting Started Wizard.
The Getting Started with NI myRIO Wizard installs software on a new NI myRIO device. Click through the prompts in the wizard to install software.
 
  1. After software is installed on NI myRIO, use the documentation you downloaded in Step 3 to start using the Eclipse environment to program the NI myRIO processor in C.

Next Steps

Learn more about myRIO