Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Jump to 0x110000 in Startup.S doesn't work for at91sam7xek
PostPosted: Thu Nov 12, 2009 10:35 am 
Offline

Joined: Wed Sep 30, 2009 4:45 am
Posts: 1
Hi,

I am usng the AT91SAM7xek board.(I am having the 256 Flash Device)
I have configured the One of the Basic Helloworld test code from Atmel, and configured it as a bootloader.

I have two exe files one is Bootloader and another one is my test App.

Bootloader is flashed at 0x100000 and My test_app is at 0x110000

_jmpAddr = 0x110000

On startup of the boot loader when i give the instruction
This is the code from startup.s

entry:

resetHandler:

ldr r0, =resetVector

ldr pc=_jmpAddr (Jumping to the test_app)

/* Set pc to actual code location (i.e. not in remap zone) */

ldr pc, =1f

/* Perform low-level initialization of the chip using LowLevelInit() */

1:
...........................

My test_app will start executing. Perfectly fine .....


But ..... In the same startup.S
When i give the same instruction at the end of the file i.e before infinity loop it doesn't branch to the 0x110000

/* Branch to main()

******************/

ldr r0, =main

mov lr, pc

bx r0


ldr pc=_jmpaddr (jump to the test_app)
/* Loop indefinitely when program is finished */

1:

b 1b


Please can anybody suggest me the method to jump to the location after executing the main code. As my main code will check for the any upgrade avilable for the current test_app if so it will upgrade flash. Basically i am fallowing the method exactly the guys discussed in this thread for upgrading the flash over the AIR.

Please suggest me why its able to jump if i give instruction at the starting of the startup.s and whynot its jumping if i give the same instruction at the end of the startup.s

Do i need to change the any registers or any CPU registers must be reset before jumping or any thing else should be done..

Trying past 1 Week unable to find the solution or clue why its happening like this...

Harsha S


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


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 post attachments in this forum

Search for:
Jump to: