Jack Wilborn - 2019-05-31

I have had this issue for many years, until I found the 2.4.2 plugin that fixed the issue for another user. It did not fix the issue for me.

The logic of this escapes me from the fact that every use of the avr plugin requires that I set the proper target. You would think it would try with the existing target settings first, then fall back. As you can see from the output, the basic logic seems to work, as far as the first query returns the proper device. In my case the ATtiny85 (as 't85') but the software does not parse it properly? On the next query is seems to default to some unknown device without even attempting a read from the set target.

Any protection to the user is pretty voided by that you have to select 'direct hex values' just to read the target, but it's actually a 'write hex values'. All need do is have the query fail, then the next upload sets the fueses to whatever is in the field. Good thing I have a HVSP... You should be able to read them anyway without selecting 'direct hex values'.

Not knowing the restraints on the people writting this code, it seems like never been properly fixed. I do appreciate all the efforts so, thanks to all of you...

Sorry about the gripes...

The console did not include the actuall avrdude call that created the list of known micros, even after expanding the size of the buffer. I assume that it's for parsing purposes.

Here is the output from the latest plugin that I have 2.4.2.

Eclipse
Version: 2019-03 (4.11.0)
Build id: 20190314-1200

Output from console window:

  x256c3   = ATxmega256C3       [/etc/avrdude.conf:14233]
  x256d3   = ATxmega256D3       [/etc/avrdude.conf:14286]
  x32a4    = ATxmega32A4        [/etc/avrdude.conf:13641]
  x32a4u   = ATxmega32A4U       [/etc/avrdude.conf:13568]
  x32c4    = ATxmega32C4        [/etc/avrdude.conf:13621]
  x32d4    = ATxmega32D4        [/etc/avrdude.conf:13631]
  x32e5    = ATxmega32E5        [/etc/avrdude.conf:14521]
  x384c3   = ATxmega384C3       [/etc/avrdude.conf:14354]
  x384d3   = ATxmega384D3       [/etc/avrdude.conf:14407]
  x64a1    = ATxmega64A1        [/etc/avrdude.conf:13741]
  x64a1u   = ATxmega64A1U       [/etc/avrdude.conf:13757]
  x64a3    = ATxmega64A3        [/etc/avrdude.conf:13768]
  x64a3u   = ATxmega64A3U       [/etc/avrdude.conf:13778]
  x64a4    = ATxmega64A4        [/etc/avrdude.conf:13789]
  x64a4u   = ATxmega64A4U       [/etc/avrdude.conf:13657]
  x64b1    = ATxmega64B1        [/etc/avrdude.conf:13799]
  x64b3    = ATxmega64B3        [/etc/avrdude.conf:13810]
  x64c3    = ATxmega64C3        [/etc/avrdude.conf:13710]
  x64d3    = ATxmega64D3        [/etc/avrdude.conf:13721]
  x64d4    = ATxmega64D4        [/etc/avrdude.conf:13731]
  x8e5     = ATxmega8E5         [/etc/avrdude.conf:14417]
  ucr2     = deprecated, use 'uc3a0512' [/etc/avrdude.conf:14590]

avrdude finished


Launching /usr/bin/avrdude -cdragon_isp -Pusb -b460800 -v -pm16 
Output:

avrdude: Version 6.3
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/jack/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : dragon_isp
         Overriding Baud Rate          : 460800
avrdude: usbdev_open(): Found AVRDRAGON, serno: FFFFFFFFFFFF
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
  boot-loader FW version:        255
  firmware version:              6.11
  hardware version:              1
S_MCU:
  boot-loader FW version:        255
  firmware version:              6.11
  hardware version:              7
Serial number:                   ff:ff:ff:ff:ff:ff
Device ID:                       AVRDRAGON
         AVR Part                      : ATmega16
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    10   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33     6   128    0 yes     16384  128    128  4500  4500 0xff 0xff
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

         Programmer Type : DRAGON_ISP
         Description     : Atmel AVR Dragon in ISP mode
         Vtarget         : 5.0 V
         SCK period      : 8.00 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude: Device signature = 0x1e930b (probably t85)
avrdude: Expected signature for ATmega16 is 1E 94 03
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

avrdude finished


Launching /usr/bin/avrdude -cdragon_isp -Pusb -b460800 -v -px128a3 
Output:

avrdude: Version 6.3
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/jack/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : dragon_isp
         Overriding Baud Rate          : 460800
avrdude: usbdev_open(): Found AVRDRAGON, serno: FFFFFFFFFFFF
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
  boot-loader FW version:        255
  firmware version:              6.11
  hardware version:              1
S_MCU:
  boot-loader FW version:        255
  firmware version:              6.11
  hardware version:              7
Serial number:                   ff:ff:ff:ff:ff:ff
Device ID:                       AVRDRAGON
         AVR Part                      : ATxmega128A3
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           prodsig        0     0     0    0 no         50   50      0     0     0 0x00 0x00
           fuse1          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse2          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse4          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse5          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0     0     0 0x00 0x00
           data           0     0     0    0 no          0    0      0     0     0 0x00 0x00
           eeprom         0     0     0    0 no       2048   32      0     0     0 0x00 0x00
           application    0     0     0    0 no     131072  512      0     0     0 0x00 0x00
           apptable       0     0     0    0 no       8192  512      0     0     0 0x00 0x00
           boot           0     0     0    0 no       8192  512      0     0     0 0x00 0x00
           flash          0     0     0    0 no     139264  512      0     0     0 0x00 0x00
           usersig        0     0     0    0 no        512  512      0     0     0 0x00 0x00
           fuse0          0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : DRAGON_ISP
         Description     : Atmel AVR Dragon in ISP mode
         Vtarget         : 5.0 V
         SCK period      : 8.00 us

avrdude: unsupported encapsulated ISP command: 0x51
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
################avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()
################################## | 100% 30.00s

avrdude: Device signature = 0x010101
avrdude: Expected signature for ATxmega128A3 is 1E 97 42
         Double check chip, or use -F to override this check.
avrdude: unsupported encapsulated ISP command: 0x50
avrdude: stk500v2_jtagmkII_recv(): error in jtagmkII_recv()

avrdude done.  Thank you.

avrdude finished

Thanks, if you need more information, please contact me.

Jack :)