This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ecos porting for Atmel AT91RM9200-DK


Hi,

On 15-Aug-2005 Jiun-Shian Ho wrote:
> I will not use serial flash in my design, but only parallel flash.
> The datasheed said it will check the 6th vector (0x14) as length of 
> bootloader, and copy it to sram then run it ?!
> However, the 6th vector is zero, and do you know how to let it work ?
I am not sure I understand.

If you use 16bit parallel flash then you do not need the "Boot Program"
described in AT91RM9200 Manual Chapter 7 (page 87). Then you also do not need
the atmel bootloader (called "RomBoot project for AT91RM9200DK").
Just use the BMS Pin to directly boot from the 16bit parallel flash.

(see also http://www.open-research.org.uk/ARMuC/index.cgi?At91rm9200_Booting)

If you do not use 16bit parallel flash, then you need the "Boot Program"
described in AT91RM9200 Manual Chapter 7 (page 87). Let's call it "stage 1
bootloader". 

This bootloader loads a tiny (up to 12KByte) program into sram and executes
it. The stage 1 bootloader uses the info in the 6th vector of the tiny
program to get info about how to load this tiny program into sram (Manual
Section 7.3.2).

The tiny program usually is a stage 2 bootloader, for example the 
Atmel Bootloader (called "RomBoot project for AT91RM9200DK").
When this tiny program is stored into spi dataflash, twi eeprom or 8bit
parallel flash, it needs to have a special 6th vector (as noted above).

In case you use the Atmel Bootloader to program an spi dataflash, you're
lucky: The Atmel Bootloader automatically modifies the 6th vector of the tiny
program before it stores it into dataflash. This means you do not need to
worry about that. If you use other software, you need to modify the 6th
vector yourself.

BTW: The 6th vector is never used by ARM9. See
http://www.at91.com/pdf/ARMDocuments/DDI0100E_ARM_ARM.pdf Chapter 2.6 (page
A2-13 aka 45)


But the story continues.

The stage 2 bootloader can be used to load redboot, for example. redboot is
usually stored in the same spi dataflash as the tiny program. It is loaded
into SDRAM by the stage 2 bootloader.
If you use "RomBoot project for AT91RM9200DK v1.02" as stage 2 bootloader
there is another 6th vector. 
The "6th vector" of redboot is used by the stage 2 bootloader in a similar way
as the stage 1 bootloader uses the 6th vector of the tiny program:
The stage 2 bootloader uses the 6th vector of redboot to get the size of
redboot. 

Again, in case you use this Atmel Bootloader to program redboot into the spi
dataflash, you're lucky: 
The Atmel Bootloader automatically modifies the 6th vector of redboot
before it stores it into dataflash. This means you do not need to worry about
that. If you use other software to program dataflash, but the "RomBoot
project for AT91RM9200DK v1.02" as bootloader, you need to modify the 6th
vector yourself.

Further hints:
- The data format of the 6th vector of the tiny program is not the same as
the 6th vector of redboot. See "RomBoot project for AT91RM9200DK v1.02"
sources/main.c line 520 for details.
- RomBoot project for AT91RM9200DK v1.01 does not use the 6th vector of
redboot, but uses a fixed size (defined in its source).


> Because I think it's too burdensome to use 2 boot-loader.
Of course it would be nice to integrate the required part of the atmel
bootloader into eCos HAL. It would be the startup code of the ROMRAM
configuration.


Bye,
Wolfgang


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]