This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to disable diag_printf output on serial port


On Sun, 6 Jun 2010, Alex Lindeijer wrote:
Hi all
We have an ROMRAM application that is started by the redboot start-up
script. That uses diag_printf in the kernel (like in the TSEC/PHY eth
drivers, even without DEBUG define etc). When compiled as RELEASE I
don't want output on the serial port. I actually want to use it for
something else.
I tried disabling the TTY and HAL/diag serial driver in the config
tool but without luck. I set the  ISO C library/default console device
to /dev/null. I also tried to set TTY-mode serial device driver to
/dev/null without luck.Even disabling the TTY drivers all together. We
are not using Redboot as a ROM monitor. Might Redboot be used for
diag_print...?

Also when enabling the Hardware serial driver for /dev/ser1(same port
as diag_printf uses now) my app crashes in cyg_io_read. We already use
/dev/ser2 which works fine.

So any hint to where the conflict might be? Thanks in advance

Hi Alex,


Your needs were discussed many times on the list. This famous chapter
from eCos reference manual explains what you would fix to manage your
"issue": http://ecos.sourceware.org/docs-latest/ref/hal-calling-if.html

So, keywords are: HAL_DIAG_INIT, HAL_WRITE_CHAR, HAL_READ_CHAR. To get
what diag_printf() is, refer, please, to infra/<version>/src/diag.cxx.

The eCos *diagnostic* I/O does not use Serial I/O driver. It uses a
simple polling mode for its I/O routines. It makes no sense to change
serial driver options if you try to manage diag_printf().

If you don't desire to circumvent VV interface, you can add some AUX
COMM in your HAL (for example, it would be LCD display, or even a
circular buffer in RAM) and use it as a console comm channel. Well,
hal/common: hal_if.[ch] sources will explain all needed for you.

Sergei

Alex Lindeijer | 3D perception AS
Senior System Designer

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]