i hope i picked the correct categorie.
I’ve got a project with multiple envs defined in the platformio.ini to differentiate between varying pinouts. Building each of them by selecting “Build” under Project Task and the specific target works fine, though the macro expansion (i think done by the C/C++ extension) doesn’t update to the selected env.
I.e. i have a macro “LED”, which is defined by a Pin Number in the variant folder for Board X with 16 and Board Y 30.
Independent from the env i select to build the previewed macro expansion for LED gives 16 as long as Board X is set as default and 30 for Board Y is default. When the default entry is deleted in the platformio.ini, default (and therefore the behaviou) equals the first env in the list.
This issue isn’t a huge deal, though a bit enjoying when troubleshooting the code, especially if the macros are defined in different libraries .
Is there a solution or config of platformio/ c exstension to avoid this behaviour?
Or is it possible to set the default env while building and adapt it to the selected one?
Thanks in advance