LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

On a Linux OS, what tools is required to developped a real-time application that communicates with FPGA?

Solved!
Go to solution

On a Linux OS, what tools is required to developped a real-time application communicating with FPGA?

 

It is not clear to me by reading the documentation on NI website which tools or drivers I need to install on a Linux OS in order to be able to develop a C++ real-time application (which interact with FPGA) that will run on a sbRIO-9651.

 

Is this possible at all?

 

Thanks,

 

Michel

0 Kudos
Message 1 of 6
(3,527 Views)

I'm assuming you want to do your development on a Windows PC, using C++, to develop, compile, debug, and deploy an application to sbRIO-9651, which runs a Linux OS, correct?  This is possible.

 

If that is the case, the place to get started is here:

C/C++ Embedded System Design Tools

 

This whitepaper gives an overview of the tools needed and references more in depth tutorials for getting started.

 

If I've misinterpreted  your request, please clarify and we can get you an accurate answer.  

 

By the way, any programming that targets the FPGA on the sbRIO-9651 will need to be compiled with LabVIEW FPGA.  LabVIEW can integrate VHDL or other external IP, but the top-level FPGA VI and compile process must be created through LabVIEW.  Code that runs on the processor and interacts with the FPGA can be written in LabVIEW or C/C++.

 

Cheers,

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 2 of 6
(3,504 Views)

Hello Spex,

 

That's the thing, my collegue wants to perform his development on CentOS 7 linux distro, so not on a Windows PC.

 

My development is done on a Windows PC and I will provide my collegue the bitstream of the LabVIEW FPGA.

 

I hope this clarifies my situation.

 

Best regards,

 

Michel

0 Kudos
Message 3 of 6
(3,491 Views)

Hi Michel,

 

The getting started point I referenced above should still be the best place to start.

 

In particular look for the section of the document titled: "Software Toolchains Required." Below that heading you will find a download for GNU C & C++ Compiler for ARMv7 Linux (Linux host).

 

This set of links is also found in the NI Linux Real-Time FAQ document, which also points out that you are free to use any IDE:

 

Question: What’s the preferred cross-compile toolchain for building C/C++ applications for NI Linux Real-Time targets?
Answer: We provide the Mentor Graphics Sourcery G++ Lite for ARM GNU/Linux with the Eclipse installer that we’ve provided to make C/C++ development on NI Linux Real-Time targets easier. This installer can be found at: C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2013 or C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2014 depending on version. The Mentor Graphics Sourcery G++ Lite 2010.09-50 for ARM GNU/Linux compiler is gcc 4.4.1 with soft fp. You have the option to retrieve that same version of the cross compiler for a Linux host from the Mentor site: https://sourcery.mentor.com/GNUToolchain/. More generally, you are free to use any other cross-compiler, as long as it supports armv7a architecture and is softfp. You can also use your choice of C/C++ IDE, and are not limited to Eclipse. 

 

The GNU C/C++ Compilers for x64 Linux targets can be found here depending on if you have a Windows Host or Linux Host.

 

Cheers,

 

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
Message 4 of 6
(3,443 Views)

Hello Spex,

 

In the description it says "Recommended for use with the 2014 release of NI Linux Real-Time.".  I'm using LabVIEW 2015 (RT, FPGA...) for my development, is it going to work with the cross-compiler?

 

Michel

0 Kudos
Message 5 of 6
(3,397 Views)
Solution
Accepted by topic author Michel_Gauvin

Everything is working fine with a FPGA VI compiled with LabVIEW FPGA 2015.

 

1. I have setup Eclipse on CentOS 7 with the cross compiler found at this link:

GNU C & C++ Compilers for ARMv7 Linux (Linux host) 2014

 

2. I have also install a cross debugger to debug the c/c++ application remotly. Once on the page go into the section "Linaro Toolchain for Cortex-A" and download the second linux link "linaro-toolchain-binaries (big-endian)".  The gdb binary is in there, so you only needs to point to it in Eclipse debug configuration:

Linaro Toolchain for Cortex-A

 

3. I have installed the NI-RIO 15 linux drivers:

NI-RIO Driver 15.0 for Linux

 

4. I was able to program a c/c++ application that open and runs a LabVIEW FPGA bit stream by following some steps in:

FPGA Interface C API Example for NI Linux Real-Time and Eclipse

 

Michel

0 Kudos
Message 6 of 6
(3,336 Views)