LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Adopt emb.LV to emb.Linux Target ARM9 Prozessor

hello,Mr Michael

   The error aboved is solved,but the new linking error appeared as follows:

Linking error:
lvEmbeddedMain.o:lvEmbeddedMain.c:(.text+0x49): undefined reference to `_LV_unix_init'
lvEmbeddedMain.o:lvEmbeddedMain.c:(.text+0x4e): undefined reference to `_LVCGenRTInit'
lvEmbeddedMain.o:lvEmbeddedMain.c:(.text+0x83): undefined reference to `_LVCGenRTRunTopLevelVI'
lvEmbeddedMain.o:lvEmbeddedMain.c:(.text+0xa1): undefined reference to `_LVCGenRTEnd'
lvEmbeddedMain.o:lvEmbeddedMain.c:(.text+0xa6): undefined reference to `_LV_unix_fini'
test.o:test.c:(.text+0xc4): undefined reference to `_RunVI'
collect2: ld returned 1 exit status

I don't know how to define the function in the target.

thank you!

lianzi

i like thinking ,i enjoy doing the work.baxia
0 Kudos
Message 31 of 56
(6,658 Views)
Hi,

These functions are defined in C files in the runtime libraries, here <CCodeGen\libsrc\os\unix\LVUnixInit.c> and here <CCodeGen\libsrc\os\unix\ lvcgenrtinit.c>. These files need to be included when you build the runtime libraries and must be linked in.
--
Michael P
National Instruments
0 Kudos
Message 32 of 56
(6,654 Views)
Hello,Michael
      I found these functions in the CCodeGen,but I don't know  how to build the runtime libraries ?
IN the chapter 7-Porting the LabVIEW Embedded Run-Time and Analysis Libraries Source Code,I don't find the methods to build the library.Can you give an example ?
 
Thank you!
 
lianzi
i like thinking ,i enjoy doing the work.baxia
0 Kudos
Message 33 of 56
(6,645 Views)
Hi,

How you build the run-time libraries depends on your tool chain. In most cases, a makefile is the method of choice. An example of this is located in labview\Targets\NI\Embedded\unix\build\.
--
Michael P
National Instruments
0 Kudos
Message 34 of 56
(6,628 Views)
hello.Michael
 The errors above  are sloved,but there is still a new question as follows:
/usr/local/lib/gcc/arm-elf/3.4.0-macraigor1/../../../../arm-elf/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
 
I installed  gnutools-arm-elf-2.05.exe ,and I change it for the gnutools-arm-elf-2.04.exe,but the error is the same.
Maybe it is the problem about third toolchain.
Can you give me some advice?
Thank you!
 
Lianzi
i like thinking ,i enjoy doing the work.baxia
0 Kudos
Message 35 of 56
(6,609 Views)
Hi,

Can you give me the exact command string sent to the linker?
--
Michael P
National Instruments
0 Kudos
Message 36 of 56
(6,603 Views)

Hello,Michael

The linker is "-g -m5307 -lc -lpthread -lgcc -lm -lstdc++"

i like thinking ,i enjoy doing the work.baxia
0 Kudos
Message 37 of 56
(6,601 Views)
Hi,

It appears that there is something wrong with the installation of the gcc toolchain you are using. Are you able to compile and link a simple C program? What version of the toolchain are you using, and where did you get it?
--
Michael P
National Instruments
0 Kudos
Message 38 of 56
(6,595 Views)
Hello,Michael
        The  gcc toolchain i used is gnutools-arm-elf-2.05.exe,where i down form  here:http://www.ocdemon.com/gnutools-arm-elf-2.05.exe.Is it right?
 
i like thinking ,i enjoy doing the work.baxia
0 Kudos
Message 39 of 56
(6,588 Views)
Hello,Michael
         Is the gcc toolchain  i chosed right?And there is another question occured to me,that is i can't build the makefile successfully,The makefile is in the attached files.
Thank you for giving me your advice.Thank you very much!
……
../CCodeGen/include/blockdiagram/MemCheck.h:27: warning: data definition has no type or storage class
../CCodeGen/include/blockdiagram/MemCheck.h:28: parse error before `critsect'
../CCodeGen/include/blockdiagram/MemCheck.h:28: warning: function declaration isn't a prototype
../CCodeGen/include/blockdiagram/MemCheck.h:191: warning: function declaration isn't a prototype
In file included from ../CCodeGen/libsrc/blockdiagram/CCGArrSupport2.c:18:
../CCodeGen/include/blockdiagram/LVCCG.h:682: parse error before `gVICriticalSections'
../CCodeGen/include/blockdiagram/LVCCG.h:682: warning: type defaults to `int' in declaration of `gVICriticalSections'
../CCodeGen/include/blockdiagram/LVCCG.h:682: warning: data definition has no type or storage class
../CCodeGen/include/blockdiagram/LVCCG.h:688: parse error before `gReentrantCritSect'
../CCodeGen/include/blockdiagram/LVCCG.h:688: warning: type defaults to `int' in declaration of `gReentrantCritSect'
../CCodeGen/include/blockdiagram/LVCCG.h:688: warning: data definition has no type or storage class
../CCodeGen/include/blockdiagram/LVCCG.h:689: parse error before `gStepCritSect'
../CCodeGen/include/blockdiagram/LVCCG.h:689: warning: type defaults to `int' in declaration of `gStepCritSect'../CCodeGen/include/blockdiagram/LVCCG.h:689: warning: data definition has no type or storage class
../CCodeGen/include/blockdiagram/LVCCG.h:706: stray '\' in program
../CCodeGen/include/blockdiagram/LVCCG.h:707: stray '\' in program
../CCodeGen/include/blockdiagram/LVCCG.h:708: warning: type defaults to `int' in declaration of `argName'
../CCodeGen/include/blockdiagram/LVCCG.h:708: `tlAL' undeclared here (not in a function)
../CCodeGen/include/blockdiagram/LVCCG.h:708: warning: data definition has no type or storage class
……
 
 
i like thinking ,i enjoy doing the work.baxia
Download All
0 Kudos
Message 40 of 56
(6,563 Views)