printf goes to serial port?

Gary R. Van Sickle g.r.vansickle@att.net
Fri Dec 19 20:38:00 GMT 2008


> From:  Alex Martin
> 
> Well, I was using a port monitor to debug some of the traffic 
> between my serial device, and my software, when I noticed the 
> output accidentally.
> 
> I am not sure when the behavior started. It used to work 
> fine, I was using printf to debug things, then I turned off 
> all of those printf statements, and continued development on 
> the gui side (fox toolkit) of my application, and then had to 
> go in and modify my low level serial class and was trying to 
> get my printf debug output again, to no avail.
> 
> I have updated cygwin a few times, otherwise I cannot think 
> of anything specific.
> 
> What other details can I provide?
> 

Well, whatever details you have.  I'm still in "pull mode" here, which isn't
conducive to problem-solving.  So far I've been able to gather:

1.  You are developing some sort of app that communicates over a serial port
to some other device.
2.  You "have a cygwin environment".
3.  The app has a GUI, using something called "fox toolkit" (with which I am
not familiar).
4.  You had debug printf()s that used to work, then a bunch of stuff
changed, and now they work differently.

A few gaps that need filling before anything better than SWAGs can come your
way:
- Is this app a Cygwin app, or is Cygwin involved only perhiperally (e.g.
you're using Cygwin make to run the MinGW toolchain), or is Cygwin not
directly involved at all and you're saying "My non-Cygwin-related app was
working fine, I changed a bunch of stuff in the app and also upgraded
Cygwin, and now the app is broke and I'm thinking Cygwin could be to blame"?
- Since your app is a GUI app, where did you expect your printf()s to go?

> Alex Martin
> 

-- 
Gary R. Van Sickle
 
> Gary R. Van Sickle wrote:
> >> From: Alex Martin
> >>
> >> Hello,
> >>
> >> I have a cygwin environment, running some software I am writing to 
> >> talk to some serial devices.
> >>
> >> Somehow, trying to debug why I could not see printf output to 
> >> console, I ran a serial port sniffer and voila all of my printf 
> >> commands are writing on the serial port.
> >>
> > 
> > I can't say that it would cross my mind to look for my 
> missing printf 
> > output on a serial port, even if I was using a serial port in other 
> > parts of the program to talk to something.  Whatever it was 
> that gave 
> > you the hunch to do that is probably at the core of your problem.
> > 
> >> Any idea how to fix this?
> >>
> > 
> > Well, no, not really, since you've given very few details 
> to go on.  
> > I'd SWAG that you've somewhere, somehow, redirected stdout to the 
> > serial port you're trying to talk to those devices on.
> > 
> >> Thanks,
> >> Alex Martin
> >>
> > 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list