The purpose of this example is to demonstrate the various host to FPGA communication mechanisms available in the FPGA Interface C API, all in one application, as a supplement to the existing FPGA Interface C API examples. The application is relatively simple, and is intended to be run from the command line in NI Linux Real-Time. The example uses the following Host-to-FPGA communication methods:
You will then need to import the C project into your workspace in Eclipse.
Download and unzip the attached files. Then, open Eclipse and go to File >> Import and select General >> Existing Projects into Workspace.
Choose the "C Code" folder from the attached zip file.
Ensure "Copy Projects into workspace" is enabled
Note: You will also need to link against libdl in order to use any RIO driver functions. To do this, open up the Properties dialog for your project. Then expand the C/C++ Build section and select Settings. Under the tab Tool Settings, expand Cross G++ Linker and then select Libraries. In that category, add "dl" under the Libraries (-l) header.
The attached zip file contains LabVIEW code (LabVIEW FPGA and a LabVIEW Real-Time test VI) as well as C code. The example was built for a cRIO-9068, so if you are using that target then you do not need to open or recompile the LabVIEW FPGA code, as long as your NI-RIO version is still compatible. If you do need to recompile the FPGA code, download the FPGA Interface C API. Then follow this tutorial to learn how to use it: