Fresh PIO install on Apple Silicon

What is the best way to install PlatformIO on a “clean” MacBook? I went for the recommended “super quick” install script (curl … | sh) but it appears to install an x86_64 version of the GCC toolchain, which then fails because Rosetta isn’t installed.

I was hoping that native aarch64 builds could be installed by now.

(latest PIO: 6.1.19, for STM32/CMSIS builds)

-jcw

To follow up: on another Apple Silicon Mac, where PIO was installed via homebrew, the proper “arm64” binaries were installed, for 4 different gcc toolchain versions (incl the default).

But with the recommended install method, I get the wrong binaries. I’ve tried with the original Py 3.9 present on MacOS, but then made sure Py 3.14 was added and made the default before trying again. In both cases, something seems to be deciding that this is an Intel CPU.

There are some issues about this on GitHub, but none seem to apply to this case: clean Apple Silicon system, nothing installed other than the latest Python version.

Update - cross-posted to PIO on Apple Silicon without Rosetta · Issue #5393 · platformio/platformio-core · GitHub

To follow up - the proper build is installed if I include this line:

platform_packages = platformio/toolchain-gccarmnoneeabi@^1.140201.0

This is a good-enough workaround for me.

I think a similar problem may show up for OpenOCD (tool-openocd). Some older compiler packages that are still used in the Arduino IDE (like for Atmel AVR) will definitely have no Apple Silicon recompiled packages available, and so x86_64 emulation will remain a critical part for that for some foreseeable time. If Apple would decide to remove that, they would shoot themselves in the foot.

Edit: Oh, at least the latest version of tool-openocd does have its own download for Darwin ARM64, separate from Darwin x86_64 (https://api.registry.platformio.org/v3/packages/platformio/tool/tool-openocd).

Yes, it was to be expected. The M1 chip is over 5 years old now: Rosetta2’s x86_64 emulation will not stay around forever, just as M68K and PPC emulators from Apple were dropped at some point.

My intention is to keep one Mac without Rosetta2, and FWIW: I can test things if needed, i.e. run PIO builds for specific µC architectures + frameworks (also uploads and debugs for ARM, ESP, and a few more - depending on whether I have suitable hardware for them …).

Just announced:

Apple is ending support for Rosetta 2 after macOS 27, so app that are still using Rosetta will display a popup letting users know that the app won’t work starting with macOS 28.