Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Eclipse IDE, C Development tools for MyRio

Solved!
Go to solution

Hello,
I've been trying for days now to run some simple C examples on a MyRio through the NI Eclipse IDE for linux real time but I can't get the IDE to build any projects. I followed every indications on the pdf ("C_Support_for_myRIO_User_Guide.pdf") included in the archive I downloaded here : https://www.ni.com/fr-fr/support/downloads/software-products/download.c-support-for-myrio.html#32980...
But nothing seems to work. My last attempt led to this errors : 

21:38:08 **** Rebuild of configuration Debug for project myRIO Example - UART ****
Info: Internal Builder is used for build
arm-nilrt-linux-gnueabi-gcc -DMyRio_1900 "-IC:\\saturn\\workspace\\C Support for myRIO\\source" "-IC:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linux-gnueabi\\usr\\include" -O0 -g3 -Wall -c -fmessage-length=0 -mfpu=vfpv3 -mfloat-abi=softfp "--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi" -o "C_Support\\NiFpga.o" "..\\..\\C Support for myRIO\\source\\NiFpga.c"
arm-nilrt-linux-gnueabi-gcc -DMyRio_1900 "-IC:\\saturn\\workspace\\C Support for myRIO\\source" "-IC:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linux-gnueabi\\usr\\include" -O0 -g3 -Wall -c -fmessage-length=0 -mfpu=vfpv3 -mfloat-abi=softfp "--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi" -o UART.o "..\\UART.c"
arm-nilrt-linux-gnueabi-gcc -DMyRio_1900 "-IC:\\saturn\\workspace\\C Support for myRIO\\source" "-IC:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linux-gnueabi\\usr\\include" -O0 -g3 -Wall -c -fmessage-length=0 -mfpu=vfpv3 -mfloat-abi=softfp "--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi" -o main.o "..\\main.c"
arm-nilrt-linux-gnueabi-gcc -DMyRio_1900 "-IC:\\saturn\\workspace\\C Support for myRIO\\source" "-IC:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linux-gnueabi\\usr\\include" -O0 -g3 -Wall -c -fmessage-length=0 -mfpu=vfpv3 -mfloat-abi=softfp "--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi" -o "C_Support\\MyRio.o" "..\\..\\C Support for myRIO\\source\\MyRio.c"
arm-nilrt-linux-gnueabi-gcc -DMyRio_1900 "-IC:\\saturn\\workspace\\C Support for myRIO\\source" "-IC:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linux-gnueabi\\usr\\include" -O0 -g3 -Wall -c -fmessage-length=0 -mfpu=vfpv3 -mfloat-abi=softfp "--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi" -o "C_Support\\IRQConfigure.o" "..\\..\\C Support for myRIO\\source\\IRQConfigure.c"
arm-nilrt-linux-gnueabi-gcc "-LC:\\saturn\\workspace\\C Support for myRIO\\source" "--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi" -o "myRIO Example - UART" main.o UART.o "C_Support\\NiFpga.o" "C_Support\\MyRio.o" "C_Support\\IRQConfigure.o" -ldl -lvisa -lpthread
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find crt1.o: No such file or directory
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find crti.o: No such file or directory
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find crtbegin.o: No such file or directory
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -ldl
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -lpthread
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -lgcc
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -lgcc_s
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -lc
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -lgcc
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find -lgcc_s
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find crtend.o: No such file or directory
c:/build/17.0/arm/sysroots/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/../../libexec/arm-nilrt-linux-gnueabi/gcc/arm-nilrt-linux-gnueabi/4.9.2/ld.exe: cannot find crtn.o: No such file or directory
collect2.exe: error: ld returned 1 exit status

If anyone has a solution to solve this that would be very helpful !
Thank you

0 Kudos
Message 1 of 3
(117 Views)
Solution
Accepted by topic author antoinelg

The first thing I noticed is that you are having linking problems, this is a big hint that a library path is missing or incorrect.  Then I looked at the log and see that your sysroot (ie. where the linker will be looking for libraries) is :

 

--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linuxgnueabi

 

it should be:

 

--sysroot=C:\\build\\17.0\\arm\\sysroots\\cortexa9-vfpv3-nilrt-linux-gnueabi

 

Go to the project properties and select C/C++ Build >> Settings.  On the Tool Settings tab select Cross GCC Compiler>> Miscellaneous.  Here you see the dialog box with the Other flags, this is where the sysroot is specified.  This is where you need to start poking around to fix your problem.  Then you need to make sure the same fix is applied to the Cross GCC Linker>>Miscellaneous settings.  Most likely a typo in your LIB_PATH environment variable.

0 Kudos
Message 2 of 3
(72 Views)
Highlighted

It works perfectly, thank you so much ! Now everything seems fine 😊

0 Kudos
Message 3 of 3
(64 Views)