Launch Types

There are two execution types for extra scripts:

  • PRE - executes before the main script of Development Platforms.

    Useful to pre-generate extra source files or make dynamic changes/patches to the existing, pass flags to the global building environment, add Build Middlewares, etc. Please note that the projenv (see Construction Environments) is not available at this stage.

  • POST - executes after the PRE and the main script of Development Platforms.

    The building environment is fully constructed at this stage with all build flags, development platform targets, dependent libraries, and projenv. Useful to assign Pre & Post Actions, modify default build flags set by the development platform, or extend the building workflow.

The extra scripts can be configured using the extra_scripts option in “platformio.ini” (Project Configuration File). The launch type can be specified as a prefix (pre: or post:) to the script path. If there is no prefix specified, the post: will be used automatically.


platform = ...
; Defaults to POST script since no prefix is used
extra_scripts =

platform = ...
extra_scripts =