Impossible debugging VSCode PlatformIO avr-debug and Apple Silicon M1

Good morning,

I usually work with VSCode and PlatformIO for my arduino projects.

I have use avr_debug before with VSCode, PlatformIO and Windows 10 and 11 without any problem. But it’s imposible for me to make it work with my MBP with Apple Silicon.

The debugger never starts and the error I get in the debug console is:

undefineddyld[4130]: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
Referenced from: /Users/xxxxx/.platformio/packages/toolchain-atmelavr/bin/avr-gdb
Reason: tried: ‘/System/Library/Frameworks/Python.framework/Versions/2.7/Python’ (no such file), ‘/Library/Frameworks/Python.framework/Versions/2.7/Python’ (no such file)

There is not Python 2.7 for Apple silicon, and installing it with brew under Rosetta 2 don’t solve the problem.

The software I’m using is:
MacOS Monterey 12.4
VSCode 1.67.1
PlatformIO Core 6.0.0 and Home 3.4.1
avr-debugger 1.5

The hardware:
MacBook Pro M1
Arduino Mega 2560

Am I the only one with this problem?

Thank you in advance.

Please file an issue at Issues · platformio/platform-atmelavr · GitHub.

CC @ivankravets, maybe newer versions of toolchain-atmelavr are available for Mac that don’t link against Python 2.7?

I don’t see any updates here.

Thank you for your help.

I Just saw a new version in microchip webpage with the version number 3.7.0.518.
Avr-gdb was updated on 11th may 2022.

I have copied the entire folder inside platformio packages, but when I start Visual Studio Code I get the message - “avr-gcc” cannot be opened because the developer cannot be verified -

Thank you in advance.

FWIW, this now has a workaround here: Missing python 2.7 installation on MacOS Monterey 12.6 when trying to start debug session · Issue #292 · platformio/platform-atmelavr · GitHub