This is the mail archive of the ecos-discuss@sources.redhat.com 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 read from serial port 2 !!


mohanlal jangir wrote:
I have gdb communicationg with redboot on serial port 1 (ARM Integrator
board). All printfs are dumped on serial port1 via gdb (this is output
channel set with configtool). Now 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?

You have three choices:


- 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. In order to do this, you must enable tty support for port 2
  with configtool.

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

- Use eCos' IO API and talk to the serial port 2 device directly.
--
--------------------------------------------------------------------
|     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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]