Skip to contentSkip to conversation

Run hello world with Uboot !

U-Boot thaoth 6 participants 12 messages Oct 7, 2008 – Oct 9, 2008 1 message not in the archive

lore
Share & tools
lore

thaoth

author
#0 lore raw

Hi,

I'm working on SH7727?T-Engine Board (MS7727CP02)(sh3) and I'm trying to load Hello World example in U-boot (use Serial, ymodem and hello_world.bin),
...
=> loady 0x8e000000
## Ready for binary (ymodem) download to 0x8E000000 at 115200 bps... CCCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 5 retries
## Total Size = 0x000112ec = 70380 Bytes
=> go 0x8e000000
## Starting application at 0x8E000000 ...
...
but my board reset when I run Hello world. I also try with hello_world.srec (serial, Kermit mode) and an uboot image:
"mkimage -A sh -O u-boot -T standalone -C none -a 0x8c000000 -e 0x8c000000 -n 'Hello Image' -d examples/hello_world hello.img"
...
=> loady
## Ready for binary (ymodem) download to 0x8E000000 at 115200 bps... CCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 4 retries
## Total Size = 0x0001132c = 70444 Bytes
=> bootm 0x8e000000
* kernel: cmdline image address = 0x8e000000
## Booting kernel from Legacy Image at 8e000000 ...

   Image Name:   Hello Image
   Image Type:   SuperH U-Boot Standalone Program (uncompressed)
   Data Size:    70380 Bytes = 68.7 kB

Load Address: 8c000000
Entry Point: 8c000000
Verifying Checksum ... OK
Wrong Image Type for bootm command
ERROR: can't get kernel image!
...
Could you give me an advice?
I think i have wrong image format? But how can I get correct format ?

Best regards.

Signature · 2 lines
View this message in context: http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19851315.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
#1 lore raw

http://www.denx.de/wiki/DULG/UBootStandalone

Kind regards,
Andrejs Cainikovs

Quoted 38 lines · thaoth

Hi,

I'm working on SH7727?T-Engine Board (MS7727CP02)(sh3) and I'm trying to load Hello World example in U-boot (use Serial, ymodem and hello_world.bin),
...
=> loady 0x8e000000
## Ready for binary (ymodem) download to 0x8E000000 at 115200 bps... CCCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 5 retries
## Total Size = 0x000112ec = 70380 Bytes
=> go 0x8e000000
## Starting application at 0x8E000000 ...
...
but my board reset when I run Hello world. I also try with hello_world.srec (serial, Kermit mode) and an uboot image:
"mkimage -A sh -O u-boot -T standalone -C none -a 0x8c000000 -e 0x8c000000 -n 'Hello Image' -d examples/hello_world hello.img"
...
=> loady
## Ready for binary (ymodem) download to 0x8E000000 at 115200 bps... CCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 4 retries
## Total Size = 0x0001132c = 70444 Bytes
=> bootm 0x8e000000
* kernel: cmdline image address = 0x8e000000
## Booting kernel from Legacy Image at 8e000000 ...

   Image Name:   Hello Image
   Image Type:   SuperH U-Boot Standalone Program (uncompressed)
   Data Size:    70380 Bytes = 68.7 kB

Load Address: 8c000000
Entry Point: 8c000000
Verifying Checksum ... OK
Wrong Image Type for bootm command
ERROR: can't get kernel image!
...
Could you give me an advice?
I think i have wrong image format? But how can I get correct format ?

Best regards.

#2 lore raw
In reply to thaoth

Hi

I have the same problem with an imx3.1 dev board.

I do this:

uboot> tftp 0x80000000 /tftpboot/hello_world.bin
smc911x: initializing
smc911x: detected LAN9117 controller
smc911x: phy initialized
smc911x: MAC 00:08:ee:01:e1:3c
TFTP from server 192.168.1.70; our IP address is 192.168.1.71 Filename '/tftpboot/hello_world.bin'.
Load address: 0x80000000
Loading: #
done
Bytes transferred = 536 (218 hex)

then:

uboot> go 0x80000000
## Starting application at 0x80000000 ...

on my jtag it goes :

- TARGET: core #0 has entered debug mode

which I think means it crashed

here's the output of info on jtag:
Core number : 0
Core state : debug mode (ARM)
Debug entry cause : Vector Catch (DATA ABORT)
Current PC : 0x87f12724
Current CPSR : 0x600001d3 (Supervisor)

I've also tried to go 0x80000004 with the same result.

Im surely doing something wrong.

If someone could point out to me what I could be doing wrong I'd appreciate

thanks
-M

Quoted 49 lines · thaoth

Hi,

I'm working on SH7727 T-Engine Board (MS7727CP02)(sh3) and I'm trying to load Hello World example in U-boot (use Serial, ymodem and hello_world.bin),
...
=> loady 0x8e000000
## Ready for binary (ymodem) download to 0x8E000000 at 115200 bps... CCCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 5 retries
## Total Size = 0x000112ec = 70380 Bytes
=> go 0x8e000000
## Starting application at 0x8E000000 ...
...
but my board reset when I run Hello world. I also try with hello_world.srec (serial, Kermit mode) and an uboot image:
"mkimage -A sh -O u-boot -T standalone -C none -a 0x8c000000 -e 0x8c000000 -n 'Hello Image' -d examples/hello_world hello.img"
...
=> loady
## Ready for binary (ymodem) download to 0x8E000000 at 115200 bps... CCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 4 retries
## Total Size = 0x0001132c = 70444 Bytes
=> bootm 0x8e000000
* kernel: cmdline image address = 0x8e000000
## Booting kernel from Legacy Image at 8e000000 ...

  Image Name:   Hello Image
  Image Type:   SuperH U-Boot Standalone Program (uncompressed)
  Data Size:    70380 Bytes = 68.7 kB

Load Address: 8c000000
Entry Point: 8c000000
Verifying Checksum ... OK
Wrong Image Type for bootm command
ERROR: can't get kernel image!
...
Could you give me an advice?
I think i have wrong image format? But how can I get correct format ?

Best regards.
--
View this message in context:
http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19851315.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 17 lines
Mathieu Dube
Software Engineer
MobileFusion, Inc
2715 Sarah St
Pittsburgh PA, 15203
Main: 412.481.1111 Ext:140
Fax: 412.481.0220
Email: mathieu at mobilefusioninc.com
URL: www.mobilefusioninc.com
****************************************************************************
This communication (including any attachments) is for the use of the
intended recipient(s) only and may contain information that is confidential,
privileged or otherwise legally protected. Any unauthorized use or
dissemination of this communication is prohibited. If you have received this
communication in error, please immediately notify the sender by return
e-mail message and delete all copies of the original communication. Thank
you for your cooperation.
#3 lore raw

Dear Mathieu,

Quoted 2 lines · In message <[email protected]> you…

I've also tried to go 0x80000004 with the same result.

Tried? You mean you do not know the exact entry point address?

Did you read the FAQ???

Best regards,

Wolfgang Denk

Signature · 5 lines
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 at denx.de
The only way to learn a new programming language is by  writing  pro-
grams in it.                                        - Brian Kernighan

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Dear "Mathieu Dube",

please keep the ML on Cc: !

Quoted 5 lines · In message <[email protected]> you…
Quoted 3 lines

Did you read the FAQ???
this entry?:

http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork

Yes, this entry.

Quoted 7 lines

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.

Quoted 1 line

is there another way to find the exact entry point?

"nm" is a good way.

Best regards,

Wolfgang Denk

Signature · 5 lines
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 at denx.de
Q:  Do you know what the death rate around here is?
A:  One per person.
#6 lore raw
Quoted 4 lines · Wolfgang Denk

Dear "Mathieu Dube",

please keep the ML on Cc: !

sorry about that.

Quoted 4 lines
Quoted 4 lines

if I nm(with the correct toolchain) the executable

Quoted 9 lines
Quoted 5 lines

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.

Quoted 4 lines
Quoted 1 line

is there another way to find the exact entry point?

"nm" is a good way.

thanks. I used that.

-M

Signature · 17 lines
Mathieu Dube
Software Engineer
MobileFusion, Inc
2715 Sarah St
Pittsburgh PA, 15203
Main: 412.481.1111 Ext:140
Fax: 412.481.0220
Email: mathieu at mobilefusioninc.com
URL: www.mobilefusioninc.com
****************************************************************************
This communication (including any attachments) is for the use of the
intended recipient(s) only and may contain information that is confidential,
privileged or otherwise legally protected. Any unauthorized use or
dissemination of this communication is prohibited. If you have received this
communication in error, please immediately notify the sender by return
e-mail message and delete all copies of the original communication. Thank
you for your cooperation.
#7 lore raw

Dear Mathieu,

Quoted 8 lines · In message <[email protected]> you…

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.

Quoted 2 lines

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

Signature · 4 lines
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 at denx.de
Human beings were created by water to transport it uphill.
author
#8 lore raw
In reply to thaoth

Hi All,

Following guide at http://www.denx.de/wiki/DULG/UBootStandalone

1. Load hello_world.srec into SDRAM

=> loads
## Ready for S-Record download ...

## First Load Addr = 0x8E000000
## Last Load Addr = 0x8E000157
## Total Size = 0x00000158 = 344 Bytes
## Start Addr = 0x8E000000

2. And Run

=> go 8e000000
## Starting application at 0x8E000000 ...

U-Boot 1.3.4-00404-gab00e7a-dirty (Oct 8 2008 - 11:47:35)
....

3. hello_world crash and UBoot reset.

4. Here is information of hello_world

#nm examples/hello_world
8e010158 A __bss_start
8e010158 A __data_start
8e010158 A _edata
8e010158 A _end
8e000126 T app_startup
8e0000d8 T do_reset
8e000038 T dummy
8e0000a8 T free
8e000090 T free_hdlr
8e0000c0 T get_timer
8e00003c T get_version
8e000048 T getc
8e0000e4 T getenv
8e000000 T hello_world
8e000084 T install_hdlr
8e00009c T malloc
8e000078 T printf
8e000060 T putc
8e00006c T puts
8e0000f0 T setenv
8e000108 T simple_strtol
8e0000fc T simple_strtoul
8e000114 T strcmp
8e000054 T tstc
8e0000b4 T udelay
8e0000cc T vprintf

5. Physical start address of SDRAM is 8c000000 and

#define CONFIG_LOADADDR 0x8e000000

6. I didn't have JTAG interface so I couldn't debug it.

Could I have a help? Anyone had same issue please tell me your idea? Thank you alot.

This same the porting of UBoot on TEngine/SH7727 has the issue. But we don't know what trouble shooting steps.

Regards,

Signature · 2 lines
View this message in context: http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19873020.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
#9 lore raw

Hello,

Quoted 2 lines

Could I have a help? Anyone had same issue please tell me your idea? Thank you alot.

Make sure that the LOAD_ADDR in examples/Makefile matches the address in RAM where you want to load the executable.
These examples fail on many more boards fail in a similar manner. I think the current implementation in this Makefile needs to be setup differently to make it work properly.

Remy

Quoted 13 lines

This same the porting of UBoot on TEngine/SH7727 has the issue. But we don't know what trouble shooting steps.

Regards,
--
View this message in context: http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19873020.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#10 lore raw
Quoted 13 lines · Remy Bohmer

Hello,

Quoted 1 line

Could I have a help? Anyone had same issue please tell me your idea?

Thank

Quoted 1 line

you alot.

Make sure that the LOAD_ADDR in examples/Makefile matches the address in RAM where you want to load the executable.
These examples fail on many more boards fail in a similar manner. I think the current implementation in this Makefile needs to be setup differently to make it work properly.

this worked!

thank you very much.

maybe another faq entry could be made for that.

-M

Signature · 17 lines
Mathieu Dube
Software Engineer
MobileFusion, Inc
2715 Sarah St
Pittsburgh PA, 15203
Main: 412.481.1111 Ext:140
Fax: 412.481.0220
Email: mathieu at mobilefusioninc.com
URL: www.mobilefusioninc.com
****************************************************************************
This communication (including any attachments) is for the use of the
intended recipient(s) only and may contain information that is confidential,
privileged or otherwise legally protected. Any unauthorized use or
dissemination of this communication is prohibited. If you have received this
communication in error, please immediately notify the sender by return
e-mail message and delete all copies of the original communication. Thank
you for your cooperation.
#11 lore raw
In reply to thaoth

Hi, all.

2008/10/8 thaoth <[email protected]>:

Quoted 8 lines

6. I didn't have JTAG interface so I couldn't debug it.

Could I have a help? Anyone had same issue please tell me your idea? Thank you alot.

This same the porting of UBoot on TEngine/SH7727 has the issue. But we don't know what trouble shooting steps.

This problem is SuperH specific.
I fixed it and send patch.

Thaoth , Please apply patch to your source code, and do test.

Best regards,
Nobuhiro

Signature · 1 line
Nobuhiro Iwamatsu
author
#12 lore raw

Hi Nobuhiro,
I have tested your patch and it works well.

Thank you for great work.

Signature · 2 lines
View this message in context: http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19894599.html
Sent from the Uboot - Users mailing list archive at Nabble.com.