Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

Creating .out file using GNU Make for VxWorks

I would like to know how to compile .out files for VxWorks using GNU Make. I have found the redistributable GNU tool chain attached to the website below but I do not know how to run the setup-gcc.bat file. Could anyone tell me the steps from the beginning (extracting the files, folder directory, what things I need to change, etc)?? I am very new to this VxWorks and GNU Make. It would be good if it is a very simple detailed step by step instruction in creating .out files.
Thank you & Regards
0 Kudos
Message 1 of 7

Dear Lee:

     Thanks for the post. The dev zone document you linked in your post is a very good document that steps you though compiling shared libraries. If you download the attachment and unzip it, the main folder has a readme.txt. In that it explains how to run the .bat file and how you need to edit the .bat file. You do this in the dos prompt by typing in
start - > cmd - > then edit the batch file. The following is the text in the readme that I am talking about.  Keep in mind that when you create the folder it is in the C drive and the folder name does not contain any spaces in there. After this you can step through the document  -

Installing the gcc redistributable
Unzip this zip file to a hard drive location such as c:\vxworks61gccdist. On Windows systems, a path with no spaces in it is best. For example, a path
containing "Documents and Settings" may cause errors.

In the directory supp\ underneath this, edit setup-gcc.bat to set GCCPATH
to be the same as the unzip location.

Run setup-gcc.bat in a command shell to allow the use of the gcc toolchain
and the versions of make and several GNU utils distributed with Wind River's
version of gcc.

Building and running the example code
After running setup-gcc.bat, enter the example\ directory and type make.
The file PPC603gnu\example.out should be generated. FTP this to your
VxWorks controller's ni-rt/system directory. Open
example\example.lvproj in LabVIEW 8.20 (or later) and adjust the IP
address of the cRIO target to match your own. Finally, open and run, which calls two functions in example.cpp. If prompted for the location of example.dll, press the "Ignore" button. Compare the source code
with the VI output to ensure proper operation.

Consult the Developer Zone Document "Developing Shared Libraries for CompactRIO-901x and Other VxWorks
Controllers" for more information on developing on LabVIEW RT controllers
running VxWorks.

Thanks and hope this helps
Avi Harjani

0 Kudos
Message 2 of 7
Ia m trying to do the same thing, but I am getting some error. It says:
<null> tried to spawn get_feature but failed:The system cannot fine the file specified.
make: ***[PPCgnu/example.o] Error 1

Please let me know how to get past this error.


PS: PLease find attached the command prompt screenshot.
0 Kudos
Message 3 of 7
Hi Gayatri,
Please post the screenshot--it is not there on your post. Also what Linux/Unix distribution are you using?
Ipshita C.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 7
Sorry, please find the screenshot herewith.

0 Kudos
Message 5 of 7

Hi Gayatri,

You could be getting a link error because you appear to have specified CPU=PPC603 while compiling.If you look under $(WIND_BASE)/target/lib/ppc, you'll see two directories: PPC32 and PPC603. The latter should not really be there as it is created if the CPU type specified is not right. It contains only partial libraries; instead of compiling new code and updating the libaries in target/lib/ppc/PPC32. You created new partially-populated libraries in target/lib/ppc/PPC603. The linker scripts happen to find the PPC603 directory first when you go to link your image, but since the libraries are incomplete, you are getting link errors. Try the following and see if it fixes the issue:

% cd %(WIND_BASE)/target/lib/ppc
% /bin/rm -fr PPC603

Hope this helps.

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 6 of 7

Also, please create a new thread for this issue--this thread is obsolete and no longer tracked by National Instruments.

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 7 of 7