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: AT91SAM7SE with external SDRAM



-----Message d'origine-----
De?: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] De la part de Andrew Lunn
Envoyé?: lundi 20 août 2007 11:15
À?: jc.caquet@kerlink.fr
Cc?: ecos-discuss@ecos.sourceware.org
Objet?: Re: [ECOS] AT91SAM7SE with external SDRAM

On Mon, Aug 20, 2007 at 10:43:31AM +0200, jc.caquet@kerlink.fr wrote:
> Dear all,
> we are trying to setup ECOS in order to use an SDRAM connected on the
> external bus of an AT91SAM7SE. We had a look at the init process of ECOS
and
> we have some difficulties to understand when software is supposed to
> configure SDRAM controller

hal_platform_setup.h normally does this. For example, take a look at
hal/arm/ebsa285/current/include/hal_platform_setup.h. It defines the
macros PLATFORM_SETUP1 which gets called in vectors.S early in the
startup process. PLATFORM_SETUP1 includes the macro call
CALL_MEMINIT_CODE. This macros calls into the function __mem285_init
in packages/hal/arm/ebsa285/current/src/mem285.S. This is all in
assembly because at this point you don't have any RAM, just the
processor registers.

> and so when it is supposed to switch from internal SRAM to external
> SDRAM.

This is not the usual model. Few processors have both internal SRAM
and external SDRAM. Those that do, generally follow the process above,
ie start the SDRAM in assembly during the early state up code and then
use the external SDRAM and virtually ignore the SRAM. Maybe using
compiler attributes they move some data structures into SRAM, but
otherwise it is not used.

> Massa chapter HAL startup explains that a storage area is reserved for
> insterrupt stack?; should it be in SDRAM?at that point?? When does ECOS
> start using the heap??
> The only place where we find SDRAM address/size is in

> hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_rom.h
/
> mlt_arm_at91sam7s256_rom.ldi. How are they generated??

They are "generated" by hand.

You have to think, do you want to follow this model? Or do you want to
do something different?

   Andrew


As soon as SDRAM config has been done at the right place is it enough to
change address/size values in mt_arm_at91sam7se512_rom.h/.ldi files so that
ECOS uses SDRAM ?
Why not to configure SDRAM in hal_hardware_init that seems to be the first C
code section called from vectors.S, we don't have any skills in ARM assembly
here...

JC


--
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]