On Mon, Aug 20, 2007 at 10:43:31AM +0200, [EMAIL PROTECTED] 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 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
