public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] AT91SAM7X256--flash can not Initialise?
@ 2008-03-12 10:10 venice
  2008-03-12 10:24 ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: venice @ 2008-03-12 10:10 UTC (permalink / raw)
  To: ecos-discuss

Hi, everyone,  my board is something similar to the public board 
AT91SAM7X256. When I joined the packages "FLASH memory support for Atmel 
AT91 EFC." and "Generic FLASH memory support."  the redboot get hints like 
that:

    +Sorry, FLASH config exceeds available space in FIS directory

AT91_ETH: Initialising @ fffdc000
AT91_ETH - Warning! ESA unknown
AT91_ETH: 12:34:56:78:9a:bc
AT91_ETH: 10Mbyte/s Half Duplex
Ethernet eth0: MAC address 12:34:56:78:9a:bc
IP: 192.168.0.230/255.255.255.0, Gateway: 192.168.0.1
Default server: 0.0.0.0
.........................

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot>


But actually the redboot can write the flash well(I have experimented) but I 
can not use fis init to finish the initialization, neither can I do the 
"fc -i" .

So, is there something wrong in the configuration? I have tried many ways 
but I cannot solve this problem!


BTW:
    The at91sam7x256 has only 64k ram, but my applications are too big to 
download to the ram  and I cannot debug them, so any good idea to fix that?

Thanks for your help!

venice 


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

* Re: [ECOS] AT91SAM7X256--flash can not Initialise?
  2008-03-12 10:10 [ECOS] AT91SAM7X256--flash can not Initialise? venice
@ 2008-03-12 10:24 ` Andrew Lunn
       [not found]   ` <6B6125D574D6450EA59CE4808655B339@veniceuurg>
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2008-03-12 10:24 UTC (permalink / raw)
  To: venice; +Cc: ecos-discuss

On Wed, Mar 12, 2008 at 06:09:37PM +0800, venice wrote:
> Hi, everyone,  my board is something similar to the public board  
> AT91SAM7X256. When I joined the packages "FLASH memory support for Atmel  
> AT91 EFC." and "Generic FLASH memory support."  the redboot get hints 
> like that:
>
>    +Sorry, FLASH config exceeds available space in FIS directory
>
> AT91_ETH: Initialising @ fffdc000
> AT91_ETH - Warning! ESA unknown
> AT91_ETH: 12:34:56:78:9a:bc
> AT91_ETH: 10Mbyte/s Half Duplex
> Ethernet eth0: MAC address 12:34:56:78:9a:bc
> IP: 192.168.0.230/255.255.255.0, Gateway: 192.168.0.1
> Default server: 0.0.0.0
> .........................
>
> RedBoot> fis list
> Name              FLASH addr  Mem addr    Length      Entry point
> RedBoot>
>
>
> But actually the redboot can write the flash well(I have experimented) 
> but I can not use fis init to finish the initialization, neither can I do 
> the "fc -i" .
>
> So, is there something wrong in the configuration? I have tried many ways 
> but I cannot solve this problem!

Are you using combined FIS and CFG in one flash block? The flash
blocks are too small for this.

> BTW:
>    The at91sam7x256 has only 64k ram, but my applications are too big to  
> download to the ram  and I cannot debug them, so any good idea to fix 
> that?

My personal opinion is that using Redboot on these devices does not
make sense. The FLASH and RAM is too small. I would simply use an eCos
ROM application which directly boots without using a boot loader. I
would suggest using a JTAG device to program your application into
FLASH. You are going to need a JTAG device to debug your application
anyway since your application is running from ROM so you need to use
hardware breakpoints, which the gdb stub in RedBoot does not support.

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

* Re: [ECOS] AT91SAM7X256--flash can not Initialise?
       [not found]   ` <6B6125D574D6450EA59CE4808655B339@veniceuurg>
@ 2008-03-12 11:29     ` Andrew Lunn
  2008-03-12 11:37       ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2008-03-12 11:29 UTC (permalink / raw)
  To: venice; +Cc: eCos Disuss

>> Are you using combined FIS and CFG in one flash block? The flash
>> blocks are too small for this.
>
> yes,the default option is on and if I turn if off the redboot doesn't work!

Define "does not work".

> The block size of the flash is 256 Bytes, and I have assigned 8 blocks to 
> hold the information.

How did you define 8 blocks? Redboot only supports one block for FIS
and one for CONFIG.

> ATMEL has provide tools to program the *.bin to the internal flash but  
> sometimes I still need debug my drivers alone.
> Can the MDK implement that function ?
> If I remove the redboot  how can I build the eCos ROM application which  
> directly boots without using a boot loader?

Redboot is an eCos ROM application which does not require a bootloader.

Just keep the CYG_HAL_STARTUP value at its default of ROM and your
application can then be put directly into flash at 0x00100000 and it
will boot.

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

* Re: [ECOS] AT91SAM7X256--flash can not Initialise?
  2008-03-12 11:29     ` Andrew Lunn
@ 2008-03-12 11:37       ` Gary Thomas
  2008-03-12 11:55         ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2008-03-12 11:37 UTC (permalink / raw)
  To: Andrew Lunn, eCos Disuss

Andrew Lunn wrote:
>>> Are you using combined FIS and CFG in one flash block? The flash
>>> blocks are too small for this.
>> yes,the default option is on and if I turn if off the redboot doesn't work!
> 
> Define "does not work".
> 
>> The block size of the flash is 256 Bytes, and I have assigned 8 blocks to 
>> hold the information.
> 
> How did you define 8 blocks? Redboot only supports one block for FIS
> and one for CONFIG.

Not true, unless this has broken in recent times.  I added the ability
for either of these (certainly the FIS directory) to span multiple blocks
when I did the MOAB which uses NAND FLASH with small (256 byte) blocks.

>> ATMEL has provide tools to program the *.bin to the internal flash but  
>> sometimes I still need debug my drivers alone.
>> Can the MDK implement that function ?
>> If I remove the redboot  how can I build the eCos ROM application which  
>> directly boots without using a boot loader?
> 
> Redboot is an eCos ROM application which does not require a bootloader.
> 
> Just keep the CYG_HAL_STARTUP value at its default of ROM and your
> application can then be put directly into flash at 0x00100000 and it
> will boot.


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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

* Re: [ECOS] AT91SAM7X256--flash can not Initialise?
  2008-03-12 11:37       ` Gary Thomas
@ 2008-03-12 11:55         ` Andrew Lunn
  2008-03-12 12:07           ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2008-03-12 11:55 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Andrew Lunn, eCos Disuss

> Not true, unless this has broken in recent times.  I added the ability
> for either of these (certainly the FIS directory) to span multiple blocks
> when I did the MOAB which uses NAND FLASH with small (256 byte) blocks.

[Humm, goes and looks at the code]

                cdl_option CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE {
                    display         "Size of FIS directory entry"
                    flavor              data
                    default_value   256
                    description "
                      The FIS directory is limited to one single flash
                      sector. If your flash has tiny sectors, you may wish
                      to reduce this value in order to get more slots in
                      the FIS directory."
                }

There is similar such wording in a few places. This is what made me
think you can only have one flash block. 

However the code does seem to support multiple books. It would be nice
to clean up the CDL descriptions.

I guess the posters problem is his FIS and CFG blocks overlap?

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

* Re: [ECOS] AT91SAM7X256--flash can not Initialise?
  2008-03-12 11:55         ` Andrew Lunn
@ 2008-03-12 12:07           ` Gary Thomas
  0 siblings, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2008-03-12 12:07 UTC (permalink / raw)
  To: Andrew Lunn, eCos Disuss

Andrew Lunn wrote:
>> Not true, unless this has broken in recent times.  I added the ability
>> for either of these (certainly the FIS directory) to span multiple blocks
>> when I did the MOAB which uses NAND FLASH with small (256 byte) blocks.
> 
> [Humm, goes and looks at the code]
> 
>                 cdl_option CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE {
>                     display         "Size of FIS directory entry"
>                     flavor              data
>                     default_value   256
>                     description "
>                       The FIS directory is limited to one single flash
>                       sector. If your flash has tiny sectors, you may wish
>                       to reduce this value in order to get more slots in
>                       the FIS directory."
>                 }
> 
> There is similar such wording in a few places. This is what made me
> think you can only have one flash block. 
> 
> However the code does seem to support multiple books. It would be nice
> to clean up the CDL descriptions.

I'll see what I can do.

> I guess the posters problem is his FIS and CFG blocks overlap?

Not clear at all.  The original message did not show the lines which
describe the size and layout of the FLASH, e.g.
   FLASH: 0xf0000000 - 0xf2000000, 256 blocks of 0x00020000 bytes each.

Without this information (or having such a platform myself), it's
hard to tell what the problem is.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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

* Re: [ECOS] AT91SAM7X256--flash can not Initialise?
@ 2008-03-19  9:38 venice
  0 siblings, 0 replies; 7+ messages in thread
From: venice @ 2008-03-19  9:38 UTC (permalink / raw)
  To: ecos-discuss


--------------------------------------------------
From: "Andrew Lunn" <andrew@lunn.ch>
Sent: Tuesday, March 18, 2008 5:09 PM
To: "venice" <venice.tu@live.com>; "eCos Disuss"
<ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] the freebsd stack influence the program"hello world"?

>> The correct way to do this should be:
>>
>> ecosconfig new at91sam7xek lwip_eth
>>
>> However, the resulting tree then fails to build. There was a fix to
>> realloc a while ago which changed a memcpy to a memmove and how there
>> are undefined symbols. I need to look at this and work out why.
>
> ecosconfig new at91sam7xek lwip_eth
> ecosconfig add libc_string
> ecosconfig tree
>
> should work.
>
>       Andrew
>



Actually the building packages include packages begin with "ISO ..."  , so
the libc_string package is ready in the building packages and the conflicts
are just the same as before.

/ecos-d/ecos/ecos/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl, package
CYGPKG_NET_LWIP: error
    Interface `CYGPKG_NET_STACK' cannot be loaded.
    The name is already in use.
/ecos-d/ecos/ecos/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl, package
CYGPKG_NET_LWIP: error
    Interface `CYGPKG_NET_STACK_INET' cannot be loaded.
    The name is already in use.
/ecos-d/ecos/ecos/packages/net/lwip_tcpip/current/cdl/lwip_net.cdl, package
CYGPKG_NET_LWIP: error
    Interface `CYGPKG_NET_STACK_INET6' cannot be loaded.
    The name is already in use.

BTW: How much memory will the lwip stack take? The at91sam7x256 has only 64k
ram and I don't know whether it's suitable for some internet applications.
Maybe I will get another arm board to develop the product. Any suggestion is
welcome, thanks!

Regards,
Venice 


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

end of thread, other threads:[~2008-03-19  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12 10:10 [ECOS] AT91SAM7X256--flash can not Initialise? venice
2008-03-12 10:24 ` Andrew Lunn
     [not found]   ` <6B6125D574D6450EA59CE4808655B339@veniceuurg>
2008-03-12 11:29     ` Andrew Lunn
2008-03-12 11:37       ` Gary Thomas
2008-03-12 11:55         ` Andrew Lunn
2008-03-12 12:07           ` Gary Thomas
2008-03-19  9:38 venice

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