public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
@ 2005-08-08  4:19 Steven_cheng
  2005-08-08 21:02 ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-08  4:19 UTC (permalink / raw)
  To: ecos-discuss

Hello All,

In my platform, it supports two flashs with sst29vfxxx and intel_strata.
When the cyg_start() of RedBoot calls the do_flash_init(),
it only calls the flash_hwr_init() of intel_strata but sst29vfxxx.
Then the redboot only disaply the flash info of intel_strata.
How can I initial the flashs of sst29vfxxx and intel_strata at
do_flash_init() ?

 -Thanks a lot !!

 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

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

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-08  4:19 [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? Steven_cheng
@ 2005-08-08 21:02 ` Andrew Lunn
  2005-08-09  0:57   ` Steven_cheng
  2005-08-29 15:45   ` Steven_cheng
  0 siblings, 2 replies; 15+ messages in thread
From: Andrew Lunn @ 2005-08-08 21:02 UTC (permalink / raw)
  To: Steven_cheng; +Cc: ecos-discuss

On Mon, Aug 08, 2005 at 12:20:38PM +0800, Steven_cheng wrote:
> Hello All,
> 
> In my platform, it supports two flashs with sst29vfxxx and intel_strata.
> When the cyg_start() of RedBoot calls the do_flash_init(),
> it only calls the flash_hwr_init() of intel_strata but sst29vfxxx.
> Then the redboot only disaply the flash info of intel_strata.
> How can I initial the flashs of sst29vfxxx and intel_strata at
> do_flash_init() ?

The flash infrastructure in the eCos trunk only supports one flash
driver. You need to use the flashv2 branch of eCos which supports
multiple flash drivers at the same time.

        Andrew

-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-08 21:02 ` Andrew Lunn
@ 2005-08-09  0:57   ` Steven_cheng
  2005-08-09  8:48     ` Andrew Lunn
  2005-08-29 15:45   ` Steven_cheng
  1 sibling, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-09  0:57 UTC (permalink / raw)
  To: Andrew Lunn, ecos-discuss

Dear Andrew,

    Where can I get the flashv2 branch of eCos which supports
multiple flash drivers??

Thank you~~

Steven Cheng

----- Original Message ----- 
From: "Andrew Lunn" <andrew@lunn.ch>
To: "Steven_cheng" <05071@alphanetworks.com>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Tuesday, August 09, 2005 5:01 AM
Subject: Re: [ECOS] How can I initial the flashs of sst29vfxxx and
intel_strata at do_flash_init() ?


> On Mon, Aug 08, 2005 at 12:20:38PM +0800, Steven_cheng wrote:
> > Hello All,
> >
> > In my platform, it supports two flashs with sst29vfxxx and intel_strata.
> > When the cyg_start() of RedBoot calls the do_flash_init(),
> > it only calls the flash_hwr_init() of intel_strata but sst29vfxxx.
> > Then the redboot only disaply the flash info of intel_strata.
> > How can I initial the flashs of sst29vfxxx and intel_strata at
> > do_flash_init() ?
>
> The flash infrastructure in the eCos trunk only supports one flash
> driver. You need to use the flashv2 branch of eCos which supports
> multiple flash drivers at the same time.
>
>         Andrew


-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-09  0:57   ` Steven_cheng
@ 2005-08-09  8:48     ` Andrew Lunn
  2005-08-09 13:25       ` Steven_cheng
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2005-08-09  8:48 UTC (permalink / raw)
  To: Steven_cheng; +Cc: ecos-discuss

On Tue, Aug 09, 2005 at 08:58:26AM +0800, Steven_cheng wrote:
> Dear Andrew,
> 
>     Where can I get the flashv2 branch of eCos which supports
> multiple flash drivers??

In the anonymous CVS repository.

        Andrew

-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-09 13:25       ` Steven_cheng
@ 2005-08-09 10:06         ` Andrew Lunn
  0 siblings, 0 replies; 15+ messages in thread
From: Andrew Lunn @ 2005-08-09 10:06 UTC (permalink / raw)
  To: Steven_cheng; +Cc: ecos-discuss

On Tue, Aug 09, 2005 at 06:05:25PM +0800, Steven_cheng wrote:
> Dear Andrew,
> 
>     I have got the lastest packages from the anonymous CVS repository.
> , but I still can not find the code which supports multiple flash drivers.
> In the redboot\current\src\flash.c, it only initiates one flash driver.
> 
> Can you tell me the way in detail to get the flashv2 branch of eCos  ??
> 
> Thank you ~
> 
> Steven Cheng

I suggest you read the CVS documentation. It tells you all about
branches and how to access them.

        Andrew

-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-09  8:48     ` Andrew Lunn
@ 2005-08-09 13:25       ` Steven_cheng
  2005-08-09 10:06         ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-09 13:25 UTC (permalink / raw)
  To: Andrew Lunn, ecos-discuss

Dear Andrew,

    I have got the lastest packages from the anonymous CVS repository.
, but I still can not find the code which supports multiple flash drivers.
In the redboot\current\src\flash.c, it only initiates one flash driver.

Can you tell me the way in detail to get the flashv2 branch of eCos  ??

Thank you ~

Steven Cheng

> > Dear Andrew,
> > 
> >     Where can I get the flashv2 branch of eCos which supports
> > multiple flash drivers??
> 
> In the anonymous CVS repository.
> 
>         Andrew
> 


-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-29 15:45   ` Steven_cheng
@ 2005-08-29  9:21     ` Andrew Lunn
  2005-08-29 10:37       ` Steven_cheng
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2005-08-29  9:21 UTC (permalink / raw)
  To: Steven_cheng; +Cc: Andrew Lunn, ecos-discuss

On Mon, Aug 29, 2005 at 04:29:19PM +0800, Steven_cheng wrote:
> Hi Andrew,
> 
>     I  have gotten the flashv2 branch of eCos which supports
>  multiple flash drivers at the same time. But I hope I can get the lastest
> code from the
> Anonymous CVS  and use the multiple flash drivers at the same time.
> So I replace the directories "io\flash" and "devs\flash" with ones of
> flashv2 branch.
> 
> But it has error messages:
> undefined reference to "flash_unlock" in redboot_linux_exec.c 116/155
> undefined reference to "flash_lock" in redboot_linux_exec.c 137/155
> 
> But I can not find flash_lick/flash_unlock in redboot_linux_exec.c .

I cannot find any reference either, so the linker is probably
confused.

Anyway, you have two options:

* update your redboot package to the flash_v2 branch.
* enabling the legacy flash API in the flash CDL options.

        Andrew

-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-29  9:21     ` Andrew Lunn
@ 2005-08-29 10:37       ` Steven_cheng
  2005-08-29 12:00         ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-29 10:37 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Andrew Lunn, ecos-discuss

Hi Andrew,

    I have updated my redboot package, then it is compiled OK~
There are two different flash type in my platform, one is intel 
CYGPKG_DEVS_FLASH_STRATA, and the other is 
CYGPKG_DEVS_FLASH_SST_39VFXXX. 
But I find it only CYGPKG_DEVS_FLASH_STRATA be initiated.
And I find that CYGHWR_IO_FLASH_DEVICE = 2.
The cyg_flashdevtab array only has strata information, how can I add
the sst information into cyg_flashdevtab[]??

Thank you~

Steven Cheng


> Anyway, you have two options:
> 
> * update your redboot package to the flash_v2 branch.
> * enabling the legacy flash API in the flash CDL options.
> 
>         Andrew
> 


-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-29 10:37       ` Steven_cheng
@ 2005-08-29 12:00         ` Andrew Lunn
  2005-08-30  6:50           ` [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) Steven_cheng
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2005-08-29 12:00 UTC (permalink / raw)
  To: Steven_cheng; +Cc: ecos-discuss

On Mon, Aug 29, 2005 at 05:46:10PM +0800, Steven_cheng wrote:
> Hi Andrew,
> 
>     I have updated my redboot package, then it is compiled OK~
> There are two different flash type in my platform, one is intel 
> CYGPKG_DEVS_FLASH_STRATA, and the other is 
> CYGPKG_DEVS_FLASH_SST_39VFXXX. 
> But I find it only CYGPKG_DEVS_FLASH_STRATA be initiated.
> And I find that CYGHWR_IO_FLASH_DEVICE = 2.
> The cyg_flashdevtab array only has strata information, how can I add
> the sst information into cyg_flashdevtab[]??

Each flash driver is split into two parts. There is a generic part and
a target specific part. You are probably missing the target specific
part. Take a look at packages/devs/flash/arm/aim711/current

        Andrew

-- 
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] 15+ messages in thread

* Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ?
  2005-08-08 21:02 ` Andrew Lunn
  2005-08-09  0:57   ` Steven_cheng
@ 2005-08-29 15:45   ` Steven_cheng
  2005-08-29  9:21     ` Andrew Lunn
  1 sibling, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-29 15:45 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Hi Andrew,

    I  have gotten the flashv2 branch of eCos which supports
 multiple flash drivers at the same time. But I hope I can get the lastest
code from the
Anonymous CVS  and use the multiple flash drivers at the same time.
So I replace the directories "io\flash" and "devs\flash" with ones of
flashv2 branch.

But it has error messages:
undefined reference to "flash_unlock" in redboot_linux_exec.c 116/155
undefined reference to "flash_lock" in redboot_linux_exec.c 137/155

But I can not find flash_lick/flash_unlock in redboot_linux_exec.c .

Can you give me a suggestion ??

Thank you~

Steven Cheng







> On Mon, Aug 08, 2005 at 12:20:38PM +0800, Steven_cheng wrote:
> > Hello All,
> >
> > In my platform, it supports two flashs with sst29vfxxx and intel_strata.
> > When the cyg_start() of RedBoot calls the do_flash_init(),
> > it only calls the flash_hwr_init() of intel_strata but sst29vfxxx.
> > Then the redboot only disaply the flash info of intel_strata.
> > How can I initial the flashs of sst29vfxxx and intel_strata at
> > do_flash_init() ?
>
> The flash infrastructure in the eCos trunk only supports one flash
> driver. You need to use the flashv2 branch of eCos which supports
> multiple flash drivers at the same time.
>
>         Andrew
>


-- 
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] 15+ messages in thread

* [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590)
  2005-08-29 12:00         ` Andrew Lunn
@ 2005-08-30  6:50           ` Steven_cheng
  2005-08-30  9:00             ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-30  6:50 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Hi Andrew,

    There are two flashs in my platform at the same time, one intel
strata, the other is sst 39vfxxx. But it only one strata flash or vf39xxx
flash can be initiated and work currently.

Q1 : Is only one driver initiated at the same time with multi-driver ??

The flash spec is as following:

chip : sst vf39xxx (Boot ROM)
start : 0xfff00000
end  : 0xfff80000
size  : 512K

chip : intel strata
start : 0x70000000
end  : 0x71000000
size  : 16MB

The target is announced in ecos.db as following:

target px {
 alias  { "Alpha pX PowerPC 8245" px8245 }
 packages        { CYGPKG_HAL_POWERPC
                          CYGPKG_HAL_POWERPC_PPC60x
                          CYGPKG_HAL_POWERPC_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
                          CYGPKG_IO_ETH_DRIVERS
                          CYGPKG_DEVS_ETH_ICPLUS_IP1000
                          CYGPKG_DEVS_ETH_ICXIP1000_POWERPC_PX
        }
        description "
            The pX target provides the packages needed to run
            eCos on the Alpha pX (8245) board."
}

Q2 : And Do I need modify the following code in the
/io/flash/current/src/flash.c ??

cyg_flash_get_info(cyg_uint32 Nth, cyg_flash_info_t * info)
{
  struct cyg_flash_dev * dev;

  if (!init) return CYG_FLASH_ERR_NOT_INIT;

#if (1 == CYGHWR_IO_FLASH_DEVICE)
  if ((0 == Nth) && cyg_flashdevtab[0].init) {
      dev = &(cyg_flashdevtab[0]);
  } else {
      return CYG_FLASH_ERR_INVALID;
  }
#else
  // Only initialized devices are on the list.
  for (dev = flash_head; dev && Nth; dev=dev->next, Nth--)
    ;       <----------------------------------------- Do I need modify  it
????
  if (!dev) {
      return CYG_FLASH_ERR_INVALID;
  }
#endif
  info->start = dev->start;
  info->end = dev->end;
  info->num_block_infos = dev->num_block_infos;
  info->block_info = dev->block_info;
  return CYG_FLASH_ERR_OK;
}

Thank you~~

Steven Cheng

> Each flash driver is split into two parts. There is a generic part and
> a target specific part. You are probably missing the target specific
> part. Take a look at packages/devs/flash/arm/aim711/current
>
>         Andrew
>


-- 
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] 15+ messages in thread

* [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590)
  2005-08-30  6:50           ` [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) Steven_cheng
@ 2005-08-30  9:00             ` Andrew Lunn
  2005-08-30 10:09               ` [ECOS] Re: [ Spam Mail ] [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) " Steven_cheng
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2005-08-30  9:00 UTC (permalink / raw)
  To: Steven_cheng; +Cc: ecos-discuss

On Tue, Aug 30, 2005 at 09:57:08AM +0800, Steven_cheng wrote:
> Hi Andrew,
> 
>     There are two flashs in my platform at the same time, one intel
> strata, the other is sst 39vfxxx. But it only one strata flash or vf39xxx
> flash can be initiated and work currently.
> 
> Q1 : Is only one driver initiated at the same time with multi-driver ??

No, it will initialize all drivers in the table.

> The flash spec is as following:
> 
> chip : sst vf39xxx (Boot ROM)
> start : 0xfff00000
> end  : 0xfff80000
> size  : 512K
> 
> chip : intel strata
> start : 0x70000000
> end  : 0x71000000
> size  : 16MB
> 
> The target is announced in ecos.db as following:
> 
> target px {
>  alias  { "Alpha pX PowerPC 8245" px8245 }
>  packages        { CYGPKG_HAL_POWERPC
>                           CYGPKG_HAL_POWERPC_PPC60x
>                           CYGPKG_HAL_POWERPC_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

This looks OK. Two generic drivers and two specific drivers.

>                           CYGPKG_IO_ETH_DRIVERS
>                           CYGPKG_DEVS_ETH_ICPLUS_IP1000
>                           CYGPKG_DEVS_ETH_ICXIP1000_POWERPC_PX
>         }
>         description "
>             The pX target provides the packages needed to run
>             eCos on the Alpha pX (8245) board."
> }
> 
> Q2 : And Do I need modify the following code in the
> /io/flash/current/src/flash.c ??
> 
> cyg_flash_get_info(cyg_uint32 Nth, cyg_flash_info_t * info)
> {
>   struct cyg_flash_dev * dev;
> 
>   if (!init) return CYG_FLASH_ERR_NOT_INIT;
> 
> #if (1 == CYGHWR_IO_FLASH_DEVICE)
>   if ((0 == Nth) && cyg_flashdevtab[0].init) {
>       dev = &(cyg_flashdevtab[0]);
>   } else {
>       return CYG_FLASH_ERR_INVALID;
>   }
> #else
>   // Only initialized devices are on the list.
>   for (dev = flash_head; dev && Nth; dev=dev->next, Nth--)
>     ;       <----------------------------------------- Do I need modify  it
> ????

No this is correct. The whole point of putting the ; on a new line is
to indicate it is deliberate. If i was to see:

for (dev = flash_head; dev && Nth; dev=dev->next, Nth--);

then i would be suspicious.

What this code is doing is counting along the linked list of devices
to find the N'th device.

Please describe your problem in more detail. What do you see and what
don't you see. Why do you think only one is being initialized?

        Andrew

-- 
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] 15+ messages in thread

* [ECOS] Re: [ Spam Mail ] [ECOS] Re: [ Spam Mail ] Re: [ECOS] 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)
  2005-08-30  9:00             ` Andrew Lunn
@ 2005-08-30 10:09               ` Steven_cheng
  2005-08-30 11:16                 ` Andrew Lunn
  0 siblings, 1 reply; 15+ messages in thread
From: Steven_cheng @ 2005-08-30 10:09 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

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

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

* [ECOS] Re: [ Spam Mail ] [ECOS] Re: [ Spam Mail ] Re: [ECOS] 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)
  2005-08-30 10:09               ` [ECOS] Re: [ Spam Mail ] [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) " Steven_cheng
@ 2005-08-30 11:16                 ` Andrew Lunn
  2005-08-30 11:50                   ` Steven_cheng
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Lunn @ 2005-08-30 11:16 UTC (permalink / raw)
  To: Steven_cheng; +Cc: ecos-discuss

On Tue, Aug 30, 2005 at 05:00:22PM +0800, Steven_cheng wrote:
> 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
> ////////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////////
> ///////

This looks correct. The is nothing in devs/flash/sst/39vfxxx/current
to actually compile. There is only an header file which is inlined. 

> /////////////////////////////////
> 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."
>     }
> }

This looks OK.

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

It should not make a difference. 

Could i see your  powerpc_px_flash_sst.c

        Andrew

-- 
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] 15+ messages in thread

* Re: [ECOS] Re: [ Spam Mail ] [ECOS] Re: [ Spam Mail ] Re: [ECOS] 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)
  2005-08-30 11:16                 ` Andrew Lunn
@ 2005-08-30 11:50                   ` Steven_cheng
  0 siblings, 0 replies; 15+ messages in thread
From: Steven_cheng @ 2005-08-30 11:50 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Hi Andrew,

    Thanks for your help.

The following is my powerpc_px_flash_sst.c

///////////////////////////////// powerpc_px_flash_sst.c
////////////////////////////////////////////////////////////////////////////

#include <pkgconf/devs_flash_powerpc_px.h>

#if (CYGNUM_DEVS_FLASH_POWERPC_PX_SIZE == 512)

#define CYGPKG_DEVS_FLASH_SST_39VF040
#define CYGNUM_FLASH_INTERLEAVE (1)
#define CYGNUM_FLASH_SERIES (1)
#define CYGNUM_FLASH_BASE  (0xFFF00000u)

#include "cyg/io/flash_sst_39vfxxx.inl"

#elif (CYGNUM_DEVS_FLASH_POWERPC_PX_SIZE == 1024)

#define CYGPKG_DEVS_FLASH_SST_39VF080
#define CYGNUM_FLASH_INTERLEAVE (1)
#define CYGNUM_FLASH_SERIES (1)
#define CYGNUM_FLASH_BASE  (0xFFF00000u)

#include "cyg/io/flash_sst_39vfxxx.inl"

#elif (CYGNUM_DEVS_FLASH_POWERPC_PX_SIZE == 2048)

#define CYGPKG_DEVS_FLASH_SST_39VF016
#define CYGNUM_FLASH_INTERLEAVE (1)
#define CYGNUM_FLASH_SERIES (1)
#define CYGNUM_FLASH_BASE  (0xFFF00000u)

#include "cyg/io/flash_sst_39vfxxx.inl"
#endif

static const cyg_flash_block_info_t cyg_flash_sst_block_info[1] = {
    { FLASH_BLOCK_SIZE, FLASH_NUM_REGIONS * CYGNUM_FLASH_SERIES }
};

CYG_FLASH_DRIVER(cyg_flash_sst_flashdev,
                 &cyg_sst_funs,
                 0,                     // Flags
                 CYGNUM_FLASH_BASE,     // Start
                 CYGNUM_FLASH_BASE + (FLASH_BLOCK_SIZE * FLASH_NUM_REGIONS *
CYGNUM_FLASH_SERIES) - 1,    // End
                 1,                     // Number of block infos
                 cyg_flash_sst_block_info,
                 NULL                   // priv
    );
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////


> Could i see your  powerpc_px_flash_sst.c
>
>         Andrew
>

The following is the packages announced in ecos.db

Q1 : Can the flash packages be defined in the different CDL file ??

///////////////////////////////// ecos.db
////////////////////////////////////////////////////////////////////////////

package CYGPKG_DEVS_FLASH_SST_POWERPC_PX {
 alias   { "SST39VF040 FLASH memory support for Alpha pX PowerPC 8245 board"
flash_sst_px }
 directory devs/flash/powerpc/px
 script  flash_sst_powerpc_px.cdl
 hardware
        description "
           This package contains hardware support for SST39VF040 FLASH
memory
    on the Alpha pX (PowerPC 8245) board."
}

package CYGPKG_DEVS_FLASH_STRATA_POWERPC_PX {
 alias   { "Intel STRATA 28F128 FLASH memory support for Alpha pX PowerPC
8245 board" flash_strata_px }
 directory devs/flash/powerpc/px
 script  flash_strata_powerpc_px.cdl
 hardware
        description "
           This package contains hardware support for Intel 28F128 FLASH
memory
    on the Alpha pX (PowerPC 8245) board."
}

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


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

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

end of thread, other threads:[~2005-08-30 11:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-08  4:19 [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? Steven_cheng
2005-08-08 21:02 ` Andrew Lunn
2005-08-09  0:57   ` Steven_cheng
2005-08-09  8:48     ` Andrew Lunn
2005-08-09 13:25       ` Steven_cheng
2005-08-09 10:06         ` Andrew Lunn
2005-08-29 15:45   ` Steven_cheng
2005-08-29  9:21     ` Andrew Lunn
2005-08-29 10:37       ` Steven_cheng
2005-08-29 12:00         ` Andrew Lunn
2005-08-30  6:50           ` [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) Steven_cheng
2005-08-30  9:00             ` Andrew Lunn
2005-08-30 10:09               ` [ECOS] Re: [ Spam Mail ] [ECOS] Re: [ Spam Mail ] Re: [ECOS] How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590) " Steven_cheng
2005-08-30 11:16                 ` Andrew Lunn
2005-08-30 11:50                   ` Steven_cheng

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).