Hello,
platformio.ini has extra_configs = node.ini and extra_scripts = extra_script.py.
node.ini has also extra_scripts = extra_script2.py. Sadly node.ini overwrites extra_scripts of platformio.ini.
Is it possible to append to the global extra_scripts variable from subconfigs?
Thanks!
Best wishes,
Ivan
As noted in the docs.
Note
If you declare the same pair of “group” + “option” in an extra configuration file which was previously declared in a base “platformio.ini” (Project Configuration File), it will be overwritten with a value from extra configuration.
That has to be refactored into two separate attributes which will then be merged. The docs have an example on this with build_flags
which is constructed through the build flags of a base environment and an own extension of it, referenced by the base environment name.
build_flags = ${common.lib_flags} ${common.debug_flags}
Your base environment (example: base_env
) should not define extra_scripts
, but e.g. a base_extra_scripts
field. Environments extending this environment can then do extra_scripts = ${base_env.base_extra_scripts} extra_script2.py
.
Thanks for explaining so much stuff maxgerhardt! I appreciate it!