Skip to contentSkip to conversation

U-Boot 1.2 - Cannot run hello_world - Coldfire

U-Boot-Users Wolfgang Denk 2 participants 4 messages Jun 13, 2007 2 messages not in the archive

lore
Share & tools
lore

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

#1 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:

I have a target board with a Coldfire CPU. I am unable to run the example program
hello_world which comes with the distribution. Transcript of session is below. What
am I missing? The cross compile tools were run on Linux (FC 7),

You missed to read the documentatiomn, especially the FAQ:
http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork

Best regards,

Wolfgang Denk

Signature · 16 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 reasonable man adapts himself to the world; the unreasonable  one
persists  in  trying  to  adapt  the  world to himself. Therefore all
progress depends on the unreasonable man."      - George Bernard Shaw



From "abiyani at unix dot telasic dot com" at unix.telasic.com  Wed Jun 13 23:47:54 2007
From: "abiyani at unix dot telasic dot com" at unix.telasic.com (Arun Biyani)
Date: Wed, 13 Jun 2007 14:47:54 -0700
Subject: [U-Boot-Users] U-Boot 1.2 - Cannot run hello_world - Coldfire
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>
Quoted 9 lines · Wolfgang Denk
Quoted 6 lines · In message <[email protected]> you wrote:

I have a target board with a Coldfire CPU. I am unable to run the example program
hello_world which comes with the distribution. Transcript of session is below. What
am I missing? The cross compile tools were run on Linux (FC 7),

Quoted 8 lines

You missed to read the documentatiomn, especially the FAQ:
http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork

Best regards,

Wolfgang Denk

On my Linux host,
[examples$:1010] m68k-elf-nm hello_world
00020208 T app_startup
000222f8 A __bss_start
000201b4 T do_reset
000200ac T dummy
000222f8 A _edata
000222f8 A _end
00020164 T free
0002013c T free_hdlr
000200c4 T getc
000201c8 T getenv
0002018c T get_timer
000200b0 T get_version
000222b0 D _GLOBAL_OFFSET_TABLE_
00020000 T
hello_world
<---------------
00020128 T install_hdlr
00020150 T malloc
00020114 T printf
000200ec T putc
000200ec T putc
00020100 T puts
000201dc T setenv
000201f0 T simple_strtoul
000200d8 T tstc
00020178 T udelay
000201a0 T vprintf
[examples$:1011]

-----------------------------------------------------------------------------------------------------------------------------------
On my target Coldfire based board,

U-Boot 1.2.0 (Jun 13 2007 - 07:36:11)

CPU:   Freescale MCF5272 (Mask:1)
Board: Telasic RLB 2.0
DRAM:  16 MB
FLASH: 32 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

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

## First Load Addr = 0x00020000
## Last Load Addr = 0x000222F7
## Total Size = 0x000022F8 = 8952 Bytes
## Start Addr = 0x00020000
-> go 0x00020000
## Starting application at 0x00020000 ...

*** Unexpected exception ***
Vector Number: 4 Format: 04 Fault Status: 0

PC: 00ff94fc SR: 00002000 SP: 00f6daf8
D0: 00000000 D1: 0000048c D2: 00f6ded8 D3: 00000001
D4: 000000f3 D5: 00000000 D6: 00000000 D7: 00f7df90
A0: 00fed912 A1: 00ff94fc A2: 00020000 A3: 00f6ded8
A4: 00000002 A5: 00ff7300 A6: 00f6db54

*** Please Reset Board! ***

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

#3 lore raw
Quoted 3 lines · Arun Biyani

On my Linux host,
[examples$:1010] m68k-elf-nm hello_world
00020208 T app_startup

Perhaps 20208 (app_startup) might be worth trying as an entry point...

Quoted 1 line

-> go 0x00020000

As in:

-> go 20208

Maybe app_startup is a wrapper for main. Just a guess.

Often times systems have entry points like _start, etc which set things up and then jump to main.

-Lee

From "abiyani at unix dot telasic dot com" at unix.telasic.com Thu Jun 14 00:25:07 2007
From: "abiyani at unix dot telasic dot com" at unix.telasic.com (Arun Biyani)
Date: Wed, 13 Jun 2007 15:25:07 -0700
Subject: [U-Boot-Users] U-Boot 1.2 - Cannot run hello_world - Coldfire
In-Reply-To: <1181772566.29103.151.camel@al08linux99>
References: <[email protected]>

	<[email protected]>
	<1181772566.29103.151.camel@al08linux99>

Message-ID: <[email protected]>

Quoted 16 lines · Lee Nipper
Quoted 4 lines · Arun Biyani

On my Linux host,
[examples$:1010] m68k-elf-nm hello_world
00020208 T app_startup

Perhaps 20208 (app_startup) might be worth trying as an entry point...

Quoted 2 lines

-> go 0x00020000

As in:

Quoted 12 lines

-> go 20208

Maybe app_startup is a wrapper for main. Just a guess.

Often times systems have entry points like _start, etc which set things up and then jump to main.

-Lee

Thx, Lee. Still didn't work. Transcript below. At least a graceful exit.

How do I ensure there is enough stack space to run applications?

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

## First Load Addr = 0x00020000
## Last Load Addr = 0x000222F7
## Total Size = 0x000022F8 = 8952 Bytes
## Start Addr = 0x00020000
-> go 20208
## Starting application at 0x00020208 ...
## Application terminated, rc = 0xFF8454
-> go 20208 Hello there try this
## Starting application at 0x00020208 ...
## Application terminated, rc = 0xFF8454
->

#4 lore raw
Quoted 2 lines · In message <1181772566.29103.151.camel@al08linux99> you wrote:

Perhaps 20208 (app_startup) might be worth trying as an entry point...

No, definitely not.

Quoted 1 line

Maybe app_startup is a wrapper for main. Just a guess.

Don't guess. Read documentation and source code instead.

Quoted 2 lines

Often times systems have entry points like _start, etc which set things up and then jump to main.

Please have at least a tiny glance at the code before coming up with bogus comments.

Best regards,

Wolfgang Denk

Signature · 6 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
After a time, you may find that "having" is not so pleasing a thing,
after all, as "wanting."  It is not logical, but it is often true.
	-- Spock, "Amok Time", stardate 3372.7
#5 lore raw
In reply to a message not in the archive
Quoted 3 lines · In message <[email protected]> you wrote:

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

Which exact file did you download here?

Can you please dump the first 100 bytes or so of this file under Linux (for example using xxd), and then...

Quoted 4 lines

## First Load Addr = 0x00020000
## Last Load Addr = 0x000222F7
## Total Size = 0x000022F8 = 8952 Bytes
## Start Addr = 0x00020000

...type "md 20000" here before trying to start the image?

Quoted 2 lines

-> go 0x00020000
## Starting application at 0x00020000 ...

Eventually you did not download the binary image?

Best regards,

Wolfgang Denk

Signature · 16 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
[Doctors and Bartenders], We both get the same two kinds of customers
-- the living and the dying.
	-- Dr. Boyce, "The Menagerie" ("The Cage"), stardate unknown



From "abiyani at unix dot telasic dot com" at unix.telasic.com  Thu Jun 14 03:29:52 2007
From: "abiyani at unix dot telasic dot com" at unix.telasic.com (Arun Biyani)
Date: Wed, 13 Jun 2007 18:29:52 -0700
Subject: [U-Boot-Users] U-Boot 1.2 - Cannot run hello_world - Coldfire
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>
Quoted 11 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:

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

Which exact file did you download here?

Can you please dump the first 100 bytes or so of this file under Linux (for example using xxd), and then...

Output of "xxd < hello_world.srec":
*0000000: 5330 3133 3030 3030 3638 3635 3643 3643 S013000068656C6C

0000010: 3646 3546 3737 3646 3732 3643 3634 3245  6F5F776F726C642E
0000020: 3733 3732 3635 3633 3736 0d0a 5332 3134  7372656376..S214
0000030: 3032 3030 3030 3445 3536 4646 4630 3438  0200004E56FFF048
0000040: 4437 3234 3043 3236 3245 3030 3038 3234  D7240C262E000824
0000050: 3245 3030 3043 3444 0d0a 5332 3134 3032  2E000C4D..S21402
0000060: 3030 3130 3246 3032 3232 3644 3030 3343  00102F02226D003C
0000070: 3445 3931 3438 3738 3030 3033 3246 3244  4E91487800032F2D
0000080: 3030 3043 4433 0d0a 5332 3134 3032 3030  000CD3..S2140200
0000090: 3230 3232 3644 3030 3243 3445 3931 3232  20226D002C4E9122
00000a0: 3644 3030 3434 3445 3931 3246 3030 3246  6D00444E912F002F
00000b0: 3244 4632 0d0a 5332 3134 3032 3030 3330  2DF2..S214020030
00000c0: 3030 3130 3232 3644 3030 3243 3445 3931  0010226D002C4E91
00000d0: 3246 3244 3030 3134 3232 3644 3030 3243  2F2D0014226D002C
00000e0: 4534 0d0a 5332 3134 3032 3030 3430 3445  E4..S2140200404E
00000f0: 3931 3246 3033 3246 3244 3030 3138 3232  912F032F2D001822
0000100: 3644 3030 3243 3445 3931 3234 3432 3234  6D002C4E91244224
0000110: 0d0a 5332 3134 3032 3030 3530 3432 3832  ..S2140200504282
0000120: 3446 4546 3030 3230 3630 3145 3230 3132  4FEF0020601E2012
0000130: 3636 3034 3230 3244 3030 3143 4634 0d0a  6604202D001CF4..
0000140: 5332 3134 3032 3030 3630 3246 3030 3246  S2140200602F002F
0000150: 3032 3246 3244 3030 3230 3232 3644 3030  022F2D0020226D00
0000160: 3243 3445 3931 3532 3832 3346 0d0a 5332  2C4E9152823F..S2
0000170: 3134 3032 3030 3730 3538 3841 3446 4546  14020070588A4FEF
0000180: 3030 3043 4236 3832 3643 4445 3246 3244  000CB6826CDE2F2D

*

Quoted 10 lines
Quoted 6 lines

## First Load Addr = 0x00020000
## Last Load Addr = 0x000222F7
## Total Size = 0x000022F8 = 8952 Bytes
## Start Addr = 0x00020000

...type "md 20000" here before trying to start the image?

See Below for transcript. Board hangs after go command.

Quoted 7 lines
Quoted 4 lines

-> go 0x00020000
## Starting application at 0x00020000 ...

Eventually you did not download the binary image?

I have not tried binary yet.

Quoted 5 lines

Best regards,

Wolfgang Denk

U-Boot 1.1.6 (Jun 5 2007 - 07:23:45)

CPU:   Freescale MCF5272 (Mask:1)
Board: Telasic RLB 2.0 (Arun Biyani)
DRAM:  16 MB
Reserving 135k for U-Boot at: 00fde000
Reserving 256k for malloc() at: 00f9e000

Reserving 64 Bytes for Board Info at: 00f9dfc0 Reserving 48 Bytes for Global Data at: 00f9df90 Reserving 64k for boot parameters at: 00f8df90 Stack Pointer at: 00f8df78
Start relocate of code from fe000400 to 00fde000 Now running in RAM - U-Boot at: 00fde000
FLASH: flash_protect ON: from 0xFE000000 to 0xFE03FFFF protect on 0
protect on 1
32 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial

U-Boot relocated to 00fde000
### main_loop entered: bootdelay=5

### main_loop: bootcmd="<UNDEFINED>"
-> loads
## Ready for S-Record download ...

## First Load Addr = 0x00020000
## Last Load Addr = 0x000222F7
## Total Size = 0x000022F8 = 8952 Bytes
## Start Addr = 0x00020000
-> md 20000

00020000: 4e56fff0 48d7240c 262e0008 242e000c    NV..H.$.&...$...
00020010: 2f02226d 003c4e91 48780003 2f2d000c    /."m.<N.Hx../-..
00020020: 226d002c 4e91226d 00444e91 2f002f2d    "m.,N."m.DN././-
00020030: 0010226d 002c4e91 2f2d0014 226d002c    .."m.,N./-.."m.,
00020040: 4e912f03 2f2d0018 226d002c 4e912442    N././-.."m.,N.$B
00020050: 42824fef 0020601e 20126604 202d001c    B.O.. `. .f. -..
00020060: 2f002f02 2f2d0020 226d002c 4e915282    /././-. "m.,N.R.
00020070: 588a4fef 000cb682 6cde2f2d 0024226d    X.O.....l./-.$"m
00020080: 002c4e91 588f226d 00344e91 4a8067f6    .,N.X."m.4N.J.g.
00020090: 226d0030 4e912f2d 0028226d 002c4e91    "m.0N./-.("m.,N.
000200a0: 42804cee 240cfff0 4e5e4e75 4e560000    B.L.$...N^NuNV..

000200b0: 2047d1fc 0000002c 2050d1fc 00000000 G....., P......
000200c0: 20504ed0 2047d1fc 0000002c 2050d1fc PN. G....., P..
000200d0: 00000004 20504ed0 2047d1fc 0000002c .... PN. G.....,
000200e0: 2050d1fc 00000008 20504ed0 2047d1fc P...... PN. G..
000200f0: 0000002c 2050d1fc 0000000c 20504ed0 ..., P...... PN.
-> go 20000 Hello There
## Starting application at 0x00020000 ...