avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Re: avrdude, problems on Mac OS X


From: Christian Prinoth
Subject: [avrdude-dev] Re: avrdude, problems on Mac OS X
Date: Thu, 4 Nov 2010 11:25:54 +0100

I have further explored the issue trying to debug avrdude (5.10svn), and
here is what I found:

Apparently, the serial port "hangs" after avrdude tries to restore termios
settings. This happens in the function ser_close with the following
instruction:

int rc = tcsetattr(fd->ifd, TCSANOW | TCSADRAIN, &original_termios);

The content of original_termios is:

(gdb) p original_termios
$2 = {
  c_iflag = 0,
  c_oflag = 0,
  c_cflag = 19200,
  c_lflag = 0,
  c_cc =
"\004??\027\025\022?\003\034\032\031\021\023\026\017\001\000\024?",
  c_ispeed = 9600,
  c_ospeed = 9600
}

While avrdude sets it, during its runtime, to:

(gdb) p termios
$1 = {
  c_iflag = 1,
  c_oflag = 0,
  c_cflag = 35584,
  c_lflag = 0,
  c_cc =
"\004??\027\025\022?\003\034\032\031\021\023\026\017\001\000\024?",
  c_ispeed = 19200,
  c_ospeed = 19200
}

If I comment out this line everything _appears_ to work perfectly. Is there
any harm in not restoring original termios settings?
I have tried playing around with the options like TCSANOW, TCSAFLUSH etc.
but nothing changed.

Does the fact that avrdude works perfectly without the above change in Linux
in a Virtual Box rule out bugs in the USB driver? The USB driver's release
notes lists the following known issue:

-  Toggling of RTS requires an initial "sync" which toggles RTS low
then high. DTR does not require this workaround.

I have no idea what this means. Might it be related to the issue I observe?

Thanks
Christian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]