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

Submitted by:  None
Submitted on:  Sat 26 Jun 2010 11:49:04 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Timon Van Overveldt
Originator Email: -unavailable-Open/Closed: Closed
Release: NoneProgrammer 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>
Project AdministratorIn charge of this item.
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

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 16 Aug 2011 06:51:05 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Sat 26 Jun 2010 11:49:04 AM UTCNoneAttached File-=>Added jtagmkII-debugWire.patch, #20825

    Back to the top


    Powered by Savane 3.1-cleanup1