Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

unhosted baremetal boot

Hello,

I'm tring to boot a baremetal application from uboot. I linked my application with a script like the one in examples (altera-socfpga-hosted.ld) whith following modifications:

line 23: GROUP(-lgcc -lc -lcs3 -lcs3hosted -lcs3arm)

to GROUP(-lgcc -lc -lcs3 -lcs3unhosted -lcs3arm)

and

line 28: ram (rwx) : ORIGIN = 0x02000000, LENGTH = 32M

ram (rwx) : ORIGIN = 0x01000000, LENGTH = 32M

running the application from debugger all works fine.

When I try to run the application from u-boot with the following commands:

fatload mmc 0:2 0x01000000 myApp.bin

go 0x01000000

or

go 0x01000040

the command fail with this error:

# # Starting application at 0x01000000 ...

data abort

MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<3ff8223c>] lr : [<01000198>]

sp : 3ff4f63c ip : 00000083 fp : 00000000

r10: 00000002 r9 : 00000000 r8 : 3ff4ff60

r7 : 3ffbb8c4 r6 : 01000000 r5 : 3ff505fc r4 : 00000002

r3 : 01000000 r2 : 3ff505fc r1 : 010001d0 r0 : 60000153

Flags: nZCv IRQs off FIQs off Mode SVC_32

Resetting CPU ...

running a readelf in a linux shell the result is:

readelf -h myApp.elf

ELF Header:

Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Class: ELF32

Data: 2's complement, little endian

Version: 1 (current)

OS/ABI: UNIX - System V

ABI Version: 0

Type: EXEC (Executable file)

Machine: ARM

Version: 0x1

Entry point address: 0x1000040

Start of program headers: 52 (bytes into file)

Start of section headers: 399332 (bytes into file)

Flags: 0x5000002, has entry point, Version5 EABI

Size of this header: 52 (bytes)

Size of program headers: 32 (bytes)

Number of program headers: 2

Size of section headers: 40 (bytes)

Number of section headers: 20

Section header string table index: 17

What is wrong?

Thank you

Nicola
No RepliesBe the first to reply