avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [bug #30268] Debugwire broken in avrdude-5.10


From: anonymous
Subject: [avrdude-dev] [bug #30268] Debugwire broken in avrdude-5.10
Date: Sat, 26 Jun 2010 11:49:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100408 Gentoo Firefox/3.6.3

URL:
  <http://savannah.nongnu.org/bugs/?30268>

                 Summary: Debugwire broken in avrdude-5.10
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: Sat 26 Jun 2010 11:49:04 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Timon Van Overveldt
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 26 Jun 2010 11:49:04 AM UTC  Name: jtagmkII-debugWire.patch  Size:
623B   By: None

<http://savannah.nongnu.org/bugs/download.php?file_id=20825>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30268>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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