[SOLVED] AVRDUDE with Atmel JTAG2 ICE

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to flash a binary file to an ATtiny13 using an Atmel JTAG2 ICE and AVRDUDE, but despite my research over the past few hours, I cannot seem to get it working. I'm using AVRDUDE 6.3 on Arch Linux.

 

I've tried the commands below and received the output shown for each. I tried repeating all commands using jtag2isp too but got the same results.

sudo avrdude -v -p t13 -c jtag2 -U flash:w:blink

avrdude: Version 6.3, compiled on May  8 2019 at 19:46:05
         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 "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : jtag2
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2103)

avrdude done.  Thank you.
sudo avrdude -v -p t13 -c jtag2 -P /dev/hidraw0 -U flash:w:blink

avrdude: Version 6.3, compiled on May  8 2019 at 19:46:05
         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 "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/hidraw0
         Using Programmer              : jtag2
avrdude: ser_open(): can't set attributes for device "/dev/hidraw0": Inappropriate ioctl for device

avrdude done.  Thank you.

The device listing/information with lsusb and dmesg are:

 

Bus 002 Device 003: ID 04f2:b40e Chicony Electronics Co., Ltd HP Truevision HD camera
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 03eb:2141 Atmel Corp. ICE debugger
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 03eb:2141 Atmel Corp. ICE debugger
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x03eb Atmel Corp.
  idProduct          0x2141 ICE debugger
  bcdDevice            1.01
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0040
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              4
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      35
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval             255
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval             255
[   41.526600] usb 1-6: new high-speed USB device number 3 using xhci_hcd
[   41.665395] usb 1-6: New USB device found, idVendor=03eb, idProduct=2141, bcdDevice= 1.01
[   41.665401] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   41.665404] usb 1-6: Product: Atmel-ICE CMSIS-DAP
[   41.665407] usb 1-6: Manufacturer: Atmel Corp.
[   41.665410] usb 1-6: SerialNumber: J41800071551
[   41.670870] hid-generic 0003:03EB:2141.0002: hiddev0,hidraw0: USB HID v1.11 Device [Atmel Corp. Atmel-ICE CMSIS-DAP] on usb-0000:00:14.0-6/input0

The devices under /dev/ are:

autofs           fb0           mapper              port    snapshot  tty16  tty3   tty43  tty57  udmabuf  vcsa1        vhci
block            fd            media0              ppp     snd       tty17  tty30  tty44  tty58  uhid     vcsa2        vhost-net
bsg              freefall      mei0                psaux   sr0       tty18  tty31  tty45  tty59  uinput   vcsa3        vhost-vsock
btrfs-control    full          mem                 ptmx    stderr    tty19  tty32  tty46  tty6   urandom  vcsa4        video0
bus              fuse          memory_bandwidth    pts     stdin     tty2   tty33  tty47  tty60  usb      vcsa5        video1
cdrom            hidraw0       mqueue              random  stdout    tty20  tty34  tty48  tty61  userio   vcsa6        watchdog
char             hpet          mtd0                rfkill  tty       tty21  tty35  tty49  tty62  v4l      vcsu         watchdog0
console          hugepages     mtd0ro              rtc     tty0      tty22  tty36  tty5   tty63  vcs      vcsu1        zero
core             initctl       mtd1                rtc0    tty1      tty23  tty37  tty50  tty7   vcs1     vcsu2
cpu              input         mtd1ro              sda     tty10     tty24  tty38  tty51  tty8   vcs2     vcsu3
cpu_dma_latency  kmsg          net                 sda1    tty11     tty25  tty39  tty52  tty9   vcs3     vcsu4
cuse             kvm           network_latency     sda2    tty12     tty26  tty4   tty53  ttyS0  vcs4     vcsu5
disk             lightnvm      network_throughput  sda3    tty13     tty27  tty40  tty54  ttyS1  vcs5     vcsu6
dri              log           null                sda4    tty14     tty28  tty41  tty55  ttyS2  vcs6     vfio
drm_dp_aux0      loop-control  nvram               shm     tty15     tty29  tty42  tty56  ttyS3  vcsa     vga_arbiter

and inside of /dev/usb is one more called hiddev0 which has the same output error as when using hidraw0. None of the ttySx devices worked either.

 

Any suggestions on what I might be missing here would be greatly appreciated. This is also my first post on these forums, so if I did something wrong, please don't hesitate to let me know so I can fix it.

This topic has a solution.
Last Edited: Tue. Jun 11, 2019 - 04:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's is not a JTAGICE2, that's and Atmel-ICE...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well that would certainly make a difference. That leads to another problem though: The only ICE programmers that AVRDUDE seems to have arguements for are the "Atmel JTAG ICE" ones. Is there something else I need to do to get it working or does AVRDUDE just not support that programmer?

Last Edited: Tue. Jun 11, 2019 - 03:04 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brunste wrote:
... or does AVRDUDE just not support that programmer?

AVR Downloader/UploaDEr - News: AVRDUDE 6.3 released [Savannah]

...

 

* New programmers supported: 

...

- Atmel-ICE (ARM/AVR), JTAG, PDI, debugWIRE, ISP modi 

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Ah ha. I just checked the man page on my laptop and found the options listed under:

atmelice         = Atmel-ICE (ARM/AVR) in JTAG mode
atmelice_dw      = Atmel-ICE (ARM/AVR) in debugWIRE mode
atmelice_isp     = Atmel-ICE (ARM/AVR) in ISP mode
atmelice_pdi     = Atmel-ICE (ARM/AVR) in PDI mode

I was previously looking at the documentation on their website (https://www.nongnu.org/avrdude/u...) which hasn't been updated to include those options. That's actually what led me to (mistakenly) believe that the Atmel ICE and JTAG ICE were the same thing.

 

Thank you both so much for your help. Even if it was two, back-to-back cases of me being an idiot, I greatly appreciate your time. I'll go ahead and mark the thread as solved.