public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Debug messages through serial communication port
@ 2001-08-28 23:06 Cristiano Ligieri Pereira
  2001-08-29  6:24 ` Grant Edwards
  2001-08-29  9:54 ` Trenton D. Adams
  0 siblings, 2 replies; 10+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-28 23:06 UTC (permalink / raw)
  To: ecos-discuss

Hi folks,

I'm using a bunch of diag_printf messages in order to debug my application
running on my new XScale board port. After printing some messages the
systems freezes for a while and then continues executing. It looks like
some buffer gets full and time is taken to flush it. For a very simple
application, which basically loops forever and prints some messages after
every tick (using cyg_thread_delay(1)) this is happening. The same
application running on the iPaq works fine (and I'm also sending messages
through the serial in a 1 tick basis).

Any guess on what might be causing my system to freeze? Is there any
buffer in which diag_printf messages are put into?

Thanks,
Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

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

* Re: [ECOS] Debug messages through serial communication port
  2001-08-28 23:06 [ECOS] Debug messages through serial communication port Cristiano Ligieri Pereira
@ 2001-08-29  6:24 ` Grant Edwards
  2001-08-29  9:48   ` Cristiano Ligieri Pereira
  2001-08-29  9:54 ` Trenton D. Adams
  1 sibling, 1 reply; 10+ messages in thread
From: Grant Edwards @ 2001-08-29  6:24 UTC (permalink / raw)
  To: Cristiano Ligieri Pereira; +Cc: ecos-discuss

On Tue, Aug 28, 2001 at 11:05:42PM -0700, Cristiano Ligieri Pereira wrote:

> Any guess on what might be causing my system to freeze? Is there any
> buffer in which diag_printf messages are put into?

No.

Unless you've done something radically different in your HAL,
diag_printf() output is not buffered at all.

-- 
Grant Edwards
grante@visi.com

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

* Re: [ECOS] Debug messages through serial communication port
  2001-08-29  6:24 ` Grant Edwards
@ 2001-08-29  9:48   ` Cristiano Ligieri Pereira
  0 siblings, 0 replies; 10+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-29  9:48 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

No. I haven't. Just to be a little bit more specific, this problem is
_only_ happening when I print something and have cyg_thread_delay()
functions calls as well. What's happening is that the delays take much
longer than they should and I still have no clue why... If there is no
cyg_thread_delay() it works fine.

Thanks anyways,
Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

On Wed, 29 Aug 2001, Grant Edwards wrote:

> On Tue, Aug 28, 2001 at 11:05:42PM -0700, Cristiano Ligieri Pereira wrote:
> 
> > Any guess on what might be causing my system to freeze? Is there any
> > buffer in which diag_printf messages are put into?
> 
> No.
> 
> Unless you've done something radically different in your HAL,
> diag_printf() output is not buffered at all.
> 
> -- 
> Grant Edwards
> grante@visi.com
> 

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

* RE: [ECOS] Debug messages through serial communication port
  2001-08-28 23:06 [ECOS] Debug messages through serial communication port Cristiano Ligieri Pereira
  2001-08-29  6:24 ` Grant Edwards
@ 2001-08-29  9:54 ` Trenton D. Adams
  2001-08-29 10:01   ` Cristiano Ligieri Pereira
  2001-08-29 10:31   ` Cristiano Ligieri Pereira
  1 sibling, 2 replies; 10+ messages in thread
From: Trenton D. Adams @ 2001-08-29  9:54 UTC (permalink / raw)
  To: 'Cristiano Ligieri Pereira', ecos-discuss

I have the same problem.  It doesn't bother me that much so I haven't
bothered to figure out why it's happening.

I have a series of diag_printfs with cyg_thread_delays in between.  It
appears as if all the cyg_thread_delays are run through first, and then
the diag_printfs.  I don't know why this would happen, but it does.  Is
this similar to your problem?

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[ mailto:ecos-discuss-owner@sources.redhat.com ] On Behalf Of Cristiano
Ligieri Pereira
Sent: Wednesday, August 29, 2001 12:06 AM
To: ecos-discuss@sourceware.cygnus.com
Subject: [ECOS] Debug messages through serial communication port



Hi folks,

I'm using a bunch of diag_printf messages in order to debug my
application
running on my new XScale board port. After printing some messages the
systems freezes for a while and then continues executing. It looks like
some buffer gets full and time is taken to flush it. For a very simple
application, which basically loops forever and prints some messages
after
every tick (using cyg_thread_delay(1)) this is happening. The same
application running on the iPaq works fine (and I'm also sending
messages
through the serial in a 1 tick basis).

Any guess on what might be causing my system to freeze? Is there any
buffer in which diag_printf messages are put into?

Thanks,
Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

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

* RE: [ECOS] Debug messages through serial communication port
  2001-08-29  9:54 ` Trenton D. Adams
@ 2001-08-29 10:01   ` Cristiano Ligieri Pereira
  2001-08-29 10:31   ` Cristiano Ligieri Pereira
  1 sibling, 0 replies; 10+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-29 10:01 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: ecos-discuss

It looks similar. But my feeling is that the messages are interfering in
the delays because the messages come out quite slowly. I would like at
least to understand why that is happening. And of course it would be nice
to fix it. :-)

Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

On Wed, 29 Aug 2001, Trenton D. Adams wrote:

> I have the same problem.  It doesn't bother me that much so I haven't
> bothered to figure out why it's happening.
> 
> I have a series of diag_printfs with cyg_thread_delays in between.  It
> appears as if all the cyg_thread_delays are run through first, and then
> the diag_printfs.  I don't know why this would happen, but it does.  Is
> this similar to your problem?
> 
> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [ mailto:ecos-discuss-owner@sources.redhat.com ] On Behalf Of Cristiano
> Ligieri Pereira
> Sent: Wednesday, August 29, 2001 12:06 AM
> To: ecos-discuss@sourceware.cygnus.com
> Subject: [ECOS] Debug messages through serial communication port
> 
> 
> 
> Hi folks,
> 
> I'm using a bunch of diag_printf messages in order to debug my
> application
> running on my new XScale board port. After printing some messages the
> systems freezes for a while and then continues executing. It looks like
> some buffer gets full and time is taken to flush it. For a very simple
> application, which basically loops forever and prints some messages
> after
> every tick (using cyg_thread_delay(1)) this is happening. The same
> application running on the iPaq works fine (and I'm also sending
> messages
> through the serial in a 1 tick basis).
> 
> Any guess on what might be causing my system to freeze? Is there any
> buffer in which diag_printf messages are put into?
> 
> Thanks,
> Cristiano.
> 
> ------------------------------------------------------------
> Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
> 
> 

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

* RE: [ECOS] Debug messages through serial communication port
  2001-08-29  9:54 ` Trenton D. Adams
  2001-08-29 10:01   ` Cristiano Ligieri Pereira
@ 2001-08-29 10:31   ` Cristiano Ligieri Pereira
  2001-09-06 13:46     ` Jonathan Larmour
  1 sibling, 1 reply; 10+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-29 10:31 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: ecos-discuss

The faster the clock tick, the worse the problem. I think i'll have to
live with that, store my debugging info on memory and dump it once and a
while.

Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

On Wed, 29 Aug 2001, Trenton D. Adams wrote:

> I have the same problem.  It doesn't bother me that much so I haven't
> bothered to figure out why it's happening.
> 
> I have a series of diag_printfs with cyg_thread_delays in between.  It
> appears as if all the cyg_thread_delays are run through first, and then
> the diag_printfs.  I don't know why this would happen, but it does.  Is
> this similar to your problem?

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

* Re: [ECOS] Debug messages through serial communication port
  2001-08-29 10:31   ` Cristiano Ligieri Pereira
@ 2001-09-06 13:46     ` Jonathan Larmour
  2001-09-06 17:21       ` Cristiano Ligieri Pereira
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Larmour @ 2001-09-06 13:46 UTC (permalink / raw)
  To: Cristiano Ligieri Pereira; +Cc: Trenton D. Adams, ecos-discuss

Cristiano Ligieri Pereira wrote:
> 
> The faster the clock tick, the worse the problem. I think i'll have to
> live with that, store my debugging info on memory and dump it once and a
> while.

If you're using GDB, then the GDB stubs in your program will be waiting for
an ack from GDB after every line is output. This all happens with
interrupts disabled.

The cumulative effect of that may be what the problem is.

Also there is a certain amount of buffering in the diag code, in as much as
it waits for a newline, but that's all.

Jifl
 
> On Wed, 29 Aug 2001, Trenton D. Adams wrote:
> 
> > I have the same problem.  It doesn't bother me that much so I haven't
> > bothered to figure out why it's happening.
> >
> > I have a series of diag_printfs with cyg_thread_delays in between.  It
> > appears as if all the cyg_thread_delays are run through first, and then
> > the diag_printfs.  I don't know why this would happen, but it does.  Is
> > this similar to your problem?

-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* Re: [ECOS] Debug messages through serial communication port
  2001-09-06 13:46     ` Jonathan Larmour
@ 2001-09-06 17:21       ` Cristiano Ligieri Pereira
  2001-09-06 17:25         ` Jonathan Larmour
  0 siblings, 1 reply; 10+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-09-06 17:21 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Trenton D. Adams, ecos-discuss

Therefore I cannot get away from this "problem"?

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

> If you're using GDB, then the GDB stubs in your program will be waiting for
> an ack from GDB after every line is output. This all happens with
> interrupts disabled.
> 
> The cumulative effect of that may be what the problem is.
> 
> Also there is a certain amount of buffering in the diag code, in as much as
> it waits for a newline, but that's all.

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

* Re: [ECOS] Debug messages through serial communication port
  2001-09-06 17:21       ` Cristiano Ligieri Pereira
@ 2001-09-06 17:25         ` Jonathan Larmour
  2001-09-07  7:19           ` Grant Edwards
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Larmour @ 2001-09-06 17:25 UTC (permalink / raw)
  To: Cristiano Ligieri Pereira; +Cc: ecos-discuss

Cristiano Ligieri Pereira wrote:
> 
> Therefore I cannot get away from this "problem"?

On a production system you won't have GDB on the other end, and there won't
be any delays. But to use GDB, that's the rules we have to play with I'm
afraid.

Although... if have a second port, you could configure eCos to send the
diag output out that instead.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* Re: [ECOS] Debug messages through serial communication port
  2001-09-06 17:25         ` Jonathan Larmour
@ 2001-09-07  7:19           ` Grant Edwards
  0 siblings, 0 replies; 10+ messages in thread
From: Grant Edwards @ 2001-09-07  7:19 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Cristiano Ligieri Pereira, ecos-discuss

On Fri, Sep 07, 2001 at 01:26:36AM +0100, Jonathan Larmour wrote:
> Cristiano Ligieri Pereira wrote:
> > 
> > Therefore I cannot get away from this "problem"?
> 
> On a production system you won't have GDB on the other end, and there won't
> be any delays. But to use GDB, that's the rules we have to play with I'm
> afraid.
> 
> Although... if have a second port, you could configure eCos to send the
> diag output out that instead.

That's what I do.  I've got two "extra" serial ports.
diag_printf() output goes to one, and gdb uses the other.  It
works very nicely that way.  Well, I do have some things I need
to fix to get gdb to work right, but that's another thread.

-- 
Grant Edwards
grante@visi.com

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

end of thread, other threads:[~2001-09-07  7:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-28 23:06 [ECOS] Debug messages through serial communication port Cristiano Ligieri Pereira
2001-08-29  6:24 ` Grant Edwards
2001-08-29  9:48   ` Cristiano Ligieri Pereira
2001-08-29  9:54 ` Trenton D. Adams
2001-08-29 10:01   ` Cristiano Ligieri Pereira
2001-08-29 10:31   ` Cristiano Ligieri Pereira
2001-09-06 13:46     ` Jonathan Larmour
2001-09-06 17:21       ` Cristiano Ligieri Pereira
2001-09-06 17:25         ` Jonathan Larmour
2001-09-07  7:19           ` Grant Edwards

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