XScale
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
XScale

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
JulioD



Joined: 23 Dec 2005
Posts: 1
Location: Spain

Posted: Fri Dec 23, 2005 10:43 am    Post subject: XScale Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB