[ECOS] adding powerpc mpc561 cpu specific options to existing cdl file

Andrew Lunn andrew.lunn@ascom.ch
Tue May 27 12:02:00 GMT 2003


> 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



More information about the Ecos-discuss mailing list