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

Comments

Projects
None yet
2 participants
@fmuntean

fmuntean commented Aug 21, 2018

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 ivankravets added the bug label Sep 21, 2018

@ivankravets

This comment has been minimized.

Member

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

It should work now.

@ivankravets ivankravets referenced this issue Oct 29, 2018

Closed

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