Missing debug toolbar

With the help of descriptions I’m trying a simple blink debug with Atmel-ICE: the platformio.ini contains

build_type = debug

and

debug_tool = atmel-ice

When i click the RUN AND DEBUG button (green triangle), the debug toolbar (continue, step-in, step-out, etc…) simply does not appear…

The reasons could be manyfold. Please post

  1. The full platformio.ini
  2. The output of the “Debug Console” tab in VSCode

Also note that using an Atmel ICE to debug Atmel AVR devices is currently not possible out of the box. Atmel SAM / ARM-based devices can be debugged though.

platformio.ini:
[env:mkrzero]
platform = atmelsam
board = mkrzero
framework = arduino
build_type = debug
debug_tool = atmel-ice

The DEBUG CONSOLE tab is empty.
The MKRZERO SWD port ↔ Atmel-ICE SAM port wiring I think is good: in the Arduino IDE 2.1.1 i can upload the original (stock) bootloader without error. Since then I can upload sketch without error.
I’m using a win11 system now, but I tried a fresh win10 system, the error is same…

What’s the output of CLI

pio debug --interface=gdb -- -x .pioinit

?

A bunch of red error messages…
Not fit here. Am I uploading somewhere?

You can use https://pastebin.com/ if the logs are too long.

Seems like a bug in platform-atmelsam. Can you update to the latest stable version and see if it’s still dead like this?

CLI

pio pkg update -g -p atmelsam

Okay than this merits opening an issue about it.

Can you try this workaround:

  1. Add upload_protocol = atmel-ice in your platformio.ini
  2. Try a regular upload. (This should trigger the installation of the tool-openocd package)
  3. Try debugging again (The error about tool-openocd not being found should be gone)

FYI, this is now tracked in

Your workaround is working (on a fresh Win10)!

I tried the first and second suggestion on a fresh Win10: the error is same like on Win11

Next: I try your workaround on an older Win11… (to be continued…)
continue:
It also works on older win11 installations!
Thanks!

Ps.:
I don’t know if it matters: I previously installed it on both windows the Arduino IDE 2.1.1. I couldn’t start the debug on any of them, after that i started trying platformIO

The developers have rectified the issue with the latest commit (see linked issue above).

So you should be able to use

platform = https://github.com/platformio/platform-atmelsam.git#8a81489e3c0bc3c20a623336972333490c696649

(instead of platform = atmelsam) to grab this fixed version. It’s also advised to watch out for the next stable version which will have this fix, that is whatever comes after 8.2.0.

To test this in its initial conditions, you can just delete C:\Users\<user>\.platformio\packages\tool-openocd and see if starting a debug session now installs the package and works or not.

Thank you for your help! I’ll try it out, I will give you a feedback.

The simple blink debug working fine finally, but my Arduino project is very big (more than 50 ino-s, a lot of include libraries, global variables…), based on my current knowledge the arduino project import is not too simple (and I don’t have time…), I will try to correct Arduino IDE 2.1.1 debugging error…