From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32743 invoked by alias); 15 Aug 2005 11:55:42 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 32711 invoked by uid 22791); 15 Aug 2005 11:55:35 -0000 Received: from lmfilto01.st1.spray.net (HELO lmfilto01.st1.spray.net) (212.78.202.65) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 15 Aug 2005 11:55:35 +0000 Received: from localhost (localhost [127.0.0.1]) by lmfilto01.st1.spray.net (Postfix) with ESMTP id D83DB18BC54; Mon, 15 Aug 2005 11:55:32 +0000 (GMT) Received: from lmsmtp02.st1.spray.net ([212.78.202.112]) by localhost (lmfilto01.st1.spray.net [212.78.202.32]) (amavisd-new, port 10024) with ESMTP id 23356-03; Mon, 15 Aug 2005 11:55:32 +0000 (GMT) Received: from localhost (p549B059C.dip0.t-ipconnect.de [84.155.5.156]) by lmsmtp02.st1.spray.net (Postfix) with ESMTP id 6A2A9320; Mon, 15 Aug 2005 11:55:32 +0000 (GMT) Message-ID: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 In-Reply-To: <000c01c5a144$d725e480$6905a8c0@mychat037aeabb> Date: Mon, 15 Aug 2005 11:55:00 -0000 From: Wolfgang=?iso-8859-1?Q?_K=F6bler?= To: Jiun-Shian Ho Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] ecos porting for Atmel AT91RM9200-DK X-SW-Source: 2005-08/txt/msg00144.txt.bz2 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=20 > 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 ne= ed 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_Bootin= g) 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".=20 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=20 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 ti= ny 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.=20 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.=20 Again, in case you use this Atmel Bootloader to program redboot into the spi dataflash, you're lucky:=20 The Atmel Bootloader automatically modifies the 6th vector of redboot before it stores it into dataflash. This means you do not need to worry abo= ut 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