Atmel ICE and linux

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

Hi!
I just got the new Atmel ICE to have some fun debugging my assembler code for tiny13A and 45.

Normalny, I use USBasp programmer with Eclipse, avrdude and Atmel toolchain, or with smallest chips, gavrasm, vi and avrdude.

I recognize ICE in Eclipse in couple of modes, debugWire, ISP, others due to avrdude 6.1. However, Avarice seems not to know ICE :(

Could you please help me? How to debug gavrasm with ICE? Or C code in Eclipse? I have gdb and Eclipse ready for debugging, but there is a missing link. No idea about gavrasm.

Is moving to AS and Windoze only option?

Greetings from Poland,
Tom

Greetings, Tom

Last Edited: Sun. Apr 12, 2015 - 06:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sq5rix wrote:
Or C code in Eclipse? I have gdb and Eclipse ready for debugging, but there is a missing link.
There are some who are enjoying AVR Eclipse with a debugger but JTAGICE3 or JTAGICE mkII.

sq5rix wrote:
Is moving to AS and Windoze only option?
No; Atmel has a few instructions for VirtualBox and mentions virtualization.

IIRC Cliff has Windows XP on Linux with a JTAGICE mkII and Atmel Studio 6.

Most PC-style notebooks and PCs come with Windows and have either a ready Windows partion or a Windows install partition; there are VM instructions on how to start with those.

There are a relatively few to several VAR that have, off-the-shelf or configured, dual-boot (Linux, Windows).


[AVaRICE-user] Support for Atmel Ice debugger

http://sourceforge.net/p/avarice/mailman/message/33241022/

Re: [AVaRICE-user] Various patches to AVaRICE

http://sourceforge.net/p/avarice/mailman/message/33761170/

...

>> Hi, I've applied the patches to the latest SVN snapshot. I use GDB
>> 7.7.1. Great job! Stepping is now super fast. I'm debugging from
>> Eclipse and the experience is now decent. The patch for the GDB
>> disassemble is here:

...

 Atmel Logo

Atmel Studio
Driver and USB Issues

Firmware upgrade fails on VirtualBox

http://www.atmel.com/webdoc/atmelstudio/atmelstudio.faq.virtualbox.html

Atmel Logo

Atmel Studio
Driver and USB Issues

Debugging never breaks under a virtualized machine

http://www.atmel.com/webdoc/atmelstudio/ch12s04s03.html

Atmel Logo

Atmel Studio
Performance Issues

Atmel Studio takes a very long time to start on my PC, but runs well in a VM environment. Is there something I can do with this?

http://www.atmel.com/webdoc/atmelstudio/ch12s03s01.html

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

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

Thank you very much! I will try the VM way.

Greetings, Tom

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

Don't get your hopes up for VM. I run AS6 in a VirtualBox VM. It worked OK with my JTAGICEmkII (USB1.1) but cannot even succeed in updating the firmware in my Atmel-ICE (USB 2.0). And, yes, I do have the "USB2 extension pack" for VirtualBox.

 

Perhaps you might have more success with VMWare?

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

Hmm, I install everything right now. I will try to update firmware. I will let you know.
Anyway, windows and studio is so bloated, it will be PITA.
I have a small, 1000 lines gavrasm code for tiny13A, hopefully I will be able to peek inside without killing my laptop :)
If I manage to port it to studio, of course.

Greetings, Tom

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

Hi again! I managed to get studio up and running. Also, the firmware upgrade went well.

I needed to add usb filters in vbox: when upgrade tool runs, click settings in vbox control windows, then USB, then and add usb filters for both cmsis and hidbldr device. They show automatically.

Restart ice, then it runs ok.

Now, the ICE shows two leds - green and red, so the connection is probably ok.

But,  get error as in the picture :(

Ubuntu and avrdude works as expected :)

I go to sleep, tomorrow the fight will continue :)

Attachment(s): 

Greetings, Tom

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

Re: first screenshot, Insufficient quantity of USB endpoints?

Atmel Logo

Atmel Studio
Driver and USB Issues

Debugging never breaks under a virtualized machine

http://www.atmel.com/webdoc/atmelstudio/ch12s04s03.html

...

Usually this causes programming to work as expected but debug not to work as debug events are transmitted on a higher endpoint number.

...

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

Last Edited: Tue. Apr 14, 2015 - 03:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi again!
Up and running :)
Another filter, FTDI was needed...

Greetings, Tom

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

Gavrasm code ported immediately.
I was puzzled by one transient bug - sometimes all worked, sometimes not. When I checked on debug, I found that R1 was not initialized to 0 (I was sure R1is always zero, but not - only in C compiler)
All works great now, thank you all for help!

Greetings, Tom

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

Wow!

If you're willing to give a minute, literally, would you state the software versions and configurations (if applicable)?

  • Linux kernel
  • Virtual Machine (name, version)
  • Windows
  • Atmel Studio
  • Targets you've operated via Atmel-ICE and Atmel Studio debugger (tinyAVR, megaAVR, XMEGA AVR, UC3 AVR32, SAM3, ...)

Thank you!

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

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

Sure no problem!

 

  • Linux kernel

 

Toshiba A300 -  3.13.0-49-generic #81-Ubuntu SMP Tue Mar 24 19:29:48 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux,   Ubuntu 14.04

 

  • Virtual Machine (name, version)

 

VirtualBox 4.3.20

 

  • Windows

 

XP SP3 - DP distribution - very old. Some time ago I removed intelppm.sys from Windows folder, it had nothing to do with Atmel

 

  • Atmel Studio

 

Atmel Studio 6.2 sp2 (build 1563) Installer – with .NET

Atmel USB Driver Installer 7.0.712

 

  • Targets you've operated via Atmel-ICE and Atmel Studio debugger (tinyAVR, megaAVR, XMEGA AVR, UC3 AVR32, SAM3, ...)

 

ATtiny13A and ATmega32 - both ISP and debugWire

 

The physical setup in the picture, also some Vbox configs.

 

Enjoy !!

 

Attachment(s): 

Greetings, Tom

Last Edited: Wed. Apr 15, 2015 - 02:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

More good news - I uninstalled 32-bit and ARM toolchains, also ASF . Now it works fast, and I have only 3GB RAM, 1512 for the Studio.

I had debug session with mutliple recompilings, switching from ISP to dW and back, all went well.

Hint - when some error happens, like 0x0c, and Studio cannot program your chip, off Studio, off Ice, on Ice, on Studio.

A normal sequence in Windows, I presume ;)

Greetings, Tom

Last Edited: Thu. Apr 16, 2015 - 01:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Few weeks later : AS seems much more friendly now, I miss Alt-/ :)
Learning curve was very steep.
I used Ice to debug more targets, attiny 85, 45 and 2313 with success on VBox.

Greetings, Tom

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

Thank you for advice. It was helpful for me. I have only 2GB RAM on my laptop. Studio working more faster now. However I leave ARM toolchain.

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

Glad I could help :)
Sure, you must install whatever you need to use.

Greetings, Tom

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

I was looking to get a debugger, but noticed that the JTAGICE3 is no longer produced and that the ATMEL-ICE is the way to go. But then I found that AvaRICE doesn't support the ATMEL-ICE. I can't find anything conclusive still, so still no support?

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

<removed.  Only the JTAGICE3 accessory kit is available.>

JTAGICE3 stock is very low.

https://octopart.com/atjtagice3-atmel-44595383

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

Last Edited: Mon. Sep 21, 2015 - 10:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just a few days ago, I stumbled over a post by Jörg ('dl8dtl') who is the one here that has his fingers deepest into the AVR-GCC/AVRlibc/AVRDUDEAVaRICE honey-pot. What he says you trust. In that post he said something akin to "Atmel is doing some fundamental changes to the debugging firmware/protocol that puts AVaRICE out of play completely". At least that is how I read/remember it. I am not sure at all if this applied to all debuggers, or only to one of them (and in the latter case, which one). 

 

I did a quick re-search yesterday but alas could not re-locate that post and thread. I'll make another attempt with a different strategy/approach.

 

All above is "FWIW", "YMMV" and "Caveat Emptor". Note that it is a quite vague recollection..

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

Hmm. I wonder why. I hope you can find the reference.

 

The Dragon is still widely available, it seems. Aside from the fact that it supposedly breaks from ESD from looking at it, would it be unwise to use that then?

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

 I hope you can find the reference.

Alas, no luck. (The only conclusion I've come to is that the search-functionality here is broken.)

 

If we're lucky, then Jörg comes by this thread and knows what I am alluding to.

 

(And trust me - I also have a keen interest in getting a AVRDUDE/AVaRICE/GDB/[Dragon|JTAGICE-II|JTAGICE3|AtmelICE|Atmel ONE!] with either Eclipse or NetBeans working stable.)

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]

Last Edited: Mon. Sep 21, 2015 - 12:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hope you can find the reference.

I know I read that comment too but even if I ditch the search here and try at Google using "site:avrfreaks.net" and using Search tools to limit it to "last month" I cannot now find that post where Jörg mentioned the ICE3 but he definitely said that an imminent firmware update for ICE3 was going to break the avarice support.

 

OTOH Atmel are making a big play of moving the "back end" in Studio 6/7 from their own debugger to using avr-gdb and that implies that they must have communication drivers for avr-gdb to talk over USB to all their programmers and debuggers. If so then if they'd just make that available in Linux too it should provide an alternative to avarice.

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

So if the JTAGICE3 is going to be disabled, and the ATMEL-ICE doesn't work at all, what is one to do? Is the Dragon the only option? 

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

 Is the Dragon the only option? 

Perhaps. And perhaps without any firmware upgrades of it. And that might eventually rule out debugging new devices.

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

I have a licence for Rowley Crossworks for AVR.    It supports Dragon, JTAGICE-1, JTAGICE-2 but they have never added JTAGICE-3 or ATMEL-ICE.

 

Obviously the Rowley Crossworks for ARM supports ATMEL-ICE.    (I do not own a JTAGICE-3)

 

For all the years that I have had Rowley,   it has always debugged JTAG and debugWIRE just fine.    It has never worried about the zillions of upgrades to Dragon or JTAGICE-2 firmware.    In other words,   it just uses the low-level JTAG or debugWIRE commands and communicates with the debugger via libusb (or RS232).     So it does not suffer from the Atmel USB driver features or Studio.

 

I have always assumed that the Studio debugger software makes full use of new and extra high level commands introduced by each firmware upgrade.    Whereas Rowley just uses basic commands and handles the interpretation in software.

 

So my guess would be that any Linux debugger software that uses the same approach as Rowley will work.    After all Rowley operates natively on Mac, Linux and Windoze.     It appears that Rowley have lost interest in AVR but I am sure that Paul would know exactly how to support ATMEL-ICE for AVR targets (if he wanted to).

 

David.

Last Edited: Tue. Sep 22, 2015 - 07:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is interesting.

 

Since the protocol is just the same, the new debug dongle called
"Atmel-ICE" (**) is also supported that way.  (This refers to the AVR
part, obviously.  Regarding the ARM part, I'd hope that a CMSIS-DAP
aware OpenOCD would be able to talk to that.)

 

And here:

 

The latter is not yet done in AVaRICE (only AVRDUDE so far), but I'll
certainly implement this so-called EDBG protocol sooner or later.  As
it is primarily a wrapper around the older (firmware version 2.x)
JTAGICE3 protocol, everything that works with the JTAGICE3 will then
automatically also work for the Atmel-ICE.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
In other words,   it just uses the low-level JTAG or debugWIRE commands and communicates with the debugger via libusb (or RS232).
And parallel port for JTAG.

http://www.rowleydownload.co.uk/avr/documentation/index.htm?http://www.rowleydownload.co.uk/avr/documentation/raljtaglpt.htm

Rowley appears to have a more recent AVR debugger interface via their debugger CrossConnect JTAG; XMEGA PDI is by the Atmel debuggers you listed.

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

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

I do not possess a CrossConnect.    Yes,  I am sure that it will work with AVRs if it is included on the Targets menu.

The Targets Menu includes "Parallel Port JTAG" e.g. Wiggler

 

I think that I tried a Wiggler with Rowley on an old PC.    It works fine with ARM but from memory,   the Rowley AVR software did not work.    Since current PCs do not have LPT,  there seems little point in investigating Wigglers.

 

IMHO,   Keil or Rowley are preferable to AS6 for ARM development.

AS6 is best for AVR.    The Rowley debug environment is fine but their Compiler is only C and their Xmega model is horrible.    And there is no Simulation of Peripherals.

 

David.

Last Edited: Thu. Sep 24, 2015 - 09:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I asked on the AvaRICE mailing list. Apparently, the new firmware for the JTAGICE3 makes it into a Human Interface Device (as the Atmel-ICE is as well) and changes its USB vender/product IDs. Avrdude supports the Atmel-ICE through libusb, but Jörg is not happy about that and would like this to be libhidapi. Should that be done, doing that to AvaRICE as well shouldn't too hard, is my understanding.

 

I'm actually interested in picking this up. Might give it a try.

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

Just to chime in that the protocol used is publicly described here. (A bit dense, I know...)

 

This is used in all tools since JTAGICE3 fw version 3 (v2 used the older protocol). It has its roots in CMSIS-DAP with all the AVR stuff wrapped into the 'vendor space'.

:: 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

Any update on this topic?

 

Is anybody using the ATMEL ICE with linux (without vbox+win)?!

 

br

  Alex

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

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

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

tuxedo wrote:

Any update on this topic?


The code is in SVN now, but not yet as stable as I'd like it to have, before rolling a release.

Jörg Wunsch

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