I am new to PlatformIO and have been attempting to use the debugger for Arduino on my Macbook with M4 processor. When I start debugging, I get an error in the debug console that Python 2.7 is not installed. Modern version of MacOS come with Python3, so I thought it was odd that the debugger would rely on this.
After more troubleshooting I found out that outdated versions of the toolchains are being installed and used, even after I update the full pio package. See below:
Platforms
└── atmelavr @ 5.1.0 (required: platformio/atmelavr)
(base) jamiemason@Jamies-Macbook-Pro test % pio pkg list
Resolving uno dependencies...
Platform atmelavr @ 5.1.0 (required: atmelavr)
├── framework-arduino-avr @ 5.2.0 (required: platformio/framework-arduino-avr @ ~5.2.0)
├── tool-avrdude @ 1.60300.200527 (required: platformio/tool-avrdude @ ~1.60300.0)
├── tool-simavr @ 1.10700.241009 (required: platformio/tool-simavr @ ~1.10700.0)
└── toolchain-atmelavr @ 1.70300.191015 (required: platformio/toolchain-atmelavr @ ~1.70300.0)
According to ChatGPT, the reason for this is that the versions of atmelavr newer than 5.1 and toolchain-atmelavr newer than 1.7 do not work on apple silicon. And these old versions require Python 2.7, which is no longer installed on Mac OS (since 2019).
I realize I could install Python 2.7 but I understand it might cause some conflicts and unintended consequences. I’m wondering if anyone has experience getting debugging to work on Apple silicon and could share their experience? Thanks in advance!