* [U-Boot] Run hello world with Uboot !
@ 2008-10-07 5:30 thaoth
2008-10-07 12:41 ` Andrejs Cainikovs
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: thaoth @ 2008-10-07 5:30 UTC (permalink / raw)
To: u-boot
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-07 5:30 [U-Boot] Run hello world with Uboot ! thaoth
@ 2008-10-07 12:41 ` Andrejs Cainikovs
2008-10-07 14:27 ` Mathieu Dube
2008-10-08 6:25 ` thaoth
2 siblings, 0 replies; 12+ messages in thread
From: Andrejs Cainikovs @ 2008-10-07 12:41 UTC (permalink / raw)
To: u-boot
http://www.denx.de/wiki/DULG/UBootStandalone
Kind regards,
Andrejs Cainikovs
thaoth wrote:
> 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.
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-07 5:30 [U-Boot] Run hello world with Uboot ! thaoth
2008-10-07 12:41 ` Andrejs Cainikovs
@ 2008-10-07 14:27 ` Mathieu Dube
2008-10-07 15:57 ` Wolfgang Denk
2008-10-08 6:25 ` thaoth
2 siblings, 1 reply; 12+ messages in thread
From: Mathieu Dube @ 2008-10-07 14:27 UTC (permalink / raw)
To: u-boot
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
On Tue, Oct 7, 2008 at 1:30 AM, thaoth <thaoth@cybersoft-vn.com> wrote:
>
> 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
>
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-07 14:27 ` Mathieu Dube
@ 2008-10-07 15:57 ` Wolfgang Denk
[not found] ` <c5ee099c0810070917s7bd8d0dey9908f41419c3c03d@mail.gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2008-10-07 15:57 UTC (permalink / raw)
To: u-boot
Dear Mathieu,
In message <c5ee099c0810070727t54f213e6v6c18844f9654cf7a@mail.gmail.com> you wrote:
>
> 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
--
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
[not found] ` <c5ee099c0810070917s7bd8d0dey9908f41419c3c03d@mail.gmail.com>
@ 2008-10-07 21:05 ` Wolfgang Denk
2008-10-08 13:32 ` Mathieu Dube
0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2008-10-07 21:05 UTC (permalink / raw)
To: u-boot
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
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-07 5:30 [U-Boot] Run hello world with Uboot ! thaoth
2008-10-07 12:41 ` Andrejs Cainikovs
2008-10-07 14:27 ` Mathieu Dube
@ 2008-10-08 6:25 ` thaoth
2008-10-08 7:32 ` Remy Bohmer
2008-10-09 5:15 ` Nobuhiro Iwamatsu
2 siblings, 2 replies; 12+ messages in thread
From: thaoth @ 2008-10-08 6:25 UTC (permalink / raw)
To: u-boot
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,
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-08 6:25 ` thaoth
@ 2008-10-08 7:32 ` Remy Bohmer
2008-10-08 13:41 ` Mathieu Dube
2008-10-09 5:15 ` Nobuhiro Iwamatsu
1 sibling, 1 reply; 12+ messages in thread
From: Remy Bohmer @ 2008-10-08 7:32 UTC (permalink / raw)
To: u-boot
Hello,
> 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
> 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
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-07 21:05 ` Wolfgang Denk
@ 2008-10-08 13:32 ` Mathieu Dube
2008-10-08 14:39 ` Wolfgang Denk
0 siblings, 1 reply; 12+ messages in thread
From: Mathieu Dube @ 2008-10-08 13:32 UTC (permalink / raw)
To: u-boot
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
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-08 7:32 ` Remy Bohmer
@ 2008-10-08 13:41 ` Mathieu Dube
0 siblings, 0 replies; 12+ messages in thread
From: Mathieu Dube @ 2008-10-08 13:41 UTC (permalink / raw)
To: u-boot
On Wed, Oct 8, 2008 at 3:32 AM, Remy Bohmer <linux@bohmer.net> wrote:
> Hello,
>
> > 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.
>
>
this worked!
thank you very much.
maybe another faq entry could be made for that.
-M
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-08 13:32 ` Mathieu Dube
@ 2008-10-08 14:39 ` Wolfgang Denk
0 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Denk @ 2008-10-08 14:39 UTC (permalink / raw)
To: u-boot
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
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-08 6:25 ` thaoth
2008-10-08 7:32 ` Remy Bohmer
@ 2008-10-09 5:15 ` Nobuhiro Iwamatsu
2008-10-09 8:30 ` thaoth
1 sibling, 1 reply; 12+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-10-09 5:15 UTC (permalink / raw)
To: u-boot
Hi, all.
2008/10/8 thaoth <thaoth@cybersoft-vn.com>:
>
> 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
--
Nobuhiro Iwamatsu
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] Run hello world with Uboot !
2008-10-09 5:15 ` Nobuhiro Iwamatsu
@ 2008-10-09 8:30 ` thaoth
0 siblings, 0 replies; 12+ messages in thread
From: thaoth @ 2008-10-09 8:30 UTC (permalink / raw)
To: u-boot
Hi Nobuhiro,
I have tested your patch and it works well.
Thank you for great work.
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-10-09 8:30 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 5:30 [U-Boot] Run hello world with Uboot ! thaoth
2008-10-07 12:41 ` Andrejs Cainikovs
2008-10-07 14:27 ` Mathieu Dube
2008-10-07 15:57 ` Wolfgang Denk
[not found] ` <c5ee099c0810070917s7bd8d0dey9908f41419c3c03d@mail.gmail.com>
2008-10-07 21:05 ` Wolfgang Denk
2008-10-08 13:32 ` Mathieu Dube
2008-10-08 14:39 ` Wolfgang Denk
2008-10-08 6:25 ` thaoth
2008-10-08 7:32 ` Remy Bohmer
2008-10-08 13:41 ` Mathieu Dube
2008-10-09 5:15 ` Nobuhiro Iwamatsu
2008-10-09 8:30 ` thaoth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox