Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include external configuration files #1590

lobradov opened this issue Apr 24, 2018 · 6 comments


6 participants
Copy link

commented Apr 24, 2018


It would be good if there would be a way to include other .ini files to form grand platformio.ini.

Something like:


env_default = my-device
extra_configs = 





Looking at Espurna (, you can notice that platformio.ini is quite big and has a lot of different environments. Managing that is a bit hard, given the volume. Ability to include parts of config would allow split into multiple files and better organize it.

Another problem are per-user definitions. Repo defines platformio.ini with quite a few boards, but any local customization needs to be committed (which would further grow variances) or overwritten on any sync with latest development progress. Enabling includes would allow custom environments to be placed in separate directory covered by .gitignore.

@ivankravets ivankravets added the feature label Apr 25, 2018

@ivankravets ivankravets changed the title Feature Request: include external environment definitions. Include external environment definitions. Apr 25, 2018


This comment has been minimized.

Copy link

commented Apr 25, 2018

As discussed in xoseperez/espurna#810, we changed the request to:

  • implement C-style #include "custom.ini" in platformio.ini to be able to include external files
  • add options to include wildcard files in directories, as in #include "directory/*.ini"

Thanks @ivankravets.


This comment has been minimized.

Copy link

commented Apr 26, 2018

I will Second that.
See also:
xoseperez/espurna#764 for improved folders structure that should be supported.
This feature will enable platformio users to add their own boards specific configs (and code) in folders structure and adding new boards just by dropping board_x folder that includes its specific platformio.ini env part without changing the main platformio.ini


This comment has been minimized.

Copy link

commented Apr 27, 2018

Also note I submitted a PR some time ago to allow multi-inheritance in the platformio.ini file at environment level... Not exactly the same idea as exposed here but still another way (compatible with the 2 above by @lobradov) to easy handling long definition files.



This comment has been minimized.

Copy link

commented Apr 27, 2018

@lobradov ini file is just an ini, I think syntax from first post is better (it is similar to lib_debs -

regardless the format this would be an awesome feature to have and project like ESPurna would benefit from it.

wildcard support would be even more awesome, this way we could have single folder called boards, and only thing to do would be to drop board_X.ini into that folder.

Really looking forward to seeing this 👍


This comment has been minimized.

Copy link

commented May 2, 2018

me too.

@ivankravets ivankravets added this to the 3.6.0 milestone May 25, 2018

@ivankravets ivankravets added the config label Jun 6, 2018

@ivankravets ivankravets added this to To do in PlatformIO 4.0 Dec 26, 2018

@ivankravets ivankravets changed the title Include external environment definitions. Include external configuration files May 3, 2019


This comment has been minimized.

Copy link

commented May 3, 2019


Please re-test with the latest pio upgrade --dev.


@ivankravets ivankravets moved this from To do to Done in PlatformIO 4.0 May 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.