# PlatformIO

> **TL;DR**
> OS: Windows, Linux, macOS
>
>
>
> PlatformIO for CLion plugin: bundled

[PlatformIO](https://platformio.org/) is an open-source ecosystem for embedded development. It allows working with various MCUs, such as ARM Cortex, AVR, and MSP430, as well as development boards, frameworks, and environments, including Arduino and ESP-IDF.

CLion's integration with PlatformIO is provided by the [PlatformIO for CLion](https://plugins.jetbrains.com/plugin/13922-platformio-for-clion) plugin, created in collaboration with the PlatformIO team. It comes bundled with the IDE, so no separate installation is needed.

## Install PlatformIO

* To install PlatformIO, use the [installer scripts](https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html#super-quick-macos-linux) or one of the other [installation options](https://docs.platformio.org/en/latest/core/installation.html#core-installation).

* Make sure to [install Shell commands](https://docs.platformio.org/en/latest/core/installation/shell-commands.html).

## Create or open a PlatformIO project

Procedure: Create a new project

1. Call `File | New Project` from the main menu and select PlatformIO in the left-hand pane.

2. Set the project name, choose a board or framework, and click Create.

![Platformio project wizard](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_newprj_upd.png)

3. CLion will generate a PlatformIO project:

![New PlatformIO project generation](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_init_upd.png)

For Arduino-based boards, CLion generates `main.cpp` instead of `main.c` and fills it with Arduino-specific stub code:

![Arduino-specific source stub](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_arduino_stub_upd.png)

Procedure: Open a project

1. Click Open on the [Welcome screen](welcome-screen.html) or select `File | Open` from the main menu.

2. Navigate to the project folder and select the `platformio.ini` file.

3. Click Open as Project.

> **Note:**
> When you open a CMake-based PlatformIO project generated previously, you will be prompted to convert it into the new structure.
>
>
>
> If conversion fails, close the project, delete the `.idea` folder under the project root and reopen the project again.

## PlatformIO actions

Several [PlatformIO commands](https://docs.platformio.org/en/latest/core/userguide/index.html#commands) are available as IDE actions. In the main menu, go to `Tools | PlatformIO` or right-click `platformio.ini` in the Project tree and select the PlatformIO node:

![PlatformIO actions](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_actions_upd.png)

* Reload PlatformIO Project - calls [pio project init](https://docs.platformio.org/en/latest/core/userguide/project/cmd_init.html). Use this action to update your project following the changes in `platformio.ini`.

* Static Code Analysis - calls [pio check](https://docs.platformio.org/en/latest/core/userguide/cmd_check.html) for static code analysis.

* PlatformIO Serial Monitor - calls [pio device monitor](https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html).

* Update Platforms, Toolchains, etc - calls [pio pkg update](https://docs.platformio.org/en/latest/core/userguide/cmd_update.html).

* PlatformIO Home - calls `pio home` and opens [PlatformIO Home](https://docs.platformio.org/en/latest/home/) in your browser.

> **Tip:**
> You can also run PlatformIO commands from CLion's [built-in terminal](terminal-emulator.html).

## PlatformIO tool window

PlatformIO tool window gives quick access to the most used commands and project actions.

![PlatformIO tool window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_toolwindow_upd.png)

Hover over an action to see the corresponding command:

![Tooltips for commands in PlatformIO tool window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_toolwindow_tooltips_upd.png)

At the bottom, you can find the COM port switcher. Use it to configure the COM port number for upload if you don’t want to rely on automatic port detection.

## Debug features

The Debug action starts a debug session with [PIO Unified Debugger](https://docs.platformio.org/en/latest/plus/debugging.html#piodebug) by calling `pio debug`.

All the CLion [debug features](debugging-code.html) are available, including [peripheral registers view](peripheral-view.html), [memory view](memory-view.html), and [disassembly](disassembly-view.html).

If there is an `.svd` file for the given platform, CLion will load it automatically. You can also specify it manually:

![Specify the .svd file](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_loadsvd_upd.png)

## Coding assistance in platformio.ini

The Ini plugin, which comes in pair with the PlatformIO plugin, provides syntax highlighting, code formatting, and [structure view](file-structure.html) for `.ini` files.

To open the structure view for `platformio.ini`, open it in the editor and then select `View | Tool Windows | Structure` from the main menu or press `Ctrl+F12` (Windows), `⌘ F12` (macOS), `⌘ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ 7` (macOS System Shortcuts), `Ctrl+F12` (XWin), `Ctrl+F12` (GNOME), `Ctrl+0` (KDE), `Ctrl+F12` (Emacs), `Ctrl+R` (Sublime Text), `⌘ R` (Sublime Text (macOS)), `⌃ 6` (Xcode), `Alt+\` (Visual Studio), `⌥ \` (Visual Studio (macOS)), `Ctrl+F12` (ReSharper), `⌘ F12` (ReSharper (macOS)), `Ctrl+F12` (QtCreator), `⌘ F12` (QtCreator (macOS)), `Ctrl+F12` (NetBeans), `Ctrl+F3` (Eclipse), `⌘ O` (Eclipse (macOS)).

You can navigate to a property via Go to Symbol (`Ctrl+Alt+Shift+N` (Windows), `⌘ ⌥ O` (macOS), `⌘ ⌥ ⇧ N` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ O` (macOS System Shortcuts), `Ctrl+Alt+Shift+N` (XWin), `Ctrl+Alt+Shift+N` (GNOME), `Ctrl+Alt+Shift+N` (KDE), `Ctrl+Alt+Shift+N` (Emacs), `Ctrl+Shift+R` (Sublime Text), `⌘ ⇧ R` (Sublime Text (macOS)), `⌘ ⇧ O` (Xcode), `Ctrl+Alt+Shift+T` (Visual Studio), `⌘ ⌥ ⇧ T` (Visual Studio (macOS)), `Ctrl+Alt+Shift+N` (ReSharper), `⌘ ⌥ ⇧ N` (ReSharper (macOS)), `Ctrl+Alt+Shift+N` (QtCreator), `⌘ ⌥ O` (QtCreator (macOS)), `Ctrl+Alt+Shift+O` (NetBeans), `Ctrl+Alt+Shift+N` (Eclipse), `⌘ ⌥ O` (Eclipse (macOS)) or `Navigate | Symbol` in the main menu).

![Coding assistance for ini files](https://resources.jetbrains.com/help/img/idea/2026.2/cl_platformio_inifiles_upd.png)

Also, the Ini plugin provides [inspections](code-inspection.html) for detecting duplicate properties and sections. You can change the severity of these inspections and turn them on/off in `Settings | Editor | Inspections | Ini files`.

## See also

### Procedures

[STM32CubeMX projects](embedded-stm32.html) [IAR toolchain](iar-toolchain.html) [Peripheral view](peripheral-view.html)

