src_dir

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

The path to the project’s directory with source code. PIO 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.

Note

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.