public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] ecos porting for Atmel AT91RM9200-DK
@ 2005-08-15  2:56 Jiun-Shian Ho
  2005-08-15 11:55 ` Wolfgang Köbler
  0 siblings, 1 reply; 5+ messages in thread
From: Jiun-Shian Ho @ 2005-08-15  2:56 UTC (permalink / raw)
  To: Wolfgang Kobler; +Cc: ecos-discuss

Hi,
    Good news.
(Another bad news is that my hard-disk go on strike, all data are crash)
The RomBoot from atmel is 1.02 and I compiled it with ADS 1.2
http://www.at91.com/Pages/products/EvaluationBoard/AT91RM9200EK/other/AT91RM9200-DataFlashBoot.zip

I just modify the the last sources/main.c:AT91F_StartBoot()
Skip copy/check and jump to proper location of redboot (ROM).
The PLL is configured by sources/main.c:AT91F_SetPLL()
I tried to reset it in hal_hw_init() of ecos, but do not work fine.
I need to check errata.

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 ?
Because I think it's too burdensome to use 2 boot-loader.

I do not get timeout problems.
Maybe you can check the configuration of PHY,
and disable or replace hw_delay_us()


2005/8/13, Wolfgang Kobler <wk-list@koebler.com>:
> Hi,
>
> I succeeded in compiling and running redboot on my lomx-board with an
> additional AT45DB041B Dataflash.
> I had to modify my atmel bootloader so it
> - supports my small dataflash device,
>  (quite simple, changes available at request if someone is interested)
> - loads redboot at the correct address (0x20001000),
>  (I corrected this value and suddenly it just worked)
> - and uses the correct PLL settings, but now it works.
>  (you get funny characters on the serial console if the clock settings
>  are not correct and you try to boot linux.)
>
> I used the gcc version of the atmel bootloader (from teest.com, version 
> 1.01).
> You seem to use version 1.02 of the bootloader. Do you use the ADS 
> compiler
> or is there also a gcc version of it ? (I use the ecos gcc for the
> bootloader, too.)
>
> I also noticed that the default frequency setting in redboot is at 184MHz.
> (CYGNUM_HAL_ARM_AT91RM9200_CPU_CLOCK). I thought the CPU would always run 
> at
> 180MHz ? At least the current AT91RM9200 errata (page 2) says the PLL is
> limited to 180MHz.
>
> I get some timeouts when I use tftp when downloading big files, but not 
> too
> many.
>
> I can not boot the linux delivered with my board, as this uses a ramdisk
> and thus would require the redboot exec command. I can run it via "go", 
> but of
> course then I get a kernel panic. But this is not a problem to me as I do 
> not
> want to use linux here anyway.
>
>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] ecos porting for Atmel AT91RM9200-DK
  2005-08-15  2:56 [ECOS] ecos porting for Atmel AT91RM9200-DK Jiun-Shian Ho
@ 2005-08-15 11:55 ` Wolfgang Köbler
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Köbler @ 2005-08-15 11:55 UTC (permalink / raw)
  To: Jiun-Shian Ho; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] ecos porting for Atmel AT91RM9200-DK
  2005-08-10  9:57 Jiun-Shian Ho
  2005-08-11 22:03 ` Wolfgang Köbler
@ 2005-08-13 12:06 ` Wolfgang Köbler
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Köbler @ 2005-08-13 12:06 UTC (permalink / raw)
  To: Jiun-Shian Ho; +Cc: ecos-discuss

Hi,

On 10-Aug-2005 Jiun-Shian Ho wrote:
> Could anyone give me some comments of the To-Do lists.
About "To Do - Support serial flash.":
- One resource for dataflash is the ATMEL RomBoot project for AT91RM9200DK.
  This is already used at http://asky.homeip.net/COREBlog/186, but not
  related to ecos.
- I just found some ecos support for dataflash:
  http://www.spinics.net/lists/ecos/msg26961.html
  http://ecos.sourceware.org/cgi-bin/cvsweb.cgi/ecos/packages/devs/flash/
atmel/dataflash/current/?cvsroot=ecos
  Yet I do not know anything about its state.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] ecos porting for Atmel AT91RM9200-DK
  2005-08-10  9:57 Jiun-Shian Ho
@ 2005-08-11 22:03 ` Wolfgang Köbler
  2005-08-13 12:06 ` Wolfgang Köbler
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Köbler @ 2005-08-11 22:03 UTC (permalink / raw)
  To: Jiun-Shian Ho; +Cc: ecos-discuss

Hi,

On 10-Aug-2005 Jiun-Shian Ho wrote:
> I'm not an expert of eCos, bellow is my dirty porting
> http://asky.homeip.net/COREBlog/186
Thanks a lot for your work. As a first step, I would like to compile exactly
what you have running. I set up a repository (CVS+your files), and built the
template AT91RM9200 - redboot . (I did not test it yet.)
But this does not seem to have ethernet support, but the Screen Shot on your
blog obviously has ethernet support. So what do I need to do  to get what you
got ?

BTW: What does "dirty porting" mean ? I can see that the port is incomplete,
but why is it dirty ?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] ecos porting for Atmel AT91RM9200-DK
@ 2005-08-10  9:57 Jiun-Shian Ho
  2005-08-11 22:03 ` Wolfgang Köbler
  2005-08-13 12:06 ` Wolfgang Köbler
  0 siblings, 2 replies; 5+ messages in thread
From: Jiun-Shian Ho @ 2005-08-10  9:57 UTC (permalink / raw)
  To: ecos-discuss

Hi,
  I need redboot to boot Linux on Atmel AT91RM9200-DK.
But I can not find out any porting, except eCosCentric.

I'm not an expert of eCos, bellow is my dirty porting

http://asky.homeip.net/COREBlog/186

Could anyone give me some comments of the To-Do lists.

Best regards,
H.



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-08-15 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15  2:56 [ECOS] ecos porting for Atmel AT91RM9200-DK Jiun-Shian Ho
2005-08-15 11:55 ` Wolfgang Köbler
  -- strict thread matches above, loose matches on Subject: below --
2005-08-10  9:57 Jiun-Shian Ho
2005-08-11 22:03 ` Wolfgang Köbler
2005-08-13 12:06 ` Wolfgang Köbler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).