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  [ 4 posts ] 
Author Message
 Post subject: Accessing sam-ba boot from at91bootstrap
PostPosted: Sat May 21, 2011 9:56 am 
Offline

Joined: Sat May 21, 2011 9:46 am
Posts: 2
Hi, I am trying to devise a bare metal boot recovery system for our product which uses a AT91SAM9G45.
What I would like to do is, from the at91bootstrap code, check if a user button is been pressed (for a certain time) and if so execute the sam-ba boot code rather than boot u-boot. The user would then be able to use the sam-ba system to update firmware on the board via the USB connector provided.

Is there a way to execute the sam-ba boot code in the AT91SAM9G45 ROM bypassing the normal NAND etc checks from at91bootstrap ?
Or is the source code for sam-ba boot available so that I can integrate it into the at91bootstrap code ?


Top
 Profile  
 
 Post subject: Re: Accessing sam-ba boot from at91bootstrap
PostPosted: Sun May 22, 2011 3:20 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
>>Is there a way to execute the sam-ba boot code in the AT91SAM9G45 ROM bypassing the normal NAND etc checks from at91bootstrap ?

Yes, but you probably don't want to call it after changing the clocks, and SDRAM-DDR.


Top
 Profile  
 
 Post subject: Re: Accessing sam-ba boot from at91bootstrap
PostPosted: Mon May 23, 2011 10:24 pm 
Offline

Joined: Sat May 21, 2011 9:46 am
Posts: 2
Thanks for the reply.
Ok, I can do the check before changing clocks/setting up DDR or reset them before I do. But how do
I call the code ? Is there a jump table so that I can access the sam-ba boot monitor by-passing the normal NAND check code or do I need to call an absolute address ?
Can I call the code within the 0x30000 address space (Is it position independent) ? or do I need to
copy it to 0x00000 (or reset the memory mapping to put the ROM back at 0x00) ?

I assume the source code is not available to put into the at91bootstrap ?


Top
 Profile  
 
 Post subject: Re: Accessing sam-ba boot from at91bootstrap
PostPosted: Tue May 24, 2011 4:59 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
The problem re-implementing the SAM-BA protocol in SRAM, is that the PC side application wants to push applets into SRAM. The protocol itself is not too hideous, the USB side might be fun.

All observed SAM9xxx parts enter the loader via the SWI vector. This points to the code *after* the boot device traversal, and the return address LR is set to when the SAM-BA Go command executes. In order for the IRQ/FIQ, and vectors, to be placed at 0 the ROM clearly needs remapping their, to provide as to close to the normal boot environment as possible.

Pull a copy of the 9G45 ROM situated at 0x400000, and send me a copy.

If you wish to consult on this, my email is CptTitanic at gmail.com


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 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: