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: CDL question about CYGHWR_IO_FLASH_DEVICE


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


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