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

Dynamic flags does not seems to work #1799

fmuntean opened this Issue Aug 21, 2018 · 1 comment


None yet
2 participants

fmuntean commented Aug 21, 2018

I am trying to use the dynamic build flags as described here:

build_flags = ${esp8266_4M.build_flags} -D PLUGIN_SET_MFD -D USE_CUSTOM_H -D FEATURE_ADC_VCC=true !python

It does not seem to insert the output of the python

running the python file directly shows the correct results.

this is the content of the python file
import subprocess

#revision = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
revision = subprocess.check_output(["git", "describe"]).strip()
print "-D BUILD_GIT=%s" % revision

I am running the platformIO under VSCode in Windows

Please help getting the dynamic build flag working

@ivankravets ivankravets added this to the 3.6.1 milestone Aug 31, 2018

@ivankravets ivankravets added the bug label Sep 21, 2018


This comment has been minimized.


ivankravets commented Oct 12, 2018

Thanks for the report!

  1. Please upgrade to the latest development version pio upgrade --dev
  2. Use dynamic build flags from the new line. For example,
build_flags =
  ${esp8266_4M.build_flags} -D PLUGIN_SET_MFD -D USE_CUSTOM_H -D FEATURE_ADC_VCC=true

It should work now.

@ivankravets ivankravets referenced this issue Oct 29, 2018


platformio 3.6.1 #33483

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment