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
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
PATHsystem environment variable:
C:\msys64\mingw64\bin C:\msys64\ucrt64\bin C:\msys64\usr\bin
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
> 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:
; Latest stable version, NOT recommended ; Pin the version as shown below [env:latest_stable] platform = native ; Specific version [env:custom_stable] platform = firstname.lastname@example.org
[env:upstream_develop] platform = https://github.com/platformio/platform-native.git