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]

Intel strata flash problem


Hi,
  I have some prob with the intel Strata flash.Can you please read
below..

I wanted to get Redboot with flash support up on my board i am facing
some issue with the flash please read below.
 
1.) From "Build->templates" selected "Altera ARM9/Excalibur board"
inside the template window i select "redboot" in the packages drop down
menu.
    By default these are the packages which gets included
    ARM common HAL
    ARM9 variant
    Altera Excalibur ARM9 board
    CRC support
    DNS
    FLASH memory support for Altera ARM9/Excalibur board
    Generic FLASH memory support for Intel 28Fxxx Flash parts
    ISO C and POSIX infrastructure
    ISO C library string functions
    Infrastructure
    RedBoot, the Red Hat bootstrap
    eCos common HAL
 
2.) Now i can see the packages of my selection however "Intel Flashfile
FLASH memory support"(this is for intel 28FXXX) package is inactive. In
the property window i can see "Parent CYGPG_IO_FLASH". So i go to 
"Build->Packages" and select "Generic FLASH memory support" and i can
see "FLASH device  drivers" in the configtool window and "Intel
Flashfile FLASH memory support" becomes active under the same.
 
3.) I had changed CYGNUM_FLASH_BASE to my flash base address in 
    "./packages/devs/flash/arm/excalibur/v2_0/src/arm_excalibur_flash.c"
   
 Here i also see 
    // Now include the driver code.
    #include "cyg/io/flash_28fxxx.inl"  Is it correct??
 
4.) I complile this and download it on my board i can see the following
message on the screen
 
FLASH: driver init failed: Driver does not support device
FLASH: driver init failed: Driver does not support device

RedBoot(tm) bootstrap and debug environment [RAM]
Non-certified release, version v2_0 - built 15:33:49, Oct 27 2004
 
Platform: EXCALIBUR system (ARM9) 
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
 
RAM: 0x10000000-0x14000000, 0x10047688-0x04000000 available
RedBoot>
 
 
5.) My Flash on board is  Intel StrataFlash(r) Memory (J3) 28F128J3.
 
6.) Again i go to  "Build->Packages" and select "Generic FLASH memory
support for Intel StrataFLASH" i get "Add and remove hardware packages
by selecting a new hardware template" message.
 
7.) I got to DIR where my .ecc file is stored and do "ecosconfig add
CYGPKG_DEVS_FLASH_STRATA" and i can see "Generic FLASH memory support
for Intel StrataFLASH" under "FLASH device  drivers" in addition to
"Intel Flashfile FLASH memory support". But it is again inactive.
 
8.) I make the following change in the
./packages/devs/flash/intel/strata/v2_0/cdl/flash_strata.cdl file i
comment (#) activeif CYGINT_DEVS_FLASH_STRATA_REQUIRED and i can see
"Generic FLASH memory support for Intel StrataFLASH" becomes active with
2 suboptions "Control Flash driver code to RAM" (This is active) and
"Flash device implements locking" (This is in-active).
 
9.) I complie and download the same. I again get same message as in (3),
because my new package actually complied.
 
10.)I also see ecos_build/devs/flash/intel/28fxxx/v2_0/makefile but
nothing like this for strata flash.
 
11.) Any help in getting this flash recognised shall be greatly
appreciated.
 
 
 
My .cdl file is as follows
 
# ====================================================================

######DESCRIPTIONBEGIN####

# Author(s): gthomas

# Original data: gthomas

# Contributors:

# Date: 2000-07-26

#####DESCRIPTIONEND####

# ====================================================================

    cdl_package CYGPKG_DEVS_FLASH_STRATA {

    display "Intel StrataFLASH memory support"

    parent CYGPKG_IO_FLASH

    active_if CYGPKG_IO_FLASH

    implements CYGHWR_IO_FLASH_DEVICE

    # implements CYGHWR_IO_FLASH_DEVICE_NOT_IN_RAM

    cdl_option CYGOPT_DEVS_FLASH_STRATA_NOT_IN_RAM {

    display "Control Flash driver code copy to RAM"

    flavor bool

    no_define

    default_value 1

    implements CYGHWR_IO_FLASH_DEVICE_NOT_IN_RAM

    description " Rarely, it is useful to disable the request that flash
driver code be copied to separate RAM for execution. This option lets
you do that.

    It should only be controlled by redboot_XXX.ecm config files, for

    building different varieties of RedBoot.

    NEVER disable this option for ROM startup code, which executes in
place

    from Flash: the build will not work."

    }

    # active_if CYGINT_DEVS_FLASH_STRATA_REQUIRED

    include_dir .

    include_files ; # none _exported_ whatsoever

    description "FLASH memory device support for Intel StrataFlash"

    compile strata.c

    define_proc {

    puts $::cdl_header "#include <pkgconf/system.h>";

    puts $::cdl_header "#include CYGDAT_DEVS_FLASH_STRATA_CFG";

    }

    make -priority 1 {

    flash_erase_block.o:
$(REPOSITORY)/$(PACKAGE)/src/flash_erase_block.c \

    $(REPOSITORY)/$(PACKAGE)/src/strata.h

    $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections
$(REPOSITORY)/$(PACKAGE)/src/flash_erase_block.c

    echo " .text" >>flash_erase_block.s

    echo " .globl flash_erase_block_end" >>flash_erase_block.s

    echo "flash_erase_block_end:" >>flash_erase_block.s

    $(CC) $(CFLAGS) -c -o flash_erase_block.o flash_erase_block.s

    $(AR) rcs $(PREFIX)/lib/libtarget.a flash_erase_block.o

    }

    make -priority 1 {

    flash_program_buf.o:
$(REPOSITORY)/$(PACKAGE)/src/flash_program_buf.c \

    $(REPOSITORY)/$(PACKAGE)/src/strata.h

    $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections
$(REPOSITORY)/$(PACKAGE)/src/flash_program_buf.c

    echo " .text" >>flash_program_buf.s

    echo " .globl flash_program_buf_end" >>flash_program_buf.s

    echo "flash_program_buf_end:" >>flash_program_buf.s

    $(CC) $(CFLAGS) -c -o flash_program_buf.o flash_program_buf.s

    $(AR) rcs $(PREFIX)/lib/libtarget.a flash_program_buf.o

    }

    make -priority 1 {

    flash_query.o: $(REPOSITORY)/$(PACKAGE)/src/flash_query.c \

    $(REPOSITORY)/$(PACKAGE)/src/strata.h

    $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections
$(REPOSITORY)/$(PACKAGE)/src/flash_query.c

    echo " .text" >>flash_query.s

    echo " .globl flash_query_end" >>flash_query.s

    echo "flash_query_end:" >>flash_query.s

    $(CC) $(CFLAGS) -c -o flash_query.o flash_query.s

    $(AR) rcs $(PREFIX)/lib/libtarget.a flash_query.o

    }

    cdl_component CYGPKG_DEVS_FLASH_STRATA_LOCKING {

    display "Flash device implements locking"

    active_if 0 < CYGHWR_IO_FLASH_BLOCK_LOCKING

    calculated 1

    make -priority 1 {

    flash_lock_block.o: $(REPOSITORY)/$(PACKAGE)/src/flash_lock_block.c
\

    $(REPOSITORY)/$(PACKAGE)/src/strata.h

    $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections
$(REPOSITORY)/$(PACKAGE)/src/flash_lock_block.c

    echo " .text" >>flash_lock_block.s

    echo " .globl flash_lock_block_end" >>flash_lock_block.s

    echo "flash_lock_block_end:" >>flash_lock_block.s

    $(CC) $(CFLAGS) -c -o flash_lock_block.o flash_lock_block.s

    $(AR) rcs $(PREFIX)/lib/libtarget.a flash_lock_block.o

    }

    make -priority 1 {

    flash_unlock_block.o:
$(REPOSITORY)/$(PACKAGE)/src/flash_unlock_block.c \

    $(REPOSITORY)/$(PACKAGE)/src/strata.h

    $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections
$(REPOSITORY)/$(PACKAGE)/src/flash_unlock_block.c

    echo " .text" >>flash_unlock_block.s

    echo " .globl flash_unlock_block_end" >>flash_unlock_block.s

    echo "flash_unlock_block_end:" >>flash_unlock_block.s

    $(CC) $(CFLAGS) -c -o flash_unlock_block.o flash_unlock_block.s

    $(AR) rcs $(PREFIX)/lib/libtarget.a flash_unlock_block.o

    }

    }

    }


Mohit Pal 
If at first you don't succeed.... call it version 0.1!! 


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of agyhoo
Sent: Saturday, October 30, 2004 3:47 AM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] strata flash program error


Hi I am using a custom board with a intel strataflash
device (TE28F640J3C115). I programmed RedBoot in it using
the Abatron BDI. When I try to run "fis init -f" I get the following
error:

About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xfe060000-0xfe7e0000:
............................................................
... Erase from 0xfe800000-0xfe800000:
... Unlock from 0xfe7e0000-0xfe800000: .
... Erase from 0xfe7e0000-0xfe800000: .
... Program from 0x00fe0000-0x01000000 at 0xfe7e0000: Err = 9910

The 9910 code corresponds to "Verify error". I have the
latest CVS sources (i.e. the lock bit fix is in place). My flash device
is 8MB is size and located at 0xfe000000-0xfe80000. There are 64 blocks
of 128K.

I tried doing fis writes as well. Doesn't seem to work.
After running fis init, I seem to have written a few bytes  starting at
0xfe7e0000. See trace below:

# dump -b 0xfe7e0000
FE7E0000: 28 72 65 73 65 72 76 65  64 29 00 00 00 00 00 00 
|(reserved)......|
FE7E0010: FE 00 00 00 FE 00 00 00  00 02 00 00 00 00 00 00 
|................|
# dump
FE7E0020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
|................|
FE7E0030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
|................|
# dump
FE7E0040: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF 
|................|
FE7E0050: FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF 
|................|

# fis list
Name              FLASH addr  Mem addr    Length      Entry
point
(reserved)        0xFE000000  0xFE000000  0x00020000 
0x00000000
#

Any ideas as to what is wrong here?
Thanks.




	
		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

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


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


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