This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: Problem with COM1 port from with GDB 5.3 under Cygwin 1.5.3-1


Hello,

I just have passed some similar tests. I have connected a 
Win32 terminal program to one COM port, and was trying to send 
data to the other port using cygwin, with a loopback (null-
modem) cable attached.

I could 

$ echo bla >/dev/ttyS1

and even

$ echo bla >COM2


and got the result on the serial line (and into my terminal 
screen)

So at least sendig data from cygwin works fine.

Currently I don't know how to come around this. The problem 
seems to be more connected to cygwin, because we see this with 
at least two different gdb versions...

wkr,
	Thomas.

> 
> Thanks for responding.
> 
> The obvious thing to do (I think) would be to run a program under Cygwin 
> 1.5.3 to exercise the serial ports using the "com?", "/dev.com?" and 
> "/dev/ttyS?" names first to see that they actually work under Cygwin. 
> But I cannot find any Cygwin package that uses the serial port in the 
> set of standard Cygwin packages that "setup" knows about. Nor have I 
> found one anywhere else. I could not get mincom to compile under Cygwin, 
> even after several hacks at the code.
> 
> I tried just using "cat com1" and "echo ??? > com1" to communicate with 
> my board as a test, but the results are erratic even under the old Cygwin.
> 
> When I have time, I plan to learn how to right some very simple code to 
> use the serial port, and run it on both of my serial ports.. In my 
> posting to the Cygwin list I asked if anyone had some code like this. 
> But I got no response. If anyone on this list can offer some simple code 
> for this, please do.
> 
> I do notice that under the old Cygwin I get this:
> 
> $ ls -l com1
> crw-rw-rw-    1 0        0          7,   0 Sep 10 08:33 com1
> 
> But under the new Cygwin I get this:
> 
> $ ls -l com1
> ----------    0 ???????? ????????        0 Dec 31  1969 com1
> 
> I did get one response on the Cygwin list that "com1" no longer works. 
> We are supposed to use "/dev/com1". I do not know how knowledgable this 
> person was. The Cygwin user guide says "com1" should work. But it also 
> says that "/dev/com1" and "/dev/ttyS0" should work.
> 
> One notable difference on Cygwin is that "ls /dev" or "ls /dev/*" 
> produce nothing. There is no actual "/dev" directory. The user guide 
> says that you just go ahead and open the device name.
> 
> An the thing is though, I was never able to get GDB to use "/dev/ttyS0" 
> even under the old Cygwin. This is a nuisance because I also use Linux, 
> and there I have GDB scripts that use "/dev/ttyS0".
> 
> I am pusuing this on this list because the previous fact suggests that 
> GDB might benefit from some Cygwin specific code in this area and 
> because I felt I was more likely to find someone else affected by this 
> problem on this list. Also, the Cygwin list is swamped right now with 
> other problems related to the 1.5.3 upgrade.
> 
> Again let me say to anyone with knowledge of the GDB code concerning 
> serial ports, I have a test environment and I am willing to try any 
> hacks or patches you may provide. But I do not have time right now to 
> comb over the serial port GDB code and try to understand it.
> 
> Thomas Doerfler wrote:
> 
> >Hello,
> >
> >I have read your posting to the gdb mailing list. Some days 
> >now I have a similar problem with a M68K-GDB5.2 working with 
> >the serial remote protocol under cygwin 1.5.3.
> >
> >My gdb complains, that COM1 is "not a typewriter", and it will 
> >open the alternative deivces "/dev/ttyS0" only in vary rare 
> >occasions.
> >
> >I will try to downgrade my cygwin installation and try 
> >again...
> >wkr,
> >	Thomas.
> >  
> >

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler@imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm


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