From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Compact RIO - vxworks

Solved!
Go to solution

Hi,

I developed a C++ code, and I would like to call it from a LabVIEW Real-Time application that has a VxWorks target. I downloaded the redistributable GNU tool chain and installed it based on the instructions explained in the literature with “Document ID: 4V1ACUAF” (http://digital.ni.com/public.nsf/allkb/81D1172E3C28A5E4862575CC0076A230). However, It cannot compile the C++ example file and the corresponding error message is as follows:

 

rio.JPG

 


I will appreciate if someone guide me to overcome this problem.

Thank you in advance

0 Kudos
Message 1 of 23
(6,466 Views)

Hi Davarpanah,

 

Looking at the KB, we might have a mistake. I performed "make" without making the changes to the setup-gcc.bat file and everything worked perfectly. In addition, this DevZone article http://www.ni.com/white-paper/5694/en tells us that the GCCPATH should be "GCCPATH=gccdist" which in your case gccdist will be "vxworks61gccdist". If you follow the instructions on your original KB http://digital.ni.com/public.nsf/allkb/81D1172E3C28A5E4862575CC0076A230 and just skip steps 4 and 5 in the "Installing the GNU Tool Chain" section, I believe you should be fine.

 

To be clear, the setup-gcc.bat file should read:

 

set GCCPATH=C:\vxworks61gccdist

 

which is the original version when you download it. Let me know if this is the case, I hope this info helps!

 

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 2 of 23
(6,445 Views)

Hi Aldo,

 

Thank you very much for your answer.

I performed what you suggested; however, it has the same problem as shown in the below picture. Moreover, i change the GCCPATH in setup-gcc.bat and also copy all filein the C:\ , but it doesn't work and the same message appears.

 

 

NI_2.JPG

 

 

Thank you in advance for your guidance,

Davarpanah

0 Kudos
Message 3 of 23
(6,440 Views)

Hi Davarpanah,

 

Please extract to C:\vxworks61gccdist not C:\gccdist, next, please change the red box line:

 

check.png

 

to read:

 

set GCCPATH=C:\vxworks61gccdist

 

Give that a try and let me know if it works, thanks!

 

 

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 4 of 23
(6,435 Views)

Hi Aldo,

Thank you for your reply

I am sure that this problem is not for a wring path. Because i have investigated many cases with both versions of vxworks61 and vxworks63. But, I examined your suggestion againa and as it is shown in the following figure, it doesn't work.

Have you installed any other C++ compiler or other softwares which is in related to this program?

 

Thank you in advance for your help

 

 

NI3.JPG

0 Kudos
Message 5 of 23
(6,428 Views)

Hi Davarpanah,

 

I do not have any other C++ compiler installed. I noticed that you are running as user Administ but that may not mean that you are running the CMD prompt as an Administrator. I believe that when "make" tries to create "example.o", it does not have the privileges as Administrator to create it which causes the make to error out as "file not found". Please make sure that you are running the cmd prompt as an administrator (see attached screenshot) and that you have the ability to create files in the root C:\ directory. After checking for privileges, try the build one more time. Thanks!

 

 

 

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 6 of 23
(6,414 Views)

Hi Also,

 

Thanks a lot for your support. Unfortunately your last suggestion does not apply to me since I am already the system administrator and can create files/folders in C:.

 

I suspect that this issue has to do with "Environment Variables" under System Properties/Advanced. I had a similar issue with another compiler and eventually it turned out that an environment variable had to be deleted.

 

Any more thoughts/suggestions?

 

Thanks

0 Kudos
Message 7 of 23
(6,407 Views)

Hi Devarpanah,

 

Can you post your Makefile and your setup-gcc.bat files? I would like to see the paths being built which will shed some light into this behavior. In addition, please perform the following commands in the cmd prompt and take a screenshot of the results:

 

echo %GCCPATH%

echo %PATH%

echo %WIND_BASE%

echo %WIND_HOME%

 

Thanks!

 

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 8 of 23
(6,404 Views)

 

Hi Adlo,

Thank you very much for your answers

 

Regards,

Davarpanah

0 Kudos
Message 9 of 23
(6,398 Views)

Hi Davarpanah,

 

Would you be able to check if the example.o file is being generated withing the PPC603 folder? Are the rest of the files generated? (example.d, example.o, and example.out)

 

 

 

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 10 of 23
(6,380 Views)