This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: adding powerpc mpc561 cpu specific options to existing cdl file
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Ian Gilmour <ian dot gilmour at ffei dot co dot uk>
- Cc: "Ecos-Discuss (E-mail)" <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 27 May 2003 12:56:32 +0200
- Subject: Re: [ECOS] adding powerpc mpc561 cpu specific options to existing cdl file
- References: <334D05460466D311A5E8009027AC788603880A3E@hhmail1.hh.ffei.co.uk>
> hal_powerpc_mpc5xxx.cdl declares a CYGPKG_HAL_POWERPC_MPC5xx package which
> in turn contains a CYGPKG_HAL_POWERPC_MPC555 component. Fair enough I
> thought I'll simply copy the CYGPKG_HAL_POWERPC_MPC555 and rename it
> CYGPKG_HAL_POWERPC_MPC561 and edit it's contents accordingly (the mpc561
> differences are pretty minor).
>
> But this gives me redefinition errors.
>
> e.g.
> Option `CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B' cannot be loaded. The name
> is already in use.
>
> So how do I get around the problem where I want the same options (but with
> different defaults) for a different component in the same package definition
> file? Or alternatively how else do I resolve this?
I don't claim to be a CDL expert....
I would restructure it a bit. I'd move the CYGPKG_HAL_POWERPC_MPC555
component into a package of its own and add a new package
CYGPKG_HAL_POWERPC_MPC561. You then load one, or the other, but never
both, so you don't get the name clash.
The other option may be to use a requires statement in your
CYGPKG_HAL_POWERPC_MPC561 component. Rather than declare
CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B again, have a
requires CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B == 0x1234
The CDL engine might then be able to set the value correctly.
> ----------------------------------------------------------------------------
> CONFIDENTIALITY AND DISCLAIMER NOTICE
>
> This message and any attachment is confidential [..]
Not when you send it to a public mailling list....
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss