This is the mail archive of the ecos-devel@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: serial port reading!


>>>>> " " == asif  <" <asif@inbox.net>> writes:

     > Hi Folks,

     > Iam trying to send data to serial port thru minicom (on
     > LINUX).Ultimately i my ecos read utility should read this.If i
     > use only one port for this how can i exactly do this as i have
     > one port on my target which is being occupied by GDB.Jonathan
     > some time back mentioned that stub would provide multiplexing
     > between diagnostic and debug ports..i have also read from
     > Jonathan's mail about simple thread usage instead of
     > cyg_user_start.

I suspect you have misunderstood what was meant by multiplexing. The
current code allows you to call printf() or other diagnostic functions
in this scenario. On the eCos side that data is intercepted, encoded
in appropriate packets as per the gdb protocol, and then sent out of
the serial port like any other gdb packet. On the host-side gdb
detects the packet type and will display the printf() output to the
user.

There is no mainstream support for having a separate application on
the host receiving data via the serial line, or sending data to the
target. The serial port is owned by gdb on the host-side, and by gdb
stubs on the target side. If your application needs to use the serial
line then gdb will have to use some other communication mechanism,
e.g. ethernet.

Having said that, there is one host-side program which may be a step
towards achieving what you are after: ser_filter. That program is
intended to allow serial testing even on hardware with only a single
serial port. It works by sitting between gdb and the serial line and
only passing certain packets on to gdb. It could be modified to do
what you are after, but it would involve a significant amount of work.
The ser_filter sources can be found in host/tools/ecostest/common, and
target-side code that interacts with filter can be found in
packages/io/serial/current/tests.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


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