platform = native

Native development platform is intended to be used for desktop OS. This platform uses built-in toolchains (preferable based on GCC), frameworks, libs from particular OS where it will be run.

For more detailed information please visit vendor site.


PlatformIO does not install automatically any toolchains for the native development platform. It depends on the system GCC toolchain that must be added to the PATH system environment variable.

Please open the system terminal and type gcc --version. If the gcc command is not found, you have to install the GCC toolchain manually depending on your operating system:

  • Windows - follow the MSYS2 installation guide and add the following paths to the PATH system environment variable:

  • Linux - open the system terminal and run the following commands:

    sudo apt update
    sudo apt install build-essential
  • macOS - open the system terminal and install Xcode Command Line Tools

    xcode-select --install

Running of Program

To execute a native program, you need to use exec target for the pio run --target command. Extra program arguments can be passed using the pio run --program-arg option.


> pio run -t exec

# extra args
> pio run -t exec --program-arg "arg1" --program-arg="--option1=value1"

# or short format
> pio run -t exec -a "arg1" -a "--option1=value1"


Examples are listed from Native development platform repository:

Stable and upstream versions

You can switch between stable releases of Native development platform and the latest upstream version using platform option in “platformio.ini” (Project Configuration File) as described below.


; Latest stable version
platform = native
board = ...

; Custom stable version
platform = native@x.y.z
board = ...


platform =
board = ...