public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] CDL question about CYGHWR_IO_FLASH_DEVICE
@ 2009-11-06 20:40 H Hartley Sweeten
  2009-11-07 12:00 ` [ECOS] " John Dallaway
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2009-11-06 20:40 UTC (permalink / raw)
  To: ecos-discuss

Hello all,

I'm trying to cleanup the ep93xx port that Brian Austin from
Cirrus posted to the Bug Management System on 2009-04-10.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000739

I have it almost finished but I am getting a message during
the build that I don't understand.  I think this happens
during one of the ecosconfig steps before the actual make.
The message is:

C CYGHWR_IO_FLASH_DEVICE, "requires" constraint not satisfied:  CYGHWR_IO_FLASH_DEVICE >= 1 

I have checked the ecos.ecc file for CYGHWR_IO_FLASH_DEVICE
and found this:

# >
# Hardware FLASH device drivers
# This calculated option gives the number of flash devices
# on the current platform. The generic flash support requires
# at least one device.
#
cdl_interface CYGHWR_IO_FLASH_DEVICE {
    # Implemented by CYGPKG_DEVS_FLASH_EP93XX_28FXXX, active, disabled
    # Implemented by CYGPKG_DEVS_FLASH_EP93XX_AMD, active, disabled
    # Implemented by CYGPKG_DEVS_FLASH_STRATA, active, enabled
    # Implemented by CYGPKG_DEVS_FLASH_AMD_AM29XXXXX, inactive, enabled
    # Implemented by CYGPKG_DEVS_FLASH_INTEL_28FXXX, inactive, enabled
    # This value cannot be modified here.
    # Flavor: data
    # Current_value: 1
    # Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
    #     CYGHWR_IO_FLASH_DEVICE == 1
    #   --> 1

    # The following properties are affected by this value
    # interface CYGHWR_IO_FLASH_DEVICE
    #     Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
    # option CYGSEM_IO_FLASH_VERIFY_PROGRAM
    #     ActiveIf:  CYGHWR_IO_FLASH_INDIRECT_READS < CYGHWR_IO_FLASH_DEVICE 
    # component CYGPKG_REDBOOT_FLASH
    #     ActiveIf: CYGHWR_IO_FLASH_DEVICE
};

It appears that the "requires" constraint should be ok.  Am I
missing something?

Thanks,
Hartley

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] Re: CDL question about CYGHWR_IO_FLASH_DEVICE
  2009-11-06 20:40 [ECOS] CDL question about CYGHWR_IO_FLASH_DEVICE H Hartley Sweeten
@ 2009-11-07 12:00 ` John Dallaway
  2009-11-09 22:07   ` [ECOS] " H Hartley Sweeten
  0 siblings, 1 reply; 4+ messages in thread
From: John Dallaway @ 2009-11-07 12:00 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: ecos-discuss

Hi Hartley

H Hartley Sweeten wrote:

> I'm trying to cleanup the ep93xx port that Brian Austin from
> Cirrus posted to the Bug Management System on 2009-04-10.
> 
> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000739

Great. Hopefully the copyright assignment will come through soon.

> I have it almost finished but I am getting a message during
> the build that I don't understand.  I think this happens
> during one of the ecosconfig steps before the actual make.
> The message is:
> 
> C CYGHWR_IO_FLASH_DEVICE, "requires" constraint not satisfied:  CYGHWR_IO_FLASH_DEVICE >= 1 
> 
> I have checked the ecos.ecc file for CYGHWR_IO_FLASH_DEVICE
> and found this:
> 
> # >
> # Hardware FLASH device drivers
> # This calculated option gives the number of flash devices
> # on the current platform. The generic flash support requires
> # at least one device.
> #
> cdl_interface CYGHWR_IO_FLASH_DEVICE {
>     # Implemented by CYGPKG_DEVS_FLASH_EP93XX_28FXXX, active, disabled
>     # Implemented by CYGPKG_DEVS_FLASH_EP93XX_AMD, active, disabled
>     # Implemented by CYGPKG_DEVS_FLASH_STRATA, active, enabled
>     # Implemented by CYGPKG_DEVS_FLASH_AMD_AM29XXXXX, inactive, enabled
>     # Implemented by CYGPKG_DEVS_FLASH_INTEL_28FXXX, inactive, enabled
>     # This value cannot be modified here.
>     # Flavor: data
>     # Current_value: 1
>     # Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
>     #     CYGHWR_IO_FLASH_DEVICE == 1
>     #   --> 1
> 
>     # The following properties are affected by this value
>     # interface CYGHWR_IO_FLASH_DEVICE
>     #     Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
>     # option CYGSEM_IO_FLASH_VERIFY_PROGRAM
>     #     ActiveIf:  CYGHWR_IO_FLASH_INDIRECT_READS < CYGHWR_IO_FLASH_DEVICE 
>     # component CYGPKG_REDBOOT_FLASH
>     #     ActiveIf: CYGHWR_IO_FLASH_DEVICE
> };
> 
> It appears that the "requires" constraint should be ok.  Am I
> missing something?

From visual inspection, the relevant logic appears to be:

  CYGPKG_DEVS_FLASH_STRATA:
    active_if CYGINT_DEVS_FLASH_STRATA_REQUIRED

  CYGPKG_DEVS_FLASH_EDB93XX_STRATA:
    default_value 0
    requires CYGPKG_DEVS_FLASH_STRATA
    implements CYGINT_DEVS_FLASH_STRATA_REQUIRED

Firstly, CYGPKG_DEVS_FLASH_STRATA is a hardware package and should
therefore be added to the edb93xx target definition in ecos.db. The
CYGINT_DEVS_FLASH_STRATA_REQUIRED interface will ensure that this
package is inactive if it is not needed.

You can then eliminate the "requires CYGPKG_DEVS_FLASH_STRATA"
constraint on CYGPKG_DEVS_FLASH_EDB93XX_STRATA.

Does this eliminate the unexpected CDL conflict?

John Dallaway

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] RE: CDL question about CYGHWR_IO_FLASH_DEVICE
  2009-11-07 12:00 ` [ECOS] " John Dallaway
@ 2009-11-09 22:07   ` H Hartley Sweeten
  2009-11-11 20:56     ` [ECOS] " John Dallaway
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2009-11-09 22:07 UTC (permalink / raw)
  To: John Dallaway; +Cc: ecos-discuss

On Saturday, November 07, 2009 5:00 AM, John Dallaway wrote:
> Hi Hartley

Hello!

>> I'm trying to cleanup the ep93xx port that Brian Austin from
>> Cirrus posted to the Bug Management System on 2009-04-10.
>> 
>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000739
>
> Great. Hopefully the copyright assignment will come through soon.

Hopefully... I need to ping Brian sometime to see if he _finally_
got the paperwork submitted.  Anyway to check the FSF directly?

>> I have it almost finished but I am getting a message during
>> the build that I don't understand.  I think this happens
>> during one of the ecosconfig steps before the actual make.
>> The message is:
>> 
>> C CYGHWR_IO_FLASH_DEVICE, "requires" constraint not satisfied:  CYGHWR_IO_FLASH_DEVICE >= 1 
>> 
>> I have checked the ecos.ecc file for CYGHWR_IO_FLASH_DEVICE
>> and found this:
>> 
>> # >
>> # Hardware FLASH device drivers
>> # This calculated option gives the number of flash devices
>> # on the current platform. The generic flash support requires
>> # at least one device.
>> #
>> cdl_interface CYGHWR_IO_FLASH_DEVICE {
>>     # Implemented by CYGPKG_DEVS_FLASH_EP93XX_28FXXX, active, disabled
>>     # Implemented by CYGPKG_DEVS_FLASH_EP93XX_AMD, active, disabled
>>     # Implemented by CYGPKG_DEVS_FLASH_STRATA, active, enabled
>>     # Implemented by CYGPKG_DEVS_FLASH_AMD_AM29XXXXX, inactive, enabled
>>     # Implemented by CYGPKG_DEVS_FLASH_INTEL_28FXXX, inactive, enabled
>>     # This value cannot be modified here.
>>     # Flavor: data
>>     # Current_value: 1
>>     # Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
>>     #     CYGHWR_IO_FLASH_DEVICE == 1
>>     #   --> 1
>> 
>>     # The following properties are affected by this value
>>     # interface CYGHWR_IO_FLASH_DEVICE
>>     #     Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
>>     # option CYGSEM_IO_FLASH_VERIFY_PROGRAM
>>     #     ActiveIf:  CYGHWR_IO_FLASH_INDIRECT_READS < CYGHWR_IO_FLASH_DEVICE 
>>     # component CYGPKG_REDBOOT_FLASH
>>     #     ActiveIf: CYGHWR_IO_FLASH_DEVICE
>> };
>> 
>> It appears that the "requires" constraint should be ok.  Am I
>> missing something?
>
> From visual inspection, the relevant logic appears to be:
>
>  CYGPKG_DEVS_FLASH_STRATA:
>    active_if CYGINT_DEVS_FLASH_STRATA_REQUIRED
>
>  CYGPKG_DEVS_FLASH_EDB93XX_STRATA:
>    default_value 0
>    requires CYGPKG_DEVS_FLASH_STRATA
>    implements CYGINT_DEVS_FLASH_STRATA_REQUIRED
>
> Firstly, CYGPKG_DEVS_FLASH_STRATA is a hardware package and should
> therefore be added to the edb93xx target definition in ecos.db. The
> CYGINT_DEVS_FLASH_STRATA_REQUIRED interface will ensure that this
> package is inactive if it is not needed.
>
> You can then eliminate the "requires CYGPKG_DEVS_FLASH_STRATA"
> constraint on CYGPKG_DEVS_FLASH_EDB93XX_STRATA.
>
> Does this eliminate the unexpected CDL conflict?

The original Cirrus port had support for Intel Strataflash, Intel 28Fxxx,
and AMD AM29xxxxx devices.  I think that's why the CYGPKG_* option is not
in the edb93xx target definition.  The have it all wrapped up in a cdl
file at packages/devs/flash/arm/edb93xx/current/cdl/flash_edb93xx.cdl.

There were two extra "implements CYGHWR_IO_FLASH_DEVICE" lines in the
file that I don't think were needed so I removed them.  With that change
the ecos.ecc file has this:

# >
# Hardware FLASH device drivers
# This calculated option gives the number of flash devices
# on the current platform. The generic flash support requires
# at least one device.
#
cdl_interface CYGHWR_IO_FLASH_DEVICE {
    # Implemented by CYGPKG_DEVS_FLASH_STRATA, active, enabled
    # Implemented by CYGPKG_DEVS_FLASH_AMD_AM29XXXXX, inactive, enabled
    # Implemented by CYGPKG_DEVS_FLASH_INTEL_28FXXX, inactive, enabled
    # This value cannot be modified here.
    # Flavor: data
    # Current_value: 1
    # Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
    #     CYGHWR_IO_FLASH_DEVICE == 1
    #   --> 1

    # The following properties are affected by this value
    # interface CYGHWR_IO_FLASH_DEVICE
    #     Requires:  CYGHWR_IO_FLASH_DEVICE >= 1 
    # option CYGSEM_IO_FLASH_VERIFY_PROGRAM
    #     ActiveIf:  CYGHWR_IO_FLASH_INDIRECT_READS < CYGHWR_IO_FLASH_DEVICE 
    # component CYGPKG_REDBOOT_FLASH
    #     ActiveIf: CYGHWR_IO_FLASH_DEVICE
};

It appears to me that the "requires" constraint is satisfied but I still
get the message during the build.  Here is the complete output up to the first
make message:

( cd /home/bigguiness/buildroot/output/build/ecos/build ; \
		export ECOS_REPOSITORY=/home/bigguiness/buildroot/output/build/ecos/packages ; \
		PATH=/home/bigguiness/buildroot/output/target/device/Cirrus/bootloader/ecos:/usr/local/arm/3.2.1-elf/bin:$PATH ; \
		~/buildroot/target/device/Cirrus/bootloader/ecos/ecosconfig new ep93xx redboot; \
		~/buildroot/target/device/Cirrus/bootloader/ecos/ecosconfig import /home/bigguiness/buildroot/output/build/ecos/packages/hal/arm/arm9/ep93xx/current/misc/redboot_ROMRAM.ecm; \
		~/buildroot/target/device/Cirrus/bootloader/ecos/ecosconfig import VISION_EP9307.ecm; \
		~/buildroot/target/device/Cirrus/bootloader/ecos/ecosconfig tree ; \
		make clean ; \
		make ; )
U CYGPKG_HAL_ARM_ARM9_ARM920T, new inferred value 1
U CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK, new inferred value 0
U CYGBLD_GLOBAL_CFLAGS, new inferred value -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mno-thumb-interwork 
U CYGBLD_GLOBAL_LDFLAGS, new inferred value -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib -mno-thumb-interwork 
U CYGSEM_HAL_USE_ROM_MONITOR, new inferred value 0
C CYGHWR_IO_FLASH_DEVICE, "requires" constraint not satisfied:  CYGHWR_IO_FLASH_DEVICE >= 1 

I'm not sure if it matters but I'm building ecos as a target under
buildroot.  The VISION_EP9307.ecm is created prior to the ecos build
based on some buildroot configuration options.  Currently is has
this in it:

cdl_option CYGHWR_HAL_ARM_EP93XX_VARIANT { user_value EP9307 }
cdl_option CYGHWR_HAL_ARM_EP93XX_BOARD_VARIANT { user_value VISION_EP9307 }
cdl_option CYGPKG_DEVS_FLASH_EP93XX_STRATA { user_value 1 }
cdl_option CYGHWR_DEVS_FLASH_EP93XX_P30 { user_value 1 }
cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_SIZE { user_value 32768 }

Any other hints?

Regards,
Hartley



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] Re: CDL question about CYGHWR_IO_FLASH_DEVICE
  2009-11-09 22:07   ` [ECOS] " H Hartley Sweeten
@ 2009-11-11 20:56     ` John Dallaway
  0 siblings, 0 replies; 4+ messages in thread
From: John Dallaway @ 2009-11-11 20:56 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: ecos-discuss

Hi Hartley

H Hartley Sweeten wrote:

> The original Cirrus port had support for Intel Strataflash, Intel 28Fxxx,
> and AMD AM29xxxxx devices.  I think that's why the CYGPKG_* option is not
> in the edb93xx target definition.  The have it all wrapped up in a cdl
> file at packages/devs/flash/arm/edb93xx/current/cdl/flash_edb93xx.cdl.

Typically, board variants with different Flash parts are implemented as
separate targets, but in this case you could add all three flash driver
packages to the target edb93xx record in ecos.db since there's CDL logic
to activate the appropriate flash driver:

> target edb93xx {
>     alias       { "Cirrus Logic EDB93XX evaluation board" edb93xx }
>     packages    { CYGPKG_HAL_ARM
>                   CYGPKG_HAL_ARM_ARM9
>                   CYGPKG_HAL_ARM_ARM9_EDB93XX
> 		    CYGPKG_DEVS_FLASH_EDB93XX
>                   CYGPKG_DEVS_ETH_ARM_EDB93XX
>                   CYGPKG_DEVS_FLASH_STRATA
>                   CYGPKG_DEVS_FLASH_INTEL_28FXXX
>                   CYGPKG_DEVS_FLASH_AMD_AM29XXXXX
>     }
>     description "
> The EDB93XX target provides the packages needed to run eCos on the Cirrus Logic EP93XX based development boards."
> }

If I make the above change and eliminate the "requires
CYGPKG_DEVS_FLASH_STRATA" constraint on CYGPKG_DEVS_FLASH_EDB93XX_STRATA
then I am unable to reproduce the unexpected conflict you report:

> [jld@cog test]$ ecosconfig new edb93xx
> U CYGPKG_HAL_ARM_ARM9_ARM920T, new inferred value 1
> U CYGBLD_GLOBAL_CFLAGS, new inferred value -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mno-thumb-interwork 
> U CYGBLD_GLOBAL_LDFLAGS, new inferred value -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib -mno-thumb-interwork 
> [jld@cog test]$ ecosconfig --no-resolve add flash
> C CYGHWR_IO_FLASH_DEVICE, "requires" constraint not satisfied:  CYGHWR_IO_FLASH_DEVICE >= 1 
> [jld@cog test]$ echo "cdl_component CYGPKG_DEVS_FLASH_EDB93XX_STRATA { user_value 1 }" | ecosconfig import /dev/stdin
> [jld@cog test]$ ecosconfig check
> Target: edb93xx
> Template: default
> Added:
>  CYGPKG_IO_FLASH
> No conflicts
> [jld@cog test]$ 

I suggest that you try to reproduce the above result by applying the
EP93xx patch and the above changes to an unmodified eCos repository.
Then work out what you have changed in your local sources that might
have introduced the problem.

John Dallaway

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-11 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 20:40 [ECOS] CDL question about CYGHWR_IO_FLASH_DEVICE H Hartley Sweeten
2009-11-07 12:00 ` [ECOS] " John Dallaway
2009-11-09 22:07   ` [ECOS] " H Hartley Sweeten
2009-11-11 20:56     ` [ECOS] " John Dallaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).