This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: printf debugging using serial
- To: Dave Airlie <airlied at parthus dot com>
- Subject: Re: [ECOS] printf debugging using serial
- From: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Date: Mon, 26 Jun 2000 16:03:49 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <Pine.LNX.4.21.0006261539400.20460-100000@limerickpc103>
Dave Airlie wrote:
>
> Hi,
> I've a PID board with 2 serial ports, I'm using one for code
> download and debugging, and the other for my application, does using
> printf affect the use of the second serial port heavily? do interrupts get
> turned off when I'm in printf, I've noticed a lot greater byte loss when
> using debugging ..
Not in printf itself, but obviously it will use the underlying serial
driver, which will have interrupts disabled for a while while processing
the interrupt. I wouldn't have thought it would be too bad though because
the two ports have separate interrupt lines.
But the most likely reason is the GDB stub, which runs with interrupts
disabled. So if you minimize use of GDB (i.e. don't let it stop your
program very often), that should minimize the lost interrupts.
> Any suggestions on how to work around apart from binary debugging using
> LEDS :-)
You could sprintf into a static buffer. But if you are going to do that, it
may be even easier to use the tracing functions in
packages/infra/VERSION/include/cyg_trac.h. You can configure that for
buffered tracing.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault