This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: printf in Redboot/GDB
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: Scott Dattalo <scott at dattalo dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 10 Oct 2002 18:14:17 -0600
- Subject: Re: [ECOS] printf in Redboot/GDB
- References: <Pine.LNX.4.44.0210101653140.13671-100000@ruckus.brouhaha.com>
On Thu, 2002-10-10 at 18:11, Scott Dattalo wrote:
> On 10 Oct 2002, Gary Thomas wrote:
>
> > On Thu, 2002-10-10 at 17:40, Scott Dattalo wrote:
> > >
> > > The question is which option in the ecos.ecc config file enables printf
> > > output?
> > >
> > > I've built redboot for my custom hardware - something like an EB40a, but
> > > not. (I'm not using Thomas' or Tim's patches at the moment, but look
> > > forward to doing so soon [meanwhile I've hacked the eb40 port to remove
> > > the hardcoded memory constants]). I've selected the redboot_ROM target;
> > > i.e. redboot runs in flash. I've got gdb talking to the board and I can
> > > debug just fine - except that printf's don't print.
> > >
> > > >From what I've read, it would seem that
> > >
> > > CYGDBG_HAL_DIAG_TO_DEBUG_CHAN
> > >
> > > is the cdl component that needs to be enabled.
> > >
> > >
> > > One more observation: when I run redboot out of RAM and not ROM, the
> > > printfs do work. Is there some kind of issue with CYG_HAL_STARTUP being
> > > set to ROM instead of RAM that affects the printf's?
> >
> > Are you trying to use 'printf()', as opposed to 'diag_printf()'?
>
> Um, I am now. diag_printf() works! Thanks!
>
> What's interesting is that I can now also interrupt the execution of my
> program (via gdb). The only thing that is different is that I now #include
> <cyg/infra/diag.h>
'printf()' uses higher level functionality which is not enabled in the
simple ROM-based RedBoot. 'diag_printf()' does the same stuff, only
directly to the debug console device, without any logical layering.
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.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