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: [ Spam Mail ] Re: [ Spam Mail ] Re: How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) (This message is to be blocked by code: bkfkact590)


Hi Andrew,

    Thanks for your reply.  I find that the CYGPKG_DEVS_FLASH_SST_POWERPC_PX
does not seems  to be compiled and linked. Because I modify the
powerpc_px_flash_sst.c
for CYGPKG_DEVS_FLASH_SST_POWERPC_PX, this file will not be re-compiled.

Q1 : Why does the source of SST not be compiled ??

And I check the makefile at pX_build\devs\flash\sst\39vfxxx\current.
It is as following:
/////////////////////////////////
pX_build\devs\flash\sst\39vfxxx\current\makefile
///////////////////////////////////////////////
export REPOSITORY := /opt/ecoscvs/ecos/packages
export PREFIX := /home/steven/Project/pX_install
export COMMAND_PREFIX := powerpc-eabi-
export CC := $(COMMAND_PREFIX)gcc
export OBJCOPY := $(COMMAND_PREFIX)objcopy
export HOST := UNIX
export AR := $(COMMAND_PREFIX)ar

PACKAGE := devs/flash/sst/39vfxxx/current
OBJECT_PREFIX := devs_flash_sst_39vfxxx
CFLAGS
:= -msoft-float -mcpu=603e -Wall -Wpointer-arith -Wstrict-prototypes -Winlin
e -Wundef -Woverloaded-virtual -g -gdwarf-2 -ffunction-sections -fdata-secti
ons -fno-rtti -fno-exceptions -fvtable-gc -finit-priority
LDFLAGS
:= -msoft-float -mcpu=603e -g -nostdlib -Wl,--gc-sections -Wl,-static
VPATH := $(REPOSITORY)/$(PACKAGE)
INCLUDE_PATH := $(INCLUDE_PATH) -I$(PREFIX)/include $(foreach
dir,$(VPATH),-I$(dir) -I$(dir)/src -I$(dir)/tests) -I.
MLT := $(wildcard $(REPOSITORY)/$(PACKAGE)/include/pkgconf/mlt*.ldi
$(REPOSITORY)/$(PACKAGE)/include/pkgconf/mlt*.h)
TESTS :=

build: headers

headers: mlt_headers $(PREFIX)/include/cyg/io/flash_sst_39vfxxx.inl

$(PREFIX)/include/cyg/io/flash_sst_39vfxxx.inl:
$(REPOSITORY)/$(PACKAGE)/include/flash_sst_39vfxxx.inl
 @mkdir -p $(dir $@)
 @cp $< $@
 @chmod u+w $@

include $(REPOSITORY)/pkgconf/rules.mak
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////

But it is different with intel strata flash

/////////////////////////////////
pX_build\devs\flash\intel\strata\current\makefile
///////////////////////////////////////////////
export REPOSITORY := /opt/ecoscvs/ecos/packages
export PREFIX := /home/steven/Project/pX_install
export COMMAND_PREFIX := powerpc-eabi-
export CC := $(COMMAND_PREFIX)gcc
export OBJCOPY := $(COMMAND_PREFIX)objcopy
export HOST := UNIX
export AR := $(COMMAND_PREFIX)ar

PACKAGE := devs/flash/intel/strata/current
OBJECT_PREFIX := devs_flash_intel_strata
CFLAGS
:= -msoft-float -mcpu=603e -Wall -Wpointer-arith -Wstrict-prototypes -Winlin
e -Wundef -Woverloaded-virtual -g -gdwarf-2 -ffunction-sections -fdata-secti
ons -fno-rtti -fno-exceptions -fvtable-gc -finit-priority
LDFLAGS
:= -msoft-float -mcpu=603e -g -nostdlib -Wl,--gc-sections -Wl,-static
VPATH := $(REPOSITORY)/$(PACKAGE)
INCLUDE_PATH := $(INCLUDE_PATH) -I$(PREFIX)/include $(foreach
dir,$(VPATH),-I$(dir) -I$(dir)/src -I$(dir)/tests) -I.
MLT := $(wildcard $(REPOSITORY)/$(PACKAGE)/include/pkgconf/mlt*.ldi
$(REPOSITORY)/$(PACKAGE)/include/pkgconf/mlt*.h)
TESTS :=

build: headers libtarget.a.stamp

LIBRARY := libtarget.a
COMPILE := src/strata.c src/flash_erase_block.c src/flash_program_buf.c
src/flash_query.c src/flash_lock_block.c src/flash_unlock_block.c
OBJECTS := $(COMPILE:.cxx=.o.d)
OBJECTS := $(OBJECTS:.c=.o.d)
OBJECTS := $(OBJECTS:.S=.o.d)

$(LIBRARY).stamp: $(OBJECTS)
 $(AR) rcs $(PREFIX)/lib/$(@:.stamp=) $(foreach obj,$?,$(dir
$(obj))$(OBJECT_PREFIX)_$(notdir $(obj:.o.d=.o)))
 @cat $^ > $(@:.stamp=.deps)
 @touch $@

headers: mlt_headers

include $(REPOSITORY)/pkgconf/rules.mak

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////

/////////////////////////////////
devs\flash\powerpc\px\current\cdl\flash_sst_powerpc_px.cdl
//////////////////////////////////////

cdl_package CYGPKG_DEVS_FLASH_SST_POWERPC_PX {
    display       "pX SST39VF040 FLASH memory support"
    description   "FLASH memory device support for PowerPC 8245 (Alpha pX)"

    parent        CYGPKG_IO_FLASH
    active_if   CYGPKG_IO_FLASH
    requires   CYGPKG_HAL_POWERPC_PX

    compile       -library=libextras.a powerpc_px_flash_sst.c

    # Arguably this should do in the generic package
    # but then there is a logic loop so you can never enable it.
    cdl_interface CYGINT_DEVS_FLASH_SST_39VFXXX_REQUIRED {
        display   "Generic SST 39VFxxx driver required"
    }

    implements CYGINT_DEVS_FLASH_SST_39VFXXX_REQUIRED

    cdl_option CYGNUM_DEVS_FLASH_POWERPC_PX_SIZE {
        display       "Flash size in Kbytes"
        flavor        data
        legal_values  { 512 1024 2048 }
        default_value 512
        description   "
            This option specifies the size of the flash device
            of the pX."
    }
}

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////

/////////////////////////////////
devs\flash\powerpc\px\current\cdl\flash_strata_powerpc_px.cdl
//////////////////////////////////////
cdl_package CYGPKG_DEVS_FLASH_STRATA_POWERPC_PX {
    display       "pX Intel STRATA 28F128 FLASH memory support"

    parent        CYGPKG_IO_FLASH
    active_if   CYGPKG_IO_FLASH
    requires   CYGPKG_HAL_POWERPC_PX

    requires      CYGPKG_DEVS_FLASH_STRATA

    implements    CYGHWR_IO_FLASH_BLOCK_LOCKING

    include_dir   cyg/io

    # Arguably this should do in the generic package
    # but then there is a logic loop so you can never enable it.
    cdl_interface CYGINT_DEVS_FLASH_STRATA_REQUIRED {
        display   "Generic StrataFLASH driver required"
    }

    implements    CYGINT_DEVS_FLASH_STRATA_REQUIRED

    define_proc {
        puts $::cdl_system_header "/***** strataflash driver proc output
start *****/"
        puts $::cdl_system_header "#define CYGDAT_DEVS_FLASH_STRATA_INL
<cyg/io/px_strataflash.inl>"
        puts $::cdl_system_header "#define CYGDAT_DEVS_FLASH_STRATA_CFG
<pkgconf/devs_flash_strata_powerpc_px.h>"
        puts $::cdl_system_header "/*****  strataflash driver proc output
end  *****/"
    }
}
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////


And I find that if I change the order of the packages, it will take error
messages.

[Original : make pass]
target px {
                .......
                          CYGPKG_IO_PCI
                          CYGPKG_IO_FLASH
                          CYGPKG_DEVS_FLASH_SST_39VFXXX
                          CYGPKG_DEVS_FLASH_SST_POWERPC_PX
                          CYGPKG_DEVS_FLASH_STRATA
                          CYGPKG_DEVS_FLASH_STRATA_POWERPC_PX
                .......
 }

== >
[Change Order : make failed]
target px {
                .......
                          CYGPKG_IO_PCI
                          CYGPKG_IO_FLASH
                          CYGPKG_DEVS_FLASH_STRATA
                          CYGPKG_DEVS_FLASH_STRATA_POWERPC_PX
                          CYGPKG_DEVS_FLASH_SST_39VFXXX
                          CYGPKG_DEVS_FLASH_SST_POWERPC_PX
                .......
 }


Q2 : Does the order of the packages affect  the compiling result ??
        The compiling order of the packages are up to down, or down to up ??

Thank you~

Steven Cheng


-- 
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]