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: Configuration question


On Tue, Feb 19, 2008 at 10:41:09AM +0100, Tom Deconinck wrote:
> Hi,
> 
> I have some configuration questions.
> I'm defining an eCos configuration for our own board, which uses an
> Atmel at91sam7se cpu.
> So I based my package on the CYGPKG_HAL_ARM_AT91 and CYGPKG_HAL_ARM_AT91SAM7.
> I also defined my own HAL package, specific for my own board. In my
> own package I would like to override some configuration settings,
> which are already taken care of in the higher level
> CYGPKG_HAL_ARM_AT91SAM7.
> Basically, I would like to change the CYGHWR_MEMORY_LAYOUT related
> settings to reflect my memory mapping, the at91sam7se has an external
> bus, so I would like to update the linker scripts to use my external
> sdram and flash memory.
> And I would like to add a CYG_HAL_STARTUP type ("ext_mem" referring to
>  my external memories).
> 
> As far as I know, I cannot just redefine those package or options
> names, this causes name clashes.
> Does anyone have any suggestion to fit this in the configuration
> system in a clean way? I want to avoid duplicating the
> CYGPKG_HAL_ARM_AT91SAM7 configuration settings for my own design.

This is not easy. The problem here is that you cannot simple define
them twice. Also, since the external interface is very flexible, there
are multiple options, eg RAM or ROM of different sizes. So really this
needs to be in your board specific HAL. 

What i would suggest is extending the hal_arm_at91sam7s.cdl file. You
need to add your processor type anyway. The memory layout files a
names around the processor type, 
pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7 . "_ram.ldi

so you will automatically have pkgconf/mlt_arm_at91sam7se256.ldi etc.

Also look at cdl_option CYGNUM_HAL_ARM_AT91_IMAGE_ADDRESS. You can use
this to specify where in the address space your application lives. You
can configure this in your board specific HAL with a requires
statement. You HAL could also add options for RAM size and FLASH size
etc which are used by the at91sam7se specific ldi file.

    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]