From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31382 invoked by alias); 22 Sep 2003 07:20:55 -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 31334 invoked from network); 22 Sep 2003 07:20:53 -0000 Received: from unknown (HELO mail.idtinc.de) (195.30.47.34) by sources.redhat.com with SMTP; 22 Sep 2003 07:20:53 -0000 Received: from DynaPel.com (unknown [10.0.2.109]) by mail.idtinc.de (Postfix on SuSE Linux eMail Server 3.0) with ESMTP id 2A023A1C; Mon, 22 Sep 2003 09:23:52 +0200 (CEST) Message-ID: <3F6EA2FD.80607@DynaPel.com> Date: Mon, 22 Sep 2003 07:20:00 -0000 From: Eric Doenges User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030626 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mohanlal jangir Cc: ecos-discuss@sources.redhat.com References: <3F6ABC05.6000305@DynaPel.com> In-Reply-To: X-Enigmail-Version: 0.76.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [ECOS] how to read from serial port 2 !! X-SW-Source: 2003-09/txt/msg00374.txt.bz2 mohanlal jangir wrote: > 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. I don't know how the HAL virtual vectors work, but I don't think you are changing the correct options. Fire up 'configtool' and go to the "Serial device drivers" section. There. enable "TTY mode" for channel #1. Also there, you can see that eCos names it's serial device drivers /dev/serX by default, with X being the number of the port (note that eCos starts counting at zero instead of one). However, this is _not_ enough to redirect standard in & out. To do so, you must also tell the standard C library which device to use. Go to the "Standard C library" section and then select "ISO C library standard input/output functions". You need to change the option "default console device"; set this to /dev/tty1. You could also use /dev/ser1 directly; however then you do not have the line editor that TTY mode supplies. > 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. Well, if you want to use TTY mode for a serial channel then obviously you must select that option if it is not already selected. > 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 Look at the "Serial device drivers" section in configtool (see above). Since there isn't all that much useful eCos documentation around, you will eventually end up looking at the source code. For device drivers, the device name eCos uses is usually defined in the platform-specific .inl file, found in the <...>/packages/devs////.../include/ hierachy. -- -------------------------------------------------------------------- | Eric Doenges | DynaPel Laboratories GmbH | | Tel: +49 89 962428 23 | Fraunhoferstrasse 9/2 | | Fax: +49 89 962428 90 | D - 85737 Ismaning, Germany | -------------------------------------------------------------------- -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss