[U-Boot] Problem executing hello world as specified on wiki

Hello U-Boot alias,
I am trying to execute the standlone examples of hello world by following the steps specified at the U-Boot wiki but have no success. This is what I am getting.
Method 1: --------------- EDB9302> tftp 40000 /tftpboot/hello_world.srec Using ep93xx_eth-0 device TFTP from server 192.168.15.6; our IP address is 192.168.15.15 Filename '/tftpboot/hello_world.srec'. Load address: 0x40000 Loading: # done Bytes transferred = 1916 (77c hex) EDB9302> go 40004 ## Starting application at 0x00040004 ...
<nothing just hung>
Method 2: ---------------- EDB9302> tftp 40000 /tftpboot/hello_world.bin Using ep93xx_eth-0 device TFTP from server 192.168.15.6; our IP address is 192.168.15.15 Filename '/tftpboot/hello_world.bin'. Load address: 0x40000 Loading: # done Bytes transferred = 616 (268 hex) EDB9302> go 40004 ## Starting application at 0x00040004 ... ������������������������������������� <some garbage>
Method 3: EDB9302> loadb 0x100000 ## Ready for binary (kermit) download to 0x00100000 at 115200 bps...
(Back at Gladiator) ---------------------------------------------------- (./) C-Kermit>send /tftpboot/hello_world (./) C-Kermit>connect Connecting to /dev/ttyUSB0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ---------------------------------------------------- Total Size = 0x0000937c = 37756 Bytes ## Start Addr = 0x00100000 EDB9302> go 0x00100000 ## Starting application at 0x00100000 ... undefined instruction pc : [<0010001c>] lr : [<05706e50>] sp : 0567fe4c ip : fffffffe fp : 00000001 r10: 056a01d8 r9 : 00000000 r8 : 0567ffe0 r7 : 00000000 r6 : 00000002 r5 : 056a028c r4 : 00100000 r3 : 00100000 r2 : 056a028c r1 : 056a028c r0 : 0008000c Flags: nZCv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
resetting ...
Please help me, how can I test simple hello world program like this on U-Boot.
Regards, Vipul.

Dear Vipul Jain,
In message b178b0fc1002211514n40ca7c7v1dd248612e6ba87@mail.gmail.com you wrote:
I am trying to execute the standlone examples of hello world by following the steps specified at the U-Boot wiki but have no success. This is what I am getting.
You must not just follow the steps without thinking.
Method 1:
EDB9302> tftp 40000 /tftpboot/hello_world.srec
What makes you think this is the correct download address?
Using ep93xx_eth-0 device
ep93xx? Sounds line an ARM system to me. Are you sure you have RAM at this address, and that this is the correct address for this standalone app?
EDB9302> loadb 0x100000 ## Ready for binary (kermit) download to 0x00100000 at 115200 bps...
What makes you think this is the correct download address?
Please help me, how can I test simple hello world program like this on U-Boot.
Well, if you continue trying random addresses you will probably continue getting random results.
Please read the FAQ: http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
Then think about your sytem, nd check the load and entry point addresses.
Best regards,
Wolfgang Denk

Hi Wolfgang,
I am totally newbie in u-boot who is trying to learn how to write/execute standlone application and as to start with learning I just blankly followed the steps I found on U-Boot twiki and on google. I personally don't know what those address mean. But would be very kind of you if you could please kindly help me understand what's the right way to learn which address to use and or how can I find this out?
You are correct I am using EDB9302 motherboard which is based on ARM920T processsor. Please kindly help me.
Regards, Vipul.
On Sun, Feb 21, 2010 at 3:22 PM, Wolfgang Denk wd@denx.de wrote:
Dear Vipul Jain,
In message b178b0fc1002211514n40ca7c7v1dd248612e6ba87@mail.gmail.com you wrote:
I am trying to execute the standlone examples of hello world by
following
the steps specified at the U-Boot wiki but have no success. This is what I am
getting.
You must not just follow the steps without thinking.
Method 1:
EDB9302> tftp 40000 /tftpboot/hello_world.srec
What makes you think this is the correct download address?
Using ep93xx_eth-0 device
ep93xx? Sounds line an ARM system to me. Are you sure you have RAM at this address, and that this is the correct address for this standalone app?
EDB9302> loadb 0x100000 ## Ready for binary (kermit) download to 0x00100000 at 115200 bps...
What makes you think this is the correct download address?
Please help me, how can I test simple hello world program like this on U-Boot.
Well, if you continue trying random addresses you will probably continue getting random results.
Please read the FAQ: http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
Then think about your sytem, nd check the load and entry point addresses.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Some of the things that I have tried and would like to share with you.
1. I read doc/README.standalone and it does mention default load addr and start addr of standalone application for various architecture. [Snippet] 4. The default load and start addresses of the applications are as follows:
Load address Start address x86 0x00040000 0x00040000 PowerPC 0x00040000 0x00040004 ARM 0x0c100000 0x0c100000 MIPS 0x80200000 0x80200000 Blackfin 0x00001000 0x00001000
[end of snippet]
2. as mine is ARM, I know that only file I am interested in is examples/standalone/hello_world why? because its in ARM ELF format. vipul@Gladiator:~/World/u-boot$ file examples/standalone/hello_world examples/standalone/hello_world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped
3. Now that I know the load addr, start addr and right hello_world file to use, I did the following
EDB9302> tftp 0x0c100000 /tftpboot/hello_world Using ep93xx_eth-0 device TFTP from server 192.168.15.6; our IP address is 192.168.15.15 Filename '/tftpboot/hello_world'. Load address: 0xc100000 Loading: ######## done Bytes transferred = 37756 (937c hex) EDB9302> go 0x0c100000
4. Result. I still see a panic. I am not sure what part I am missing. I was wondering if you could provide your kind guidance.
Regards, Vipul.
On Sun, Feb 21, 2010 at 4:11 PM, Vipul Jain vipulsj@gmail.com wrote:
Hi Wolfgang,
I am totally newbie in u-boot who is trying to learn how to write/execute standlone application and as to start with learning I just blankly followed the steps I found on U-Boot twiki and on google. I personally don't know what those address mean. But would be very kind of you if you could please kindly help me understand what's the right way to learn which address to use and or how can I find this out?
You are correct I am using EDB9302 motherboard which is based on ARM920T processsor. Please kindly help me.
Regards, Vipul.
On Sun, Feb 21, 2010 at 3:22 PM, Wolfgang Denk wd@denx.de wrote:
Dear Vipul Jain,
In message b178b0fc1002211514n40ca7c7v1dd248612e6ba87@mail.gmail.com you wrote:
I am trying to execute the standlone examples of hello world by
following
the steps specified at the U-Boot wiki but have no success. This is what I am
getting.
You must not just follow the steps without thinking.
Method 1:
EDB9302> tftp 40000 /tftpboot/hello_world.srec
What makes you think this is the correct download address?
Using ep93xx_eth-0 device
ep93xx? Sounds line an ARM system to me. Are you sure you have RAM at this address, and that this is the correct address for this standalone app?
EDB9302> loadb 0x100000 ## Ready for binary (kermit) download to 0x00100000 at 115200 bps...
What makes you think this is the correct download address?
Please help me, how can I test simple hello world program like this on U-Boot.
Well, if you continue trying random addresses you will probably continue getting random results.
Please read the FAQ: http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
Then think about your sytem, nd check the load and entry point addresses.
Best regards,
Wolfgang Denk

Dear Vipul Jain,
In message b178b0fc1002212126o5ebe538bqca46310151cb0355@mail.gmail.com you wrote:
Some of the things that I have tried and would like to share with you.
Please re-read the documentation, carefully.
- as mine is ARM, I know that only file I am interested in is
examples/standalone/hello_world why? because its in ARM ELF format.
Wrong. The "go" command expects a raw binary image, it cannot handle ELF files.
- Now that I know the load addr, start addr and right hello_world file to
use, I did the following
Wrong. You do not know, you assume. And probably your assumpions are wrong. You must CHECK if your assumptions are correct. Check the linker command that was used to link your program. Follow the advice in the FAQ to determine the entry point address.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Thanks for your kind guidance, I just want to rephrase my understanding as your guidance.
1. The file that I want to build should be raw binary file like we have u-boot.bin 2. Find out right address to load the binary file as per board.
Is this correct? If yes, I have a very limited knowledge of u-boot and hence was wondering if you could please help provide the right steps to follow.
I read the following document but it does not talk about compilation of the program or looking at any specific linker file for the right address, but infact, about how functions are exported to standalone program. 1. doc/README.standalone
2. About building the raw binary file. To my understanding when you build the U-Boot the standalone apps gets build as part of it. Hence I am not sure, how can I build the raw file for my ARM board. I could only see 3 hello world related binaries that are getting build and I choose hello_world just because after doing file hello_world* I could see hello_world file outputs some thing like file ../examples/standalone/hello_world* ../examples/standalone/hello_world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped ../examples/standalone/hello_world.bin: SysEx File - Kawai ../examples/standalone/hello_world.c: ASCII C program text ../examples/standalone/hello_world.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped ../examples/standalone/hello_world.srec: Motorola S-Record; binary data in text format
and hence I believed its my target. I will be really very thankful if you can help me in this learning of mine.
Please, suggest me documentation/files to look/ anything else that can help me in getting hello world on my ARM EDB9302 mother board.
Regards, Vipul.
On Mon, Feb 22, 2010 at 12:27 AM, Wolfgang Denk wd@denx.de wrote:
Dear Vipul Jain,
In message b178b0fc1002212126o5ebe538bqca46310151cb0355@mail.gmail.com you wrote:
Some of the things that I have tried and would like to share with you.
Please re-read the documentation, carefully.
- as mine is ARM, I know that only file I am interested in is
examples/standalone/hello_world why? because its in ARM ELF format.
Wrong. The "go" command expects a raw binary image, it cannot handle ELF files.
- Now that I know the load addr, start addr and right hello_world file
to
use, I did the following
Wrong. You do not know, you assume. And probably your assumpions are wrong. You must CHECK if your assumptions are correct. Check the linker command that was used to link your program. Follow the advice in the FAQ to determine the entry point address.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de In general, they do what you want, unless you want consistency. - Larry Wall in the perl man page
participants (2)
-
Vipul Jain
-
Wolfgang Denk