Windows and Linux

In Windows and Linux, you can run a C/C++ application from within your development environment. If the original bitfile was built for a remote RIO target, your C/C++ application can interact with FPGA VIs that run on a remote RIO target. To run a C/C++ application on a remote target, change the resource passed into NiFpga_Open from a local resource, such as RIO0, to a remote resource, such as rio://<hostnameOrIpAddress>/RIO0. You can substitute a valid RIO alias for the resource name.

VxWorks

If you are developing for a VxWorks system, you can use the serial console for debugging. FTP the built binary (MyApplication.out) and the .lvbitx file to the root directory of the target. Using the serial console, type the ld command as shown in the following example to load the library:

ld < MyApplication.out

After loading the library, you can call any function in the library from the serial console.

When your application is complete and debugged, you can set up the system to run it on startup. Modify ni-rt.ini by appending to StartupDLLs under the [LVRT] section.

For example, when you change "StartupDLLs=<DLLs>;" to "StartupDLLs=<DLLs>;/c/MyApplication.out;", your application runs every time the system starts up.

Phar Lap ETS

If you are using LabWindows/CVI to develop an application for a Phar Lap ETS real-time target, the mnaufacturer recommends that you use the LabWindows/CVI Real-Time Module. Select Run»Select Execution Target for Debugging»New Execution Target to specify your target system. Then select Run»Manage Files on Real-Time Execution Target to add the .lvbitx file. You can then run the application by selecting Run»Debug Project. Refer to the LabWindows/CVI User Manual at ni.com/docs for more information about running and deploying applications.

If you are using Microsoft Visual C++ to develop an application for a Phar Lap ETS real-time target, you must set up the system to run your application on startup. FTP the built binary (MyApplication.dll) and the .lvbitx file to the root directory of the target. Then modify ni-rt.ini by appending to StartupDLLs under the [LVRT] section.

For example, when you change "StartupDLLs=<DLLs>;" to "StartupDLLs=<DLLs>;C:\MyApplication.dll;", your application runs every time the system starts up.

NI Linux Real-Time

For information about developing C/C++ applications for NI Linux Real-Time targets, go to ni.com/info and enter the info code EclipseIDE.

Specifying the Location of the .lvbitx File

Because different operating systems have different default current working directories for applications, you must pass an absolute path for the bitfile parameter of the NiFpga_Open function. If you pass only the filename instead of an absolute path, the operating system cannot locate the bitfile.