bugAVR Downloader/UploaDEr - Bugs: bug #30268, Debugwire broken in avrdude-5.10

 
 

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

bug #30268: Debugwire broken in avrdude-5.10

Submitter:  None
Submitted:  Sat 26 Jun 2010 11:49:04 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  Timon Van Overveldt
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  None Programmer hardware: 
Device type: 

Tue 16 Aug 2011 06:51:05 PM UTC, comment #1: 

Fixed in r973, thanks!

Actually, there's an even simpler way of detecting whether
the programmer connection is using JTAG, but in essence,
it's the same as your patch.

Joerg Wunsch <joerg_wunsch>
Group administrator
Sat 26 Jun 2010 11:49:04 AM UTC, original submission:  

Hi,

I noticed debugWire wasn't working using the latest avrdude.
I'm using the avr dragon and an atmega168p.
The following call resulted in an error:
avrdude -c dragon_dw -p atmega168 -P usb -v

The error:
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x1b, 4 bytes):
avrdude: jtagmkII_send(): sending 6 bytes
avrdude: Sent: . [1b] . [06] . [00] . [06] . [00] . [00] . [00] . [0e] . [02] . [1b] . [00] . [00] . [00] . [00] ] [5d] y [79]
avrdude: jtagmkII_recv():

avrdude: jtagmkII_recv(): Got message seqno 6 (command_sequence == 6)
avrdude: Recv: . [a4]

Raw message:
0xa4
Illegal emulator mode

avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_ILLEGAL_EMULATOR_MODE
avrdude: jtagmkII_initialize(): Failed to setup JTAG chain
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


The error came right after printing out the Vtarget value.

Anyway, I checked the code and found out that the error was originating from a call in "jtagmkII_initialize()" in jtagmkII.c: "(jtagmkII_setparm(pgm, PAR_DAISY_CHAIN_INFO, PDATA(pgm)->jtagchain) < 0"

I figured the problem was that debugWire doesn't have a daisy chain, so the dragon responded with an error.
So I patched the code like in the included patch, and the problem was fixed for me.
I don't know if that call really is necessary when using debugWire, but disabling it fixed my problem.

A patch is included that checks whether debugWire is being used, and disables the call accordingly.

I thought you guys would like to know about this problem.

Greetings,
Timon

P.S.: I triple-checked my wiring connections so I'm pretty sure the problem really is in the code.

Anonymous

 

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

Attached Files
file #20825:  jtagmkII-debugWire.patch added by None (623B - application/octet-stream)

 

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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-16 joerg_wunsch StatusNone Fixed
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2010-06-26 None Attached File- Added jtagmkII-debugWire.patch, #20825

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code