bugAVR Downloader/UploaDEr - Bugs: bug #22371, serbb in win32 and Posix

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #22371: serbb in win32 and Posix

Submitter:  None
Submitted:  Wed 20 Feb 2008 05:00:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  cz0
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  None Programmer hardware: 
Device type: 

Wed 20 Feb 2008 07:15:39 PM UTC, comment #1: 

The message:

ioctl("TIOCMGET"): Bad address

indicates that the respective driver of your operating
system has a problem with this ioctl command.  Thus, it
is nothing AVRDUDE could fix.  Please contact your
operating system (or FTDI driver) vendor for a fix.

In general, bit-banging through an USB RS-232 interface is
nothing I'd personally recommend though except maybe to
bootstrap a more sophisticated programmer that way.  Each
bit change will require a full USB packet to be transmitted.
There are so many much better options to chose from for a
good USB-based programming adapter.

For a test, I connected my old "ponyser" adapter (which has
been used by its time to test AVRDUDE's serbb code) to a
PL2303 adapter under FreeBSD.  I don't get your errors (so
this driver apparently at least somehow implements the
respective ioctl), but the response to the programming
enable sequence is merely random junk rather than the
expected result.  No idea whether this is an issue with the
FreeBSD driver, or the PL2303 itself.  I don't have an
FTDI-based generic USB <-> RS-232 adapter around I could
test against here.

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 20 Feb 2008 05:00:40 PM UTC, original submission:  

I have an FT232RL USB <-> RS232 converter attached to my computer.
Trying to program ATMega8 through it gives some really strange results.
Here is my pinout:
Tx  -> Reset
RTS -> SCK
DTR -> MOSI
CTS <- MISO

Exactly an ponyser/siprog excepting that RTS, DTR and CTS lines from/to
FT232RL are inverted. To fix that I use that programmer configuration
in avrdude.conf

#-----------------------
programmer
  id    = "invdasa";
  desc  = "serial port banging, reset=!rts sck=!dtr mosi=!txd
miso=!cts"; type  = serbb;
  reset = ~3;
  sck   = ~7;
  mosi  = ~4;
  miso  = ~8;
;
#------------------------

Now the interesting part begins. Loading from win32 works just perfect
with such a command:
avrdude -p atmega8 -P com4 -c invdasa -i 10 -B 10 -b 9600 -U
flash:w:display.hex
(-B and -b parameters are not needed, it works fine without them, but I
use them to fix timings).
But loading from GNU/Linux gives a strange error:
avrdude -p atmega8 -P /dev/ttyUSB0 -c invdasa -i 10 -B 10 -b 9600 -U
flash:w:display.hex
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
[skipped]
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
ioctl("TIOCMGET"): Bad address
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

Avrdude versions on both cases are same: 5.5. Trying to connect DSR
line to RTS gave nothing. Ponyprog under win32 works grate. May be
this is a bug in Posix version. It'll be very nice to fix that.
P.S. I tried to invert RTS, DTR and CTS lines in hardware by connecting
an inverter (74HC04), so the programmer became exatly ponyser/siprog.
Under win32 that did a thing, now I can use avrdude without special
editing of config, just specifying ponyser/siprog in -c option. But
still unfunctional in GNU/Linux. Moreover, siprog is dasa2 in uisp
util, it is't working too.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-02-20 joerg_wunsch Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2008-02-20 joerg_wunsch StatusNone Invalid

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code