public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "mohanlal jangir" <mohanlaljangir@hotmail.com>
To: "Eric Doenges" <Eric.Doenges@DynaPel.com>
Cc: <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] how to read from serial port 2 !!
Date: Sat, 20 Sep 2003 01:52:00 -0000	[thread overview]
Message-ID: <Law11-OE59ICI4GcMvn00001a92@hotmail.com> (raw)
In-Reply-To: <3F6ABC05.6000305@DynaPel.com>


> mohanlal jangir wrote:
> > I want my application to read from serial
> > port 2 (serial port 1 can't be used as gdb doesn't allow this while
remote
> > debugging). How can read from serial port 2?
>
>
> - Reroute stdin/stdout to serial port 2 by setting the default console
>    device to /dev/ttyS1 and then use the normal stdio C library
>    functions.
I did change CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT to 1 (serial
port 2) while left CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL to 0(serial port
1). But still printf messages coming on serial port 1 where gdb is
connected.

>    In order to do this, you must enable tty support for port 2
>    with configtool.
Do I need to change anything else apart from the above mentioned changes.
Inside "serial device drivers" package, I see options like "TTY mode channel
#(0-2)" etc. But these are not selected for any channel, so I don't think I
need to select any of them for serial port 2.

> - Open the appropriate device file using POSIX file IO calls. This will
>    require including the appropriate packages for POSIX file IO. Please
>    note that while I believe this should work, I've never tried it
>    myself.
I don't know, which is appropriate device file for serial port 2. I tried to
look into redboot code and found use of macros like
CYGACC_CALL_IF_SET_CONSOLE_COMM but did not find their definition. Where are
they defined? Where should I look for * appropriate device* for serial port
2

Regards
Mohanlal

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

  reply	other threads:[~2003-09-20  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-19  5:14 mohanlal jangir
2003-09-19  8:18 ` Eric Doenges
2003-09-20  1:52   ` mohanlal jangir [this message]
2003-09-22  7:20     ` Eric Doenges

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Law11-OE59ICI4GcMvn00001a92@hotmail.com \
    --to=mohanlaljangir@hotmail.com \
    --cc=Eric.Doenges@DynaPel.com \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).