FOUR BUILD SYSTEMS, ONE RUN BUTTON

Supporting the ESP32 sounds like one job. It is four.
The same chip is reachable through four separate build systems, and they do not agree on where the toolchain lives, what counts as a project, or what the word “build” even means. I found this out the hard way while building the run configuration for Flexible for Arduino, and the plugin’s single Run button hides four completely different machines underneath it.
Four ways to build the same chip
ESP-IDF is Espressif’s own framework, built around a single entry point, idf.py, which wraps CMake and Ninja. A project is a CMake tree with an sdkconfig file, and the toolchain lives wherever IDF_PATH points, which is an environment variable nobody sets the same way twice.
Arduino CLI thinks in sketches. A project is an .ino file, boards come from a board manager index, and the whole model is deliberately smaller than IDF’s: fewer knobs, fewer ways to configure a build, and a much shorter path from a new file to a blinking LED.
PlatformIO is its own universe again: a platformio.ini file describes the project, PlatformIO manages its own toolchains and its own board and library index, and none of it touches IDF_PATH or the Arduino board manager at all.
Zephyr, reached through its meta-tool West, is a real RTOS, not a board-support layer bolted onto a sketch model. West is an extensible wrapper that handles workspace initialisation, dependency management, building, and flashing, across more than 600 boards and 100 SoCs. On the ESP32 specifically, West shells out to Espressif’s own HAL through a Zephyr module built for it. A West project is a manifest-driven workspace, and asking “what is the project” gets a different answer here than from any of the other three.
Building the run button
Flexible for Arduino has one BuildBackend interface: getId, buildCommandLine, flashCommandLine, monitorCommandLine, runCommand. Four classes implement it, one per toolchain, and a registry auto-detects which one a project needs by checking a working directory for the telltale file: an IDF CMake tree, a platformio.ini, a Zephyr project layout, or a bare .ino sketch, in that priority order, falling back to whatever you pinned explicitly in settings.
IDF_PATH auto-detection is its own small mess. The plugin checks the environment variable first, then falls back to scanning ~/esp, ~/.espressif, ~/.espressif/frameworks, and on Windows, C:/Espressif/frameworks, because the manual install, the ESP-IDF Installation Manager, and the Windows GUI installer each drop the SDK in a different default place, and none of the three installers know about the other two. Version handling gets the same treatment: the plugin scans those same directories for any folder containing tools/idf.py, reads the version out of the folder name or version.txt, and lets IDF v4.x and v5.x sit side by side on one machine, because a project written against one does not reliably build against the other, and forcing an upgrade is not something a plugin gets to decide for you.
Errors
Every backend returns the same shape of result to the plugin, an exit code and whatever text the process printed and the panel does not tell you which of the four failure categories you are looking at. A missing Python virtual environment from IDF, a West manifest that will not resolve, a PlatformIO registry hiccup, a missing Arduino core, all of it lands in the same output pane as red text, and you learn to read four different error dialects out of one undifferentiated stream.
The payoff for all of that plumbing is a pin viewer and pin capability table covering more than fifteen boards, from the ESP32 family through STM32 Nucleo, Blue Pill, and Black Pill, to the Raspberry Pi Pico, all reading from the same board data regardless of which of the four backends actually builds the project.
Flexible for Arduino is on the JetBrains Marketplace.
| Education | EBS Business School, SFSU, HSG |
| Experience | 20 Years Enterprise Systems |
| Built | Scipio ERP - ERP & Ecommerce System |
| Author | "Start/Up - Set the net on fire" |
| JetBrains | 5x Plugins Published |
| Languages | Java, Python, JS, TS, Rust, Go, Swift, PHP |
| Frontend | React, Vue, Angular, HTML/CSS |
| Databases | PostgreSQL, MySQL, MongoDB |
| Caching | Redis, Memcached |
| Enterprise | L'Oréal, Amadeus, Konica Minolta, Orange |
| Digital | 1&1 Internet, Sedo.com, Creditsafe |
| Public | DRK, Kanton Basel, Aktion Mensch, Börsenverein |