* [U-Boot-Users] u-boot compilation problem
@ 2004-11-26 6:09 Pradip Singh
2004-11-26 7:18 ` Marc Leeman
2004-11-26 7:31 ` Wolfgang Denk
0 siblings, 2 replies; 6+ messages in thread
From: Pradip Singh @ 2004-11-26 6:09 UTC (permalink / raw)
To: u-boot
Hi all,
I am porting the U-boot to my custom board which is arm based. While building the u-boot i get the following compilation error.
armv5b-softfloat-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x00780000 -I/root/isl/heron_old/u-boot-1.1.1/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/crosstool/armv5b-softfloat-linux/gcc-3.4.1-glibc-2.3.3/lib/gcc/armv5b-softfloat-linux/3.4.1/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv5te -mbig-endian -Wall
-Wstrict-prototypes -c -o hello_world.o hello_world.c
armv5b-softfloat-linux-ld -g -EB -Ttext 0x000007fc0 \
-o hello_world -e hello_world hello_world.o libstubs.a \
-L/opt/crosstool/armv5b-softfloat-linux/gcc-3.4.1-glibc-2.3.3/lib/gcc/armv5b-softfloat-linux/3.4.1 -lgcc
hello_world.o(.text+0x1c): In function `hello_world':
/root/isl/heron_old/u-boot-1.1.1/examples/hello_world.c:44: undefined reference
to `printf'
hello_world.o(.text+0x20):/root/isl/heron_old/u-boot-1.1.1/examples/hello_world.c:45: undefined reference to `get_version'
hello_world.o(.text+0x2c):/root/isl/heron_old/u-boot-1.1.1/examples/hello_world.c:45: undefined reference to `printf'
hello_world.o(.text+0x34):/root/isl/heron_old/u-boot-1.1.1/examples/hello_world.c:47: undefined reference to `printf'
hello_world.o(.text+0x44):/root/isl/heron_old/u-boot-1.1.1/examples/hello_world.c:49: undefined reference to `printf'
hello_world.o(.text+0x6c):/root/isl/heron_old/u-boot-1.1.1/examples/hello_world.c:52: undefined reference to `printf'
Any clue what this problem can Be?
Thanks and regards,
Pradip
Yahoo! India Matrimony: Find your life partneronline.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041126/fbdb8019/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot-Users] u-boot compilation problem
2004-11-26 6:09 [U-Boot-Users] u-boot compilation problem Pradip Singh
@ 2004-11-26 7:18 ` Marc Leeman
2004-11-26 7:31 ` Wolfgang Denk
1 sibling, 0 replies; 6+ messages in thread
From: Marc Leeman @ 2004-11-26 7:18 UTC (permalink / raw)
To: u-boot
> Any clue what this problem can Be?
An undefined reference to printf?
Sometimes compiler errors _do_ give useful messages.
It looks to me you are not linking with the file where 'printf' is
implemented in.
quick-n-dirty:
put the following in your file >:)
#define printf(args...) do { } while(0)
--
ash nazg durbatul?k, ash nazg gimbatul,
ash nazg thrakatul?k agh burzum-ishi krimpatul
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot-Users] u-boot compilation problem
2004-11-26 6:09 [U-Boot-Users] u-boot compilation problem Pradip Singh
2004-11-26 7:18 ` Marc Leeman
@ 2004-11-26 7:31 ` Wolfgang Denk
2004-11-26 8:53 ` Pradip Singh
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2004-11-26 7:31 UTC (permalink / raw)
To: u-boot
In message <20041126060937.99611.qmail@web8502.mail.in.yahoo.com> you wrote:
>
> I am porting the U-boot to my custom board which is arm based. While building the u-boot i get the following compilation error.
What did you change for your port?
> armv5b-softfloat-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x00780000 -I/root/isl/heron_old/u-boot-1.1.1/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/crosstool/armv5b-softfloat-
> linux/gcc-3.4.1-glibc-2.3.3/lib/gcc/armv5b-softfloat-linux/3.4.1/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv5te -mbig-endian -Wall
> -Wstrict-prototypes -c -o hello_world.o hello_world.c
> armv5b-softfloat-linux-ld -g -EB -Ttext 0x000007fc0 \
^^^^^^^^^^^
For example, where is this address coming from?
> Any clue what this problem can Be?
Since it compiles find with working toolchains for the existing
boards the problem is either in your modifications to the code and/or
in your toolchain.
Can you compile your modified code using a working toolchain (like ELDK 3.1) ?
Can you compile other ARM boards using your own toolchain?
> --0-87651495-1101449377=:95334
> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
>
> <DIV>
> <DIV>Hi all,</DIV>
NEVER, NEVER ever post HTML again!
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Physician: One upon whom we set our hopes when ill and our dogs when
well. - Ambrose Bierce
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot-Users] u-boot compilation problem
2004-11-26 7:31 ` Wolfgang Denk
@ 2004-11-26 8:53 ` Pradip Singh
2004-11-26 10:02 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Pradip Singh @ 2004-11-26 8:53 UTC (permalink / raw)
To: u-boot
Hi,
Ya I agree that address is wrong 0x000007fc0. Actually in the U-boot example directory Makefile there is a macro LOAD_ADDR. I wanted the hellow_world program to load at address 0x00007fc0. Hence I thought that by changing this macro i may be able to achive my objective. Is my asumption correct? I am relocating the u-boot code at address 0x0078000. Also When i am going through the U-boot examples directory Makfile I find that hello_world is not getting linked with libcommon.a which is having this printf. So i tried also linking with libcommon.a but it seems it has a lot of dipendencies on other libraries. I donot suspect the tool chain becouse the U-boot builds and also runs fine when i remove the compilation of example directory. I want to compile this hello world example to see that i am able to run a program from memory using go command.
Also I want the printf in Hello_world so that i can see some output on my console.
thanks and regards,
Pradip
Wolfgang Denk <wd@denx.de> wrote:
In message <20041126060937.99611.qmail@web8502.mail.in.yahoo.com> you wrote:
>
> I am porting the U-boot to my custom board which is arm based. While building the u-boot i get the following compilation error.
What did you change for your port?
> armv5b-softfloat-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x00780000 -I/root/isl/heron_old/u-boot-1.1.1/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/crosstool/armv5b-softfloat-
> linux/gcc-3.4.1-glibc-2.3.3/lib/gcc/armv5b-softfloat-linux/3.4.1/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv5te -mbig-endian -Wall
> -Wstrict-prototypes -c -o hello_world.o hello_world.c
> armv5b-softfloat-linux-ld -g -EB -Ttext 0x000007fc0 \
^^^^^^^^^^^
For example, where is this address coming from?
> Any clue what this problem can Be?
Since it compiles find with working toolchains for the existing
boards the problem is either in your modifications to the code and/or
in your toolchain.
Can you compile your modified code using a working toolchain (like ELDK 3.1) ?
Can you compile other ARM boards using your own toolchain?
> --0-87651495-1101449377=:95334
> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
>
>
> Hi all,
NEVER, NEVER ever post HTML again!
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Physician: One upon whom we set our hopes when ill and our dogs when
well. - Ambrose Bierce
Yahoo! India Matrimony: Find your life partneronline.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041126/ac8e9cf5/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] u-boot compilation problem
2004-11-26 8:53 ` Pradip Singh
@ 2004-11-26 10:02 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2004-11-26 10:02 UTC (permalink / raw)
To: u-boot
In message <20041126085345.30072.qmail@web8509.mail.in.yahoo.com> you wrote:
>
> Ya I agree that address is wrong 0x000007fc0. Actually in the U-boot example directory Makefile there is a macro LOAD_ADDR. I wanted the hellow_world program to load at address 0x00007fc0. Hence I thought that by changing this macro i may be able to a
Please use shorter lines!! Read the Netiquette!
Are you sure that there is free memory at this address?? What does
your memory map look like?
> chive my objective. Is my asumption correct? I am relocating the u-boot code at address 0x0078000. Also When i am going through the U-boot examples directory Makfile I find that hello_world is not getting linked with libcommon.a which is having this pr
> intf. So i tried also linking with libcommon.a but it seems it has a lot of dipendencies on other libraries. I donot suspect the tool chain becouse the U-boot builds and also runs fine when i remove the compilation of example directory. I want to compil
Please don;t try to do thinks which you don't understand. Standalone
applications do not link against the U-boot libraries. Please RTFM.
For a start, read doc/README.standalone
> Also I want the printf in Hello_world so that i can see some output on my console.
Why don't you just leave the code as is? It is working fine in it's
current state. Your modifications just broke it.
Please note that in my previous message I wrote:
> NEVER, NEVER ever post HTML again!
AND WHAT ARE YOU DOING?????
> Yahoo! India Matrimony: Find your life partneronline.
> --0-359146068-1101459225=:30010
> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
>
> <DIV>Hi,</DIV>
It is a requirement on this mailing list that you DO NOT POST HTML.
Please accept this rule.
DO NOT POST HTML.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
We call our dog Egypt, because in every room he leaves a pyramid.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] u-boot compilation problem
@ 2004-11-26 8:33 Vandendriessche, Dirk
0 siblings, 0 replies; 6+ messages in thread
From: Vandendriessche, Dirk @ 2004-11-26 8:33 UTC (permalink / raw)
To: u-boot
>> quick-n-dirty:
>> put the following in your file >:)
>> #define printf(args...) do { } while(0)
even better
#define printf()
(replace by nothing)
Dirk.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041126/cd8befe4/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-11-26 10:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-26 6:09 [U-Boot-Users] u-boot compilation problem Pradip Singh
2004-11-26 7:18 ` Marc Leeman
2004-11-26 7:31 ` Wolfgang Denk
2004-11-26 8:53 ` Pradip Singh
2004-11-26 10:02 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2004-11-26 8:33 Vandendriessche, Dirk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.