JulioD
Joined: 23 Dec 2005
Posts: 1
Location: Spain
|
Posted:
Fri Dec 23, 2005 10:43 am Post subject:
XScale |
|
|
Hi all,
I'm developing a simple boot for my PCB based in PX255 Xscale. The PCB has Flash memory at 0x00000000 and the SDRAM at 0x0a000000. I just wanna try to develop a symple boot to configure some registry and jump to main (in C). This is my boot code:
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include ".\includes\pxa255.h"
.extern main
.text
.global _start
_start:
ldr r1, =0x41300000 /*Cloks*/
ldr r0, =0x00000141 /*MEMECLK=100MHz,CPUCLK=200MHz*/
str r0, [r1]
ldr r1, =0x41300008
ldr r0, =0x00000003 /*MSC0 ISP1 FLASH (burst 4,16 bits)*/
str r0, [r1]
ldr r1, =0x48000008
ldr r0, =0x7FF023FA
str r0, [r1]
mov r0, #0
mov r1, #0
mov r2, #0
mov r3, #0
mov r4, #0
mov fp, #0
mov sp, #0xA4000000 /* Hard coded stack address*/
bl main /*The main is in the address 0x0a001000*/
.global _endless
_endless:
bkpt #0
b _endless /* if main() returns: loop endlessly*/
I have this error:
"/Debug/start.o(.text+0x1fc): relocation truncated to fit: R_ARM_PC24 main". The message means that the destination of
a BL instruction is too far away. This means that the BL instruction is in the .FLASHROM section located
at 0x00000000 and the main function is in the .text2 section,
located at 0x0A001000. The distance between these two sections is 0x0A001000. The BL instruction only has a
24-bit (signed) offset field so 0x0a001000 is too big to fit into this
field.
what's the solution ?
Regards
JulioD |
|