Type: DirPath | Multiple: No | Default: “<Project>/src

The path to the project’s directory with source code. PlatformIO uses it for the pio run command. The default value is src meaning a src directory located in the root directory of the project.

This option can also be configured by the global environment variable PLATFORMIO_SRC_DIR.


This option is useful for people who migrate from Arduino IDE where the source directory should have the same name as the main source file. See example project with own source directory.