From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8708 invoked by alias); 19 Jul 2005 05:01:02 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 8681 invoked by uid 22791); 19 Jul 2005 05:00:55 -0000 Received: from nsx.kgc.co.jp (HELO nsx.kgc.co.jp) (210.163.35.34) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Tue, 19 Jul 2005 05:00:55 +0000 Received: (qmail 70632 invoked from network); 19 Jul 2005 14:00:51 +0900 Received: from ssm.kgc.co.jp (210.163.35.37) by nsx.kgc.co.jp with SMTP; 19 Jul 2005 14:00:51 +0900 Received: (qmail 82628 invoked from network); 19 Jul 2005 14:00:50 +0900 Received: from unknown (HELO HARA) (172.30.243.10) by mail.kgc.co.jp with SMTP; 19 Jul 2005 14:00:50 +0900 From: "HARA@KGC" To: Date: Tue, 19 Jul 2005 05:01:00 -0000 Message-ID: <000701c58c1e$d5400fa0$0af31eac@HARA> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: [ECOS] How to get the serialandle? X-SW-Source: 2005-07/txt/msg00176.txt.bz2 Hello all. I want to transmit the program from the command line of REDBOOT and to execute it. However, there is only one SERIAL PORT in hardware. The port is used for debugging, diagnosis (gdb), and download in REDBOOT. After executing the downloaded application program, I want to use the serial port from the RAM application. Handle of the serial port in VIRTUAL VECOTR TABLE was not able to be obtained though the following sample program was made and executed as processing done for that. //=== testSerial.c===// //#include #include #include void cyg_user_start( void ) { cyg_io_handle_t tty_hdl; int err; char output_string[]="HElo There!!\n"; cyg_uint32 output_len=sizeof( output_string); unsigned long inc=0,j=0; printf( " printf %d\n",j*2 ); err =cyg_io_lookup( "/dev/ser0", &tty_hdl); if( err ) { diag_printf( " Error /dev/tty0\n" ); return; } err =cyg_io_write( tty_hdl, output_string, &output_len ); if( err ) { diag_printf( "Error /dev/tty0 write" ); return; } } How can I obtain serialport handle? Is there information that relates to it? My best regards. -- C---------------------------- C Keisoku-Giken Corp, C Yukihisa Hara(hara@kgc.co.jp) C---------------------------- -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss