[U-Boot-Users] Unable to run hello_world

Jim McNamara jmcnamara at kimble.ie
Fri Oct 8 18:18:32 CEST 2004


Hi all,

I'm working on an mcf5272 based board that has 32MB of Flash arranged in
uniform sectors of 64KB and 16MB of SDRAM.

I've managed to get u-boot to start from Flash and successfully relocate to
SDRAM. Below is the debug output from the console:

DRAM:  16 MB
Reserving 217k for U-Boot at: 00fc9000
Reserving 256k for malloc() at: 00f89000
Reserving 64 Bytes for Board Info at: 00f88fc0
Reserving 48 Bytes for Global Data at: 00f88f90
Reserving 64k for boot parameters at: 00f78f90
Stack Pointer at: 00f78f78
Start relocate of code from fe000400 to 00fc9000
Now running in RAM - U-Boot at: 00fc9000
FLASH: flash_protect ON: from 0xFE000000 to 0xFE03FFFF
protect on 0
protect on 1
protect on 2
protect on 3
32 MB
In:    serial
Out:   serial
Err:   serial
U-Boot relocated to 00fc9000
No PHY device found.
### main_loop entered: bootdelay=5

### main_loop: bootcmd="<UNDEFINED>"

I've configured the hello_world example program to run from SDRAM at
0x40000. Here's a dump of the elf headers:

hello_world:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000001de  00040000  00040000  00002000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       0000008a  000401de  000401de  000021de  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .data         00000000  00042268  00042268  00002268  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  3 .got          00000048  00042268  00042268  00002268  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .bss          00000000  000422b0  000422b0  000022b0  2**2
                  ALLOC
  5 .stab         00000e40  00000000  00000000  000022b0  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .stabstr      00001d3a  00000000  00000000  000030f0  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .comment      0000014c  00000000  00000000  00004e2a  2**0
                  CONTENTS, READONLY

I can load the resultant binary using the loadb command but an exception is
generated when I attempt to run the program:

-> loadb
## Ready for binary (kermit) download to 0x00040000 at 19200 bps...
## Total Size      = 0x000022b0 = 8880 Bytes
## Start Addr      = 0x00040000
-> go 40004
## Starting application at 0x00040004 ...


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

PC: 00ff97b8    SR: 00002004    SP: 00f78c20
D0: 00000004    D1: 000006d0    D2: 00ffa12c    D3: 00000000
D4: 00000000    D5: 00000000    D6: 00000001    D7: 00f88f90
A0: 00ff97b8    A1: 00fe9fc8    A2: 00040004    A3: 00000000
A4: 00f78ce0    A5: 00ff8500    A6: 00f78cac

*** Please Reset Board! ***

I had a look at what's going on with the debugger - hello_world is jumping
to an incorrect address (0xff97b8). This happens at the very start of the
program.

I've read through the README and DULG I've scoured the mailing list archive.
I still haven't been able to come up with a solution. Any ideas as to what I
could be doing wrong??

Thanks for any help you can give.

Regards,
Jim...





More information about the U-Boot mailing list