public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]
@ 2001-06-12 21:51 Piteir
  2002-08-21  9:31 ` [ECOS] Robert Cragie
  0 siblings, 1 reply; 4+ messages in thread
From: Piteir @ 2001-06-12 21:51 UTC (permalink / raw)
  To: ECOS

Hi,

I always failed to download hello example in srec
format the hello example that I compile in cygwin size
is 1029KB and I create srec format using

arm-elf-objcopy -O hello.exe hello.srec

the hello.srec size only 178KB from hello.exe 1029KB
Is the arm-elf-objcopy produce an error result?

Thanks
Piteir

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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

* RE: [ECOS]
  2001-06-12 21:51 [ECOS] Piteir
@ 2002-08-21  9:31 ` Robert Cragie
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Cragie @ 2002-08-21  9:31 UTC (permalink / raw)
  To: Piteir, ecos-discuss

> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [ mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Piteir
> Sent: 13 June 2001 05:51
> To: ECOS
> Subject: [ECOS]
> 
> 
> Hi,
> 
> I always failed to download hello example in srec
> format the hello example that I compile in cygwin size
> is 1029KB and I create srec format using
> 
> arm-elf-objcopy -O hello.exe hello.srec

Shouldn't that be:

arm-elf-objcopy -S -O srec hello.exe hello.srec

> 
> the hello.srec size only 178KB from hello.exe 1029KB
> Is the arm-elf-objcopy produce an error result?
> 
> Thanks
> Piteir
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/

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

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

* [ECOS] `
  2008-06-11  6:30   ` I-Yanaslov
@ 2008-06-11 10:12     ` Jürgen Lambrecht
  0 siblings, 0 replies; 4+ messages in thread
From: Jürgen Lambrecht @ 2008-06-11 10:12 UTC (permalink / raw)
  To: I-Yanaslov; +Cc: ecos-discuss, Andrew Lunn

I-Yanaslov wrote:
>
> ----- Original Message ----- From: "Jürgen Lambrecht" 
> <J.Lambrecht@televic.com>
> To: <ecos-discuss@ecos.sourceware.org>
> Cc: "Andrew Lunn" <andrew@lunn.ch>; "I-Yanaslov" 
> <yanaslov_iv@ic-bresler.ru>
> Sent: Tuesday, June 10, 2008 8:11 PM
> Subject: Re: [ECOS] "packets eaten" with AT91 EMAC Ethernet driver
>
>
>> Lambrecht Jürgen wrote:
>
>> Indeed, that was the problem:
>> Wrong code in at91_eth_deliver():
>>
>>   if (tsr&AT91_EMAC_TSR_COMP) //5
>>   {
>>      at91_reset_tbd(priv);
>>      _eth_drv_tx_done(sc,priv->curr_tx_key,0);
>>      priv->tx_busy = false;
>>   }
>>
>> Correct code:
>>   {
>>      at91_reset_tbd(priv, b_reset_tbd_idx);
>>      priv->tx_busy = false;
>>      _eth_drv_tx_done(sc,priv->curr_tx_key,0);
>>   }
>>
>> If the low-level driver is available (can_send() returns not zero) 
>> then the first packet is sent.
>> If the low-level driver is not available it stops here. It is 
>> supposed that the low-level driver will inform then the middleware 
>> when it is ready by calling tx_done.
>> eth_drv_tx_done on its turn calls eth_drv_send() which then checks 
>> again can_send()
>>
>> The AT91 driver first called tx_done, calling send calling can_send 
>> which returns 0 of course.
>> And afterwards - too late - busy is set to true, so that can_send can 
>> return 1...
>
> "priv->tx_busy = false;" is not consumes many time.
indeed
> So, ISR is better place to do it.
> Than, TX driver becomes to ready (can_send() returns 1 ) just at 
> moment whan a HW becomes to ready, even if DSR and __eth_drv_tx_done() 
> is still running.
>
Yes, that could be a good idea.
I can only think of 1 problem:

The moment you set "priv->tx_busy = false;", packets can be sent. And if 
the TCP/IP stack has new data to send (e.g. because of a new RX), it 
will call send(), and then finally the transmit status bits in the TSR 
register can be overwritten before at91_eth_deliver() has read out the 
TSR register for the previous packet.
This should not be possible, if at91_eth_deliver() runs in DSR context, 
because a DSR will always run before "normal" functions.
But I don't think at91_eth_deliver() is called under DSR context.

This is the call stack:
The DSR is /io/eth/current/src/net/eth_drv.c::eth_drv_dsr() ->
/net/bsd_tcpip/current/src/ecos/timeout.c::ecos_synch_eth_drv_dsr() 
{cyg_flag_setbits( &alarm_flag, 2 ); }
This flags the alarm-flag of the alarm_thread() (cyg_flag_wait(..)) ->
/io/eth/current/src/net/eth_drv_run_deliveries() -> at91_eth_deliver()

When the alarm-flag is flagged by the DSR function, the scheduler wakes 
up the alarm thread, but is this alarm_thread() still run under DSR 
context???

I don't think so.
deliver() is meant to run under thread context and not DSR context, 
because all the copying and buffer handling takes too long for DSR 
context (?).

Kind regards,
Jürgen

> Ivan.
>
>
>



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

* [ECOS]  ÄãÏëÔÚÊé³ÇÅÔÓиöÕÐÉúµã»ò°ìÊ´¦Âð£¿
@ 2005-01-16  5:40 any
  0 siblings, 0 replies; 4+ messages in thread
From: any @ 2005-01-16  5:40 UTC (permalink / raw)
  To: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

    ÄãÏëÔÚÊé³ÇÅÔÓиöÕÐÉúµã»ò°ìÊ´¦Âð£¿Ç뾡¿ìÓëÎÒ¹«Ë¾ÁªÏµ£¬ÊʺÏÕÐÉú¡¢×Éѯ¡¢Æ±Îñ¡¢¹«Ë¾°ìÊ´¦µÈ£¬½»Í¨Ê®·Ö·½±ã£¬ÓÐн¨µÄµØÌú£¬ºóÃæÊÇÍòÏó³Ç£¬¶ÔÃæÊǵØÍõ£¬ÓµÓÐСС°ì¹«µã£¬´´ÔìÎÞÏÞÉÌ»ú£¡Ã¿¸öС°ì¹«ÊÒÖ»ÐèÒª2000Ôª/Ô£¬³¬Öµ£¡£¡Ãû¶îÓÐÏÞ£¬Ïȵ½Ïȵã¡    ÁªÏµ£º13631681932

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

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

end of thread, other threads:[~2008-06-11 10:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-12 21:51 [ECOS] Piteir
2002-08-21  9:31 ` [ECOS] Robert Cragie
2005-01-16  5:40 [ECOS] ÄãÏëÔÚÊé³ÇÅÔÓиöÕÐÉúµã»ò°ìÊ´¦Â𣿠any
2008-06-09 20:55 [ECOS] "packets eaten" with AT91 EMAC Ethernet driver Lambrecht Jürgen
2008-06-10 16:11 ` Jürgen Lambrecht
2008-06-11  6:30   ` I-Yanaslov
2008-06-11 10:12     ` [ECOS] ` Jürgen Lambrecht

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