|Download Help (Windows Only)|
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 running 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.
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, you would change "StartupDLLs=<DLLs>;" to "StartupDLLs=<DLLs>;/c/MyApplication.out;". Now your application will run every time the system starts up.
If you are using LabWindows/CVI to develop an application for a Phar Lap ETS real-time target, National Instruments 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 documentation for more information about running and deploying applications.
If you do not have the LabWindows/CVI Real-Time Module, you can still create DLLs and deploy them as described in the Microsoft Visual C++ section below.
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, you would change "StartupDLLs=<DLLs>;" to "StartupDLLs=<DLLs>;C:\MyApplication.dll;". Now your application will run every time the system starts up.
For information about developing C/C++ applications for NI Linux Real-Time targets, go to ni.com/info and enter the Info Code EclipseIDE.
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 may not be able to locate the bitfile. For more information, refer to the Session Functions topic of this help file.