I have a multienvironment project where each environment is responsible for one microcontroller. For this I have in src/ folder subfolders containing mains with setup() and main() function definitions. They are added in platformio.ini with src_filter.
I would like to introduce more modularity by writing in the subfolders kind of node.ini’s. They should be loaded dynamically with the help of an extra_script.py from top folders platformio.ini. platformio.ini should not have knowledge what node.ini’s can come. Everything what is responsible for one environment should stay in that node.ini (build and upload cmds)
For that I can imagine to load dynamically extra_configs or extending base envs. Is it possible to do something like this from extra_script? Is it possible to populate a new environment inside an extra_script.py?
Example project structure: