Unable to use Atmel ICE for debugging

I’m totally new to PlatformIO so after reading about it, installing and testing it, I decided it would do what I needed.

I read the following on PlatformIO’s web site:

“PlatformIO Debugging Solution offers a unique debugging experience for productive embedded development. Using our multi-board and multi-architecture programming experience, we simplified the debugging process in the same way. A zero debugging configuration with support for the most popular debugging probes and compatibility between IDEs and OS.”

I assumed that with the Atmel ICE being listed in there supported “Tools & Debug Probes” it would work so I ordered one. After delivery I was able to get it to make a JTAG connection with my mega2560 development board and download a simple blink program. Everything worked great except for debugging. Now after more than a week of internet searching and testing solutions I am no further along in using the Atmel ICE as a debugger. Then this morning I found a reply from maxgerhart on PlatformIO’s Community thread “Debug Tool - Cannot enter any debugger name”. His reply said this:

“PlatformIO has no native support for debugging with an Atmel ICE (only uploading) – simavr (simulation) and avr-stub (gdb stub on the target microcontroller communicating over UART) are the built-in ones for now.”

No zero debugging configuration and support here. The devil is in the details and the details are hidden deep in the bowls of the PlatformIO web site.

So now I have several questions.

1 Any idea when office support will be added for using the Atmel ICE for debugging?

2 Has anyone found a way to get the Atmel ICE working and wouldn’t mind sharing the setup steps.

3 Does anyone have a different working AVR JTAG ICE device setup? If so would you mind sharing which ICE device and project settings you use? I will buy a different ICE device if I must.

I am on a new install of windows 10, using VScode 1.52.1 and the latest PlatformIO.

Thanks in advance for any assistance with this.

*@maxgerhardt which would my humble self

For general plans on that @ivankravets should be asked.

No. We already made progress on AVR debugging by adding avr-stub which works over serial (so actually easier than a dedicated adapter) and is known to work with your Arduino Mega. So you’re good to go.

Also we have simavr as a simulation tool.

There have been multiple attempts at Atmega32 debugging with avarice and avr-gdb and Debugging AVR / Arduino with ATMELICE / JTAGICE3 and avarice / avr-gdb but nothing fully working flawlessly as far as I’m seeing.

See above

Thanks for getting back to me maxgerhardt. Sorry about the typo on your name earlier.

In your response you assume that I have an extra serial port. I do not, all 4 are being used. That being said if I had a serial port available and if I understand correctly I would also need a boot loader to be able to use it for debugging. I am using all available flash space for my code and at this point have no extra room. The boards are done and I must use JTAG.

I would like to use VS Code and PlatformIO but I need to be able to use JTAG debugging. So I will re-ask question 3. Does anyone have a working JTAG ICE device that they are using on AVR devices? Specifically the mega2560. If so would you mind sharing which device and setup details to help get me up to speed?

Thanks in advance for any assistance with this.

I suspect when hell freezes over at Microchip HQ, and they open up their propriety MDB debugger tool. I think they’re rather get $1000 per license than do that. Ivan didn’t get far when he was asking for more info on this … Debugger for Arduino uno / Mega and ESP8266 - #8 by ivankravets

Microchip does not support open source initiatives. Please contact them. The more people ask them, maybe they can change their strategy.

Thanks for the responses. I will contact Microchip but don’t believe they will be much help. It’s hard to tell if they are a hardware or software company. In any case I won’t be using Microchip processors in any of my upcoming projects. There’s no reason to provide support to a company that doesn’t seem to give a rip about its smaller customers.

I remember a short conversation some 30 years ago with an IBM employee regarding something very similar. His final comment stuck with me, I quote “We’re IBM, we don’t have to care.” The only real way to effect change is to support companies that are in the 21st century and are doing everything possible to assist there customers as opposed to trying to milk them at every opportunity.

The only real way to effect change is to support companies that are in the 21st century and are doing everything possible to assist there customers as opposed to trying to milk them at every opportunity.

Completely agree, I have started to use STM32, nRF and ESP boards a lot more these days, as they provide open debugging solutions. As a library writer, I have to test with everything, but at least I can choose where I debug, and it’s not on AVR and SAMD.

I’m in total agreement here as well.
I use ESP32 and nRF52840 extensively, and started using STM32 boards. Debug via Segger J-Link, JTAG, and ST-Link with PlatformIO.

At this point I’m locked in with the 2560 on this project. I have gone back to Microchip Studio formally (Atmel Studio) to finish up testing and debugging. I have also been looking closely at the STM32 processors. I like what I see and it sounds like they work well with 3rd party software and hardware.

To all, Have a Merry Christmas and Happy New Year