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

Dynamic flags does not seems to work #1799

Closed
fmuntean opened this issue Aug 21, 2018 · 1 comment
Closed

Dynamic flags does not seems to work #1799

fmuntean opened this issue Aug 21, 2018 · 1 comment
Labels
Milestone

Comments

@fmuntean
Copy link

I am trying to use the dynamic build flags as described here: docs.platformio.org/en/latest/projectconf/section_env_build.html#dynamic-build-flags

[my_environment]
build_flags = ${esp8266_4M.build_flags} -D PLUGIN_SET_MFD -D USE_CUSTOM_H -D FEATURE_ADC_VCC=true !python git_rev_macro.py

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
Copy link
Member

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
  !python git_rev_macro.py

It should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants