Advanced options


Type: String | Multiple: Yes

This option allows one to inherit configuration from other sections or build environments in “platformio.ini” (Project Configuration File). Multiple items are allowed, split them with , or with a new line.

If you need to extend only a few options from some section, please take a look at Interpolation of Values.


lib_ldf_mode = chain+
lib_compat_mode = strict

platform = espressif32
framework = arduino

extends = espressi32_base, strict_ldf
board = esp32dev
build_flags = -D RELEASE

extends = env:release
build_type = debug
build_flags = -D DEBUG


Please note that the extends option doesn’t merge values from multiple sections or environments. If multiple items specified in the extends field then only values from the latter one will be used in the final configuration. For example:

platform = teensy
framework = arduino
board = teensy31

lib_deps =
    monstrenyatko/ArduinoMqtt @ ^1.5.1
    bblanchon/ArduinoJson @ ^6.18.3
    knolleary/PubSubClient @ ^2.8

lib_deps =
    sstaub/Ticker @ ^4.3.0
    thijse/ArduinoLog @ ^1.1.1
    adafruit/RTClib @ ^1.14.0

extends = base, lib_deps1, lib_deps2
; The values from `lib_deps2` will override the values from lib_deps1, so
; the final `lib_deps` option will be equivalent to the following:
; lib_deps =
;    sstaub/Ticker @ ^4.3.0
;    thijse/ArduinoLog @ ^1.1.1
;    adafruit/RTClib @ ^1.14.0


Type: FilePath | Multiple: Yes

A list of PRE and POST extra scripts. Paths are relative to the project folder. See details and examples in the Advanced Scripting and Launch Types sections.

If you plan to share these scripts with Remote Development machine, please put them to shared_dir.

This option can also be set by the global environment variable PLATFORMIO_EXTRA_SCRIPTS.