Re: [U-Boot] Run hello world with Uboot !

Dear "Mathieu Dube",
please keep the ML on Cc: !
In message c5ee099c0810070917s7bd8d0dey9908f41419c3c03d@mail.gmail.com you wrote:
Did you read the FAQ??? this entry?:
http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
Yes, this entry.
if I nm(with the correct toolchain) the executable
it gives me 0c100000 T hello_world
so I go 0x8c100000
still crashes.
HM. I'm not really surprised. For me, 0x8c100000 is not the same as 0x0c100000. For me, that makes a difference of 2 GB.
is there another way to find the exact entry point?
"nm" is a good way.
Best regards,
Wolfgang Denk

On Tue, Oct 7, 2008 at 5:05 PM, Wolfgang Denk wd@denx.de wrote:
Dear "Mathieu Dube",
please keep the ML on Cc: !
sorry about that.
if I nm(with the correct toolchain) the executable
it gives me 0c100000 T hello_world
so I go 0x8c100000
still crashes.
HM. I'm not really surprised. For me, 0x8c100000 is not the same as 0x0c100000. For me, that makes a difference of 2 GB.
quite right.
I did :
tftp 0x80000000 /tftpboot/hello_world.bin
since the entry point is 0x0c100000
shouldnt I go from 0x80000000 + 0x0c100000? which is 0x8c100000 ?
am I wrong in using 0x80000000 which is the start address of the SDRAM according to the board's documentation?
0x00000000 to 0x1fffc000 is unused and if I tftp 0x00000000 it doesnt work.
is there another way to find the exact entry point?
"nm" is a good way.
thanks. I used that.
-M

Dear Mathieu,
In message c5ee099c0810080632v1166ce61h5ed213512760c97@mail.gmail.com you wrote:
I did :
tftp 0x80000000 /tftpboot/hello_world.bin
since the entry point is 0x0c100000
shouldnt I go from 0x80000000 + 0x0c100000? which is 0x8c100000 ?
No, of course not. The entry point is an absolute address, not an offset. This is not completely poistion-independent code, it is linked for one specific absolute address.
am I wrong in using 0x80000000 which is the start address of the SDRAM according to the board's documentation?
You are wrong when linking the application to an absolute address where you cannot execute it because it is not in RAM.
Best regards,
Wolfgang Denk
participants (2)
-
Mathieu Dube
-
Wolfgang Denk