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

Submitted by:  None
Submitted on:  Wed 20 Feb 2008 05:00:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: cz0
Originator Email: -unavailable-Open/Closed: Closed
Release: NoneProgrammer 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>
Project AdministratorIn charge of this item.
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

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 20 Feb 2008 07:15:39 PM UTCjoerg_wunschAssigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Wed 20 Feb 2008 07:15:38 PM UTCjoerg_wunschStatusNone=>Invalid

    Back to the top


    Powered by Savane 3.1-cleanup1