From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7430 invoked by alias); 20 Sep 2003 01:52:59 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 7422 invoked from network); 20 Sep 2003 01:52:57 -0000 Received: from unknown (HELO hotmail.com) (64.4.16.194) by sources.redhat.com with SMTP; 20 Sep 2003 01:52:57 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 19 Sep 2003 18:52:57 -0700 Received: from 165.213.1.1 by law11-oe59.law11.hotmail.com with DAV; Sat, 20 Sep 2003 01:52:57 +0000 X-Originating-IP: [165.213.1.1] X-Originating-Email: [mohanlaljangir@hotmail.com] From: "mohanlal jangir" To: "Eric Doenges" Cc: References: <3F6ABC05.6000305@DynaPel.com> Date: Sat, 20 Sep 2003 01:52:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: X-OriginalArrivalTime: 20 Sep 2003 01:52:57.0350 (UTC) FILETIME=[EA034A60:01C37F19] Subject: Re: [ECOS] how to read from serial port 2 !! X-SW-Source: 2003-09/txt/msg00345.txt.bz2 > 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