Skip to content

PlatformIO build issue with Apple Silicon #54

@ajmarroquin

Description

@ajmarroquin

TL;DR: Use Rosetta for Building ESP32-S3 on Apple Silicon

I was struggling to get PlatformIO to build the .bin firmware correctly on Apple Silicon — whether using pio run --target upload or multi_flash.py.

After trying:

  • Manually installing and pointing to updated toolchains
  • Redirecting paths
  • Downgrading PlatformIO packages
  • Hunting down rare compiler versions

…the real fix was simple: run Terminal using Rosetta.


Steps

  1. Install Rosetta (if it’s not already installed):

    softwareupdate --install-rosetta
  2. Enable Rosetta for Terminal:

    • Open Finder → Applications → Utilities
    • Right-click on Terminal.appGet Info
    • Check ✅ "Open using Rosetta"
  3. Open the Rosetta-enabled Terminal

  4. Clone the DeskHog repo:

    git clone https://github.com/PostHog/DeskHog.git
    cd DeskHog
  5. Create and activate a virtual environment:

    python3 -m venv venv-rosetta
    source venv-rosetta/bin/activate
  6. Install PlatformIO CLI:

    pip install platformio
  7. Install dependencies for sprite/image conversion (optional but recommended):

    pip install Pillow numpy
  8. Build the project:

    pio run
  9. Look for successful build output:

    Building .pio/build/adafruit_feather_esp32s3_reversetft/firmware.bin
    esptool v5.0.1
    Creating ESP32S3 image...
    Merged 3 ELF sections.
    Successfully created ESP32S3 image.
    
  10. To upload the firmware to your board:

    pio run --target upload

If you’re on Apple Silicon and running into compiler or toolchain issues with PlatformIO and ESP32-S3 builds, try Rosetta first before diving into deep debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions