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


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

Probably that is all that is needed. However i cannot guarantee it. If
it does not work, you will need to single step thought the start up
code. The start up code unmaps the FLASH from 0x0 and maps the SRAM to
0x0. In particularly you need to check that the interrupt vectors stay
in SRAM at 0x0-0x40 and don't get placed at SDRAM+0 - SDRAM+0x40.

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

The problem is that C requires a stack. The stack has to be in
RAM. But until you have the SDRAM controller initialized, you don't
have any RAM.

However for the AT91SAM7 what you might be able to do is in assembly
language, in your hal_platform_setup is set the stack pointer to the
SRAM. Then call into a C function which initializes the SDRAM
controller. When the C function exists normal eCos code with take over
and then correctly setup the stack in SDRAM.

    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


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