Deploying Shared Variables to VxWorks Targets without Wind River
Hardware: PXI/CompactPCI>>Controllers
Problem: I need to deploy a shared library to my cRIO-901x. The library must be a .out file. How can I create a .out file without purchasing the
Wind River Workbench?
Solution: The GNU tool chain distributed with VxWorks can compile shared libraries for controllers running Wind River VxWorks, including the CompactRIO 901x and 907x series. Standalone copies of the free GNU tool chain for VxWorks 6.1 and 6.3 are attached to this document.
Installing the GNU Tool Chain
- Download the .zip file and extract the files directly to your C drive.
- The 6.1 download will create a supp and a WindRiver folder on the C drive. The 6.3 download will create a gccdist folder which contains these folders. Move these folders outside of gccdist and delete gccdist. Its other contents are not necessary but can provide further reference for using the GNU Tool Chain.
- Open the supp folder.
- Right-click setup-gcc.bat and select Edit.
- In the batch file, verify that the extraction path, GCCPATH, is set to the C drive. If necessary, change the line to read: GCCPATH=C:/.
- Save and close the notepad.
- Open a command shell by navigating to Start»Run and typing cmd.
- Type C: to go to the C drive.
- Type cd supp to go to the supp folder.
- Type setup-gcc.bat to run the batch file which installs the GNU Tool Chain.
Running the GNU Tool Chain Example
- In the command shell, type cd example go to the example folder.
- Type make to run the makefile which creates the .out file.
- Now if you navigate again to C:\supp\example, you will see a folder called PPC603gnu.
- Open PPC603gnu to see the example.out file which was created.
Editing the Makefile to Compile Other .out Files
- In supp, create a new folder for your files.
- Add the .cpp file you wish to convert to the new folder.
- Copy Makefile in the example folder and paste it to your new folder.
- Right-click Makefile and open it with notepad.
- Change the line OBJECTS := $(OBJ_DIR)/example.o to OBJECTS := $(OBJ_DIR)/yourcppfile'sname.o.
- Change the line PROJECT_TARGETS := $(OBJ_DIR)/example.out to PROJECT_TARGETS := $(OBJ_DIR)/yourcppfile'sname.out.
- In the command shell, type cd your new folder's name to go to that folder.
- Type make to run the makefile.
- In your new folder, you will see the PPC603gnu folder created which contains your new .out file.
- NOTE: If you receive an error running your new makefile, it may be necessary to run setup-gcc.bat again. Just follow Steps 7-10 in Installing the GNU Tool Chain, and try again. The command windows below illustrates this error.

Related Links: Developer Zone Tutorial: Developing Shared Libraries for the cRIO-901x and Other VxWorks Targets KnowledgeBase 44HDTKQ0: Frequently Asked Questions (FAQ) for NI cRIO-901x and cRIO-907x KnowledgeBase 4LRA4IQ0: What Operating System is my Real-Time Controller Running and Why?
Attachments: 
Report Date: 03/02/2009
Last Updated: 03/03/2009
Document ID: 4V1ACUAF