avarice from winavr not working with usb jtagice3

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

I am using win-avr with eclipse to build and debug my project with ATxmega256a3bu devie.
when I tried to debug the code using avarice using following command:

avarice --part atxmega256a3bu -mkII --jtag usb --read-fuses

it shows the following error

AVaRICE version 2.9, Jan  7 2010 22:42:57

Defaulting JTAG bitrate to 250 kHz.

did not find any USB device "usb"
USB device not found

how to detect jtagice3 using avarice in windows?

regards,
shreyas

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

What does usbdeview.exe have to say about the existence of the ICE3?

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

The first (svn) version of avarice that had some support for JTAGICE3 was

r320 | joerg_wunsch | 2013-01-04 21:41:04 +0100 (fre, 04 jan 2013) | 24 lines

Bring in the initial JTAGICE3 support.  Not quite everything is
working, but it's good enough for a start.
=============================================================================
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The first (svn) version of avarice that had some support for JTAGICE3 was
Code:
r320 | joerg_wunsch | 2013-01-04

...and to beat it all the way home, the latest (as in "the last") release of WinAVR was 2010-01-10.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

clawson wrote:
What does usbdeview.exe have to say about the existence of the ICE3?

I have attached the output of usbview.exe below:

[Port4]  :  JTAGICE3


Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "JTAGICE3"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: High
Device Address:                    0x03
Open Pipes:                           3

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
bDeviceSubClass:                   0x00
bDeviceProtocol:                   0x00
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x03EB = Atmel Corporation
idProduct:                       0x2110
bcdDevice:                       0x0101
iManufacturer:                     0x01
     English (United States)  "ATMEL"
iProduct:                          0x02
     English (United States)  "JTAGICE3"
iSerialNumber:                     0x03
     English (United States)  "J30200014933"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0xFF

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0xFF

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 max bytes
bInterval:                         0xFF

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0027  -> Validated
bNumInterfaces:                    0x01
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0x80  -> Bus Powered
MaxPower:                          0x32 = 100 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x03
bInterfaceClass:                   0xFF  -> Interface Class Unknown to USBView
bInterfaceSubClass:                0xFF
bInterfaceProtocol:                0xFF
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0xFF

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0xFF

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 max bytes
bInterval:                         0xFF
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have attached the output of usbview.exe below:

You were told that this avarice does not support JTAGICEMk3. And that is it.
You want it to work then download the version that does support it.
I suggest you should check release notes.

No RSTDISBL, no fun!

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

Brutte wrote:
Quote:
I have attached the output of usbview.exe below:

You were told that this avarice does not support JTAGICEMk3. And that is it.
You want it to work then download the version that does support it.
I suggest you should check release notes.

I also tried in 2.12 version of avarice which is latest on http://sourceforge.net/projects/... for windows.

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

Quote:

I also tried in 2.12 version of avarice which is latest on http://sourceforge.net/projects/... for windows.

And what does the dates say?

2.12 : 2011-12-12

Commit: r320 | joerg_wunsch | 2013-01-04 21:41:04 +0100 (fre, 04 jan 2013)

(hint, a bit more than a year between them)

:: Morten

 

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

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

meolsen wrote:

Commit: r320 | joerg_wunsch | 2013-01-04 21:41:04 +0100 (fre, 04 jan 2013)

(hint, a bit more than a year between them)

where can I find r320?
I downloaded 2.12 version from http://sourceforge.net/projects/...

and there I could not find r320.

OK now I got the avarice project source from http://sourceforge.net/p/avarice...
but I don't know how to build it to create avarice.exe

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

r320 was the very first version with JTAGICE3 support, you probably want something newer than that too.

There haven't been any official release of avarice with support for JTAGICE3, you have to use the (latest) svn version.

It's easy to check out and build on *nix systems. I don't know how to do that in Windows.

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

Quote:

I don't know how to do that in Windows.

Well I believe that back in the days of WinAVR Eric used to build using MinGW/Msys.

A rather skewy way to approach things would be to set up a Linux VM in VirtualBox. Build the Linux avarice from source there (building stuff in Linux is tons easier than Windows). Then run avarice there. As it's accessed via IP the rest of the stuff can live in Windows and talk to it across the IP boundary (like remote debugging).

But a question arises in my mind. Why would anyone want avarice in Windows anyway? If you have Windows why on earth can't you just install Studio 6.2 and drive the ICE3 properly?

(I once ran avarice in Windows just to see how it all worked - then I stopped because the experience was inferior to using Studio (4 at the time)).

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

I just downloaded a r350 version available on site and have the same problem, I decided to use WinAVR together with eclipse.

Everything is running, but I have already lost two days trying to compile an avarice compatible with JTAGICE3 (and ATmega128rfa1 processor).

This is the first time I ever use Cygwin, first time I see executable files without extension and so on, no familiar with Linux...

I am tired of installing and downloading tons of software and no results.

 

Does anyone have Windows avarice.exe file to share?

Is there any way other than creating a Linux VM to develop for Atmel devices? (no success even with Atmel Studio 6)

 

Very gratefull for any help.

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

no success even with Atmel Studio 6

If you're on Windows the absolutely most straight-forward way to develop for AVRs is to use Atmel Studio. Anything else is waaay more complex, involved and non-streamlined. If not experienced with Unix/Linux, command lines etc then the Eclipse+GDB+AVARICE stack a complex thing. And building AVARICE using Cygwin with no previous experience of such environments will be really hard learning [1].

 

Tell us more about your problems with AS6, and we might get you going.

 

Does anyone have Windows avarice.exe file to share?

There is a build from 2012 available on Sourceforge. The AVARICE project page is here: http://avarice.sourceforge.net/

 

----------

 

[1] Besides, Cygwin sucks. Big time. It might have been the thing waybackthen, but nowadays the reasonable thing to go with is "MinGW". I understand that this does not make things look easier, should you continue trying to build your own AVARICE for/on Windows.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Cygwin might suck, maybe.  But AVaRICE has been written with the Posix API in mind, so no chance with MinGW.

 

Btw., the new JTAGICE3 firmware that Atmel Studio is going to install will make it fully incompatible with AVaRICE  …

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

Last Edited: Wed. Sep 16, 2015 - 02:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My idea was to make use of many facilities embedded on Eclipse IDE. With it everything is going well, I can even use avrdude perfectly.

My partner has some experience with Eclipse and can help me.

The only problem I can't make avarice to work. Both by a JTAGICE3 and a Atmel-ICE debugger interfaces I have no success.

 

In fact, I am catching up a not finished project using Atmega128rfa1 processor.

The one who started the project used Linux and he got to debug with the same hardware, but I don't know details. (we don't have a development board, only our own hardware)

 

I see two options, in this case:

- Atmel Studio for debugging, once I am not sure exactly how to create the AS6 project (ok, I still just tried a quick and dirty approach, not much valid)

- Use a virtual machine with Linux, what provides an acceptable level of challenge. (how about AVR tools for Linux?)

 

Edit: Is it possible to use Atmel Studio debugger inside Eclipse????

Last Edited: Wed. Sep 16, 2015 - 03:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> how about AVR tools for Linux?

 

Threee options:

 

* Use the native toolchain as provided by the package system of your Linux distribution.

 

Pretty simple to do, you usually get a reasonably new toolchain. You'll miss any hacks the Atmel toolchain contains, including possible bugs introduced by them. ;)

 

* Use the Atmel-provided Linux toolchain (separetely, independent of Atmel Studio).

 

Mildly more complicated, essentially gets you the same you'd get along with Atmel Studio.  Including all their hacks (like half-baked compiler support for the ATtiny10 architecture, or bleeding-edge device support).

 

* Roll your own.

 

Not too complicated under a Unixoid operating system, you've already got many of the tools you need around, and few other prerequisites can easily be obtained through the package system of your OS.  Gets you bleeding edge including up-to-date bugfixes and optimization improvements, but without any Atmel hacks.

 

Btw., you could turn it the other way around as well: Linux as host OS, Windows (with Atmel Studio) as guest. If you want to go that route, make sure to not use VirtualBox for the VM.  Use VMware instead. Simple reason: VirtualBox is quite good, but their USB support sucks big rocks. EHCI support ("USB 2.0") can only be got as a closed-source, binary-only add-on, but is nevertheless pretty poor and fairly unusable.

 

With VMware, you can even get things like firmware upgrades of the Atmel tools without trouble, which add one level of complexity to the VM since they switch between two different USB devices, for bootloader and actual device.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

You'll miss any hacks the Atmel toolchain contains

Rather sadly those "hacks" mean device support for almost 100 models of AVR now. I know Atmel are working to push their "private" compiler and libc changes back up stream and you see a lot of activity from their engineers in the SVN trackers but as it stands at the moment if you pull a "generic" avr-gcc such as a repo builder may have built it will support about 200 models of AVR while an "Atmel toolchain" will support about 300 models of AVR.

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

I know this is a very old thread, but this just worked for today...

 

   svn checkout svn://svn.code.sf.net/p/avarice/code/trunk/avarice

 

Downloaded on Ubuntu 15.04, and followed simple instructions to config/build/install.

 

Invoking avarice --V

 

AVaRICE version 2.13svn20160229, Apr  8 2016 15:37:28

Usage: avarice [OPTION]... [[HOST_NAME]:PORT]

Options:
  -h, --help                  Print this message.
  -1, --mkI                   Connect to JTAG ICE mkI (default)
  -2, --mkII                  Connect to JTAG ICE mkII
  -3, --jtag3                 Connect to JTAGICE3 (Firmware 2.x)
  -4, --edbg                  Atmel-ICE, or JTAGICE3 (firmware 3.x), or EDBG Int

 

Lots of support for JTAGICE3, firmware 2.x, and 3.x

 

I'm waiting for my JTAGICE3 from digikey this week if it works OK, then I will post.

 

R.

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

rasyoung wrote:
I'm waiting for my JTAGICE3 from digikey this week
People still buy JTAGICE3's ?

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

WOW I had to check, I know someone who could buy a couple, but no stock at Digikey. (also still using AS5.1 under XP and no it's not me wink)

 

How did you order yours Ras?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly