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


O yes I see. Each UART in the DUART has the uses the same
pc_serial_init() in the generic ser_16x5x.c, with the same interrupt
vector . So it will try to cyg_drv_interrupt_create with same interrupt
vector.............well extra work there...

Alex Lindeijer | 3D perception AS
Senior System Designer
alex.l@3d-perception.com
T: +47 97540959 

www.3D-perception.com
Achieving Your Vision

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Christophe
Coutand
Sent: 11. juni 2010 13:41
To: Alex Lindeijer; ecos-discuss@ecos.sourceware.org
Subject: RE: [ECOS] how to disable diag_printf output on serial port

I think both UART are sharing the same interrupt, maybe the driver does
not support or has not been tested with both UART enable hence your
startup problems.

Christophe


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Alex
Lindeijer
Sent: 11. juni 2010 11:43
To: ecos-discuss@ecos.sourceware.org
Subject: RE: [ECOS] how to disable diag_printf output on serial port

Hi again
I now have routed all debug/console communication to a third channel
that writes to a memory buffer, by adding it a Communications Interface
Table and corresponding routines for getc/putc etc. That works fine I
see the diag_printf etc in the memory buffer no longer on the serial
line.  I thought there was a conflict between the CONSOLE/DEBUG TTY
channels and the MPC85xx serial hardware drivers. But after I fixed the
Console/debug from writing to the comms port. It seems that I can have
only 1 of the UART drivers enabled at the same time in the config tool.
When I enable both the application doesn't start.
I'm running a MPC8541 with ecos code from Analogue and Micro (Python
board). Does anybody have a hint why each port works fine but both at
the same time makes the application stop before the main()?

Alex Lindeijer | 3D perception AS
Senior System Designer
alex.l@3d-perception.com
T: +47 97540959 

www.3D-perception.com
Achieving Your Vision


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Sergei
Gavrikov
Sent: 7. juni 2010 15:13
To: Alex Lindeijer
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] 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


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


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


--
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]