LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

New target fails to link

Created a new target for eCos on the EB40a using the ecos 565 as a template. Ran into compiler errors, but got around that by editing the target's ...ComplierFlags.vi to eliminate the PPC references.
Compiler flags output is now:

-DUsesSerialDebugger -DDBGBAUD=57600 -DSocketSupport=0 -DFileSupport=0 -DCHeadless=1 -I. -g -D__ECOS -D__ecos -w

Target now compiles, but fails to link
Linker error occurred

/tools/arm-elf/lib/gcc-lib/arm-elf/3.2/../../../../arm-elf/bin/ld: C:\Program Files\National Instruments\LabVIEW 7.1 Embedded\resource\LabVIEW Targets\Embedded\ecos\EB40a\libs\install\lib/vectors.o: Relocations in generic ELF (EM: 20)

C:\Program Files\National Instruments\LabVIEW 7.1 Embedded\resource\LabVIEW Targets\Embedded\ecos\EB40a\libs\install\lib/vectors.o: could not read symbols: File in wrong format

collect2: ld returned 1 exit status

Here are the settings for the Linker flags and the paths for the compiler, etc..


Linker flags

-g -nostdlib -Ttarget.ld -Wl,-static -Wl,--gc-sections -finit-priority -L"C:\Program Files\National Instruments\LabVIEW 7.1 Embedded\resource\LabVIEW Targets\Embedded\ecos\libs\install\lib"



compiler

C:\cygwin\tools\arm-elf\bin\arm-elf-gcc.exe



Linker

C:\cygwin\tools\arm-elf\bin\arm-elf-gcc.exe



Strip

C:\cygwin\tools\arm-elf\bin\arm-elf-strip.exe



----So it appears that there are a bunch of .o and .a files in target \libs\install\lib
Is this the problem? If so, how do I create these?

Thanks,
Richard
0 Kudos
Message 1 of 5
(8,327 Views)
Hi Richard,

When you installed cygwin, did you change the file type from UNIX to DOS during installation?

P.J.
0 Kudos
Message 2 of 5
(8,315 Views)
Did I change the file type from UNIX to DOS? I'm not sure. I'll find out.

BTW, it compiles successfully for the cmd555.

Richard
0 Kudos
Message 3 of 5
(8,311 Views)
Here is what mount shows. I believe textmode means it is dos.

$ mount
c:\cygwin\bin on /usr/bin type system (textmode)
c:\cygwin\lib on /usr/lib type system (textmode)
c:\cygwin\tmp on /tmp type user (binmode)
c:\cygwin on / type system (textmode)
c: on /ecos-c type user (textmode)
c: on /ecos-c type system (binmode)

I just compiled another VI for the Axiom eCos cmd565 and it builds, downloads and runs fine.

The files in /ecos/EB40a/libs/install/include/pkgconf/ are the same as the files for the cmd565. They even have names like "hal_powerpc.h". Names I wouldn't associate with ARM7. Do I need to clean out this dir, install the latest ecos, build the libraries, and transfer them to this directory? If so, are there certain settings I should use in the ecos config tool?

Richard
0 Kudos
Message 4 of 5
(8,304 Views)
Just to follow up - the vi now compiles and links. WooHoo!!

deleted the cmd565 stuff in /libs/install/
Compiled the EB40a libraries with ecos config on my linux box ( cygwin is giving me fits) and xfered them to /libs/install/include and /libs/install/lib

Next error was a complaint about not being able to find libad.a when compiling in DEBUG mode and liba.a in RELEASE mode. Can someone explain what these are and where the source is? Copied these two files from the cmd565 project and the linker error went away.

Next error was not being able to find libsupc++.a. Found it in a sub-folder of cygwin and copied it to /libs/install/lib. Compiles and links OK now!!

Now if I could just get it to download to my target. Having problems with the project. Pressing the run arrow gives the error message "Failed to access project info". Bypassed all that and went to the Redboot download VI (thanks for making all this stuff open) I can download and run my VI on a Cubix, but cannot download to the EB40a. The download program establishes comm with Redboot on the board, but continues to send the first packet (y-modem CRC-16) in an endless loop. Pressing cancel on the downloading progress bar doesn't cancel the process - it gets locked up in closing out the session. I had to change the window properties of the progress bar from modal to floating in order to do any debugging - suggest you make the same change.

oh well, progress is being made.

Richard
0 Kudos
Message 5 of 5
(8,294 Views)