[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] linker error... plz..HELP!!!



Anuroop M schrieb:

Hi all,

I am having problems generating an executable using "mb-gcc", for a simple
"hello world" program.

int main()
{
        printf("Hello World\n");
}

$ mb-gcc -c t.c
On compiling it as above, it generates t.o (no errors/warnings)

$ mb-gcc t.c -o t
On compiling it as above, it gives the following error messages

/cygdrive/c/EDK_7.1/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../
../.
./microblaze/lib/libc.a(write.o): In function `write':
/home/vasanth/dev/halite/env/Jobs/MDT/sw/nt/gnu1/newlib_bld/libgloss/write.c
:36:
 undefined reference to `outbyte'
/home/vasanth/dev/halite/env/Jobs/MDT/sw/nt/gnu1/newlib_bld/libgloss/write.c
:34:
 undefined reference to `outbyte'
/home/vasanth/dev/halite/env/Jobs/MDT/sw/nt/gnu1/newlib_bld/libgloss/write.c
:36:
 undefined reference to `outbyte'
/cygdrive/c/EDK_7.1/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../
../.
./microblaze/lib/libc.a(read.o): In function `read':
/home/vasanth/dev/halite/env/Jobs/MDT/sw/nt/gnu1/newlib_bld/libgloss/read.c:
32:
undefined reference to `inbyte'
collect2: ld returned 1 exit status

The link stage is causing errors....

please help me to solve this issue..!!
thanks,
Anuroop


------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.13.13/199 - Release Date: 13.12.2005

Hi Anuroop,

you haven't specified a stdin and stdout if you get this messages. In the "System" Tab right-click on your microblaze instance and select "Software Platform Settings" . In the Tab "Library/OS Parameters" select an input and output device, for example a "uartlite" as stdin and stdout. Then you can see your hello world on a Terminal. A hint : if you use "xil_printf" instead of "printf" less memory is needed for the program as this is a slimmed version of printf with less functionality of course.

--
mit freundlichen Grüßen
best regards

Matthias Heise

ZEUTEC Opto-Elektronik GmbH
im Zentrum für Energie und Technik
Kieler Strasse 211
24768 Rendsburg
Germany

Tel.: +49-4331-136 799
Fax.: +49-4331-136 651
m.heise@xxxxxxxxx
http://www.zeutec.de
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/