This is the mail archive of the ecos-discuss@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: adding powerpc mpc561 cpu specific options to existing cdl file


> 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


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