This is the mail archive of the ecos-patches@sources.redhat.com 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: SV: Fix to ROMRAM applications for EB40a


On Sun, 2003-09-14 at 07:23, Andrew Lunn wrote:
> On Sun, Sep 14, 2003 at 03:04:56PM +0200, ?yvind Harboe wrote:
> > >> +	ROMRAM now copies to internal SRAM instead of the external
> > >> +	RAM board @ 0x2000000.
> > >
> > >This changes the current behaviour in an unconditional way. Could you
> > >change this so its controlled by CDL and by default uses the old
> > >behaviour.
> > 
> > How can I make .ldi scripts configurable via CDL?
> 
> Unfortunately, you don't. You have multiple .ldi scripts and use CDL to
> pick the correct one. You need to edit this bit and the same for the
> header file.
> 
>         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
>             display "Memory layout linker script fragment"
>             flavor data
>             no_define
>             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
>             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_at91_eb40a_ram.ldi>" :
>                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_at91_eb40a_romram.ldi>" :
>                                                       "<pkgconf/mlt_arm_at91_eb40a_rom.ldi>" }
>         }
> 
> 

I'd suggest that you add a new CDL option which controls *only* the 
memory map for ROMRAM mode.  Call it something like CYGHWR_ROMRAM_MODE
and let it have two values - SDRAM and SRAM (or INTERNAL and EXTERNAL).

Then change the layout CDL (quoted above) to choose between these.  
Note: you really don't want to add another startup type (e.g. 
ROMRAM_SRAM) as this is more complicated than it's worth.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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