This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: GDB mangler and diag console
- From: "Rich LeGrand" <rich at charmedlabs dot com>
- To: "Gary Thomas" <gthomas at ecoscentric dot com>
- Cc: "eCos Discussion" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 4 Sep 2002 13:45:51 -0700
- Subject: RE: [ECOS] GDB mangler and diag console
Hi Gary,
Thanks for the prompt reply! So one solution is to add another comm channel
in the virtual vector table, such as
channel 0: serial
channel 1: lcd (new channel)
channel -3: mangler (as always)
Setting CYGPKG_REDBOOT_ANY_CONSOLE to 1 and
CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS to 2 allows mon_write_char() to
write to comm channels 0 and 1, which accomplishes my goals within the
context of Redboot, but since mon_write_char() is not in the virtual vector
table, it does not work for RAM executables are loaded via Redboot through
the GDB stubs, which exclusively use the mangler channel.
(CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE=1 in my target)
If I understand things correctly (unlikely! :) here are some proposed
solutions:
--Create a new mangler comm channel (3 say) and route the LCD and mangler
through it. And then redefine CYGNUM_CALL_IF_SET_COMM_ID_MANGLER to 3 (at
the very least -- maybe additional mods are required)
--Modify cyg_hal_diag_mangler_gdb_flush() or cyg_hal_diag_mangler_gdb_putc()
such that it does something similar to mon_write_char() based on certain
platform defines.
Let me know your thoughts.
Thanks!
Rich LeGrand
-----Original Message-----
From: Gary Thomas [mailto:gthomas@ecoscentric.com]
Sent: Wednesday, September 04, 2002 6:23 AM
To: Rich LeGrand
Cc: eCos Discussion
Subject: Re: [ECOS] GDB mangler and diag console
On Wed, 2002-09-04 at 01:15, Rich LeGrand wrote:
> Hi all,
> If an embedded target has a serial port and an LCD display (as does mine),
> is there a recommended way to output to both the GDB mangler console (in
my
> case, the serial port) and the LCD display without having to modify
> cyg_hal_diag_mangler_gdb_putc() in hal_if.c? That is, I think it would be
> nice to have the option to print to both the GDB session and the LCD
> similtaneously. If I have to modify cyg_hal_diag_mangler_gdb_putc(), any
> suggested methods that don't vandalize this function too badly would be
> appreciated. :)
Look at the RedBoot I/O support - it does this when there is more
than one console port available. I think you could set things up
such that output went through the normal GDB console channel as
well as directly to your LCD screen. [Note: my thoughts are that
you might have to set things up such that the GDB I/O would go through
the virtual vector interface and the LCD output be handled directly]
Look at the files
.../redboot/current/src/io.c
.../redboot/current/src/main.c
for the details. The routine 'mon_write_char()' gets "pushed" into
the diag I/O stream so that all output will go through it, which in
turn allows the output to be directed to multiple locations.
--
------------------------------------------------------------
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