Platformio ESP32 on OSX - handling problems of 2 associated projects

Using OSX and platformio for UWB ecosystem having ESP32.
1.) Need to projects “sender” and “receiver”, Booth projects must simultan updated, so i have 2 projects open. both have a serial_uploadport with differnet names, fixes in platformio.ini. BUT dthe create/upload process dissmiss this port info and use the same device upload path in both projects !!!
2.) So reading docs, the platformio works on the current open file prjects, thats measn if i edit main1.c ot compies this project, working on main2.c then the other (and should use the decrivbed upload path se above …)
PLEASe COLOR the selctes project AND give an OUTPUT on the TERMINAL WINDOW wich project is about to be build !!!
3) For logic order reasn, i have project content in subfolders and they will shown in WORKSPACE window, but it does’nt compile in a logic way, :-/ only if in the workspace root … ?

No. Project and environment switching must be done explicitly since the last extension update (2.3.0). This was also updated in the documentation.

So platform.ini is only optional ?
that means it must defined in the project working cofiguration ?

No no, the platformio.ini is the source of all configuration options.

The platformio.ini can contain multiple environments (see docs), and you can have multiple projects open, each of which has a platformio.ini. Since the latest version, you have to select which project and environment you are currently working with via the selector as I’ve linked. Then, the buttons (like build and upload) will behave according to the selected project’s platformio.ini options for that environment.

OK, its irritating because : i have two projects which must be open at the same time.
SENDER and RECEIVER). Each of them has an OWN platformio.ini, wherein i define

upload_port = /dev/cu.usbserial-1003


upload_port = /dev/cu.usbserial-1002

But if starting cpl&upload it has alway usbserial-1003 :-/
HOW or WHERE i can see or choose the selected project (wich is to compile/upload)
i have the main.cpp open of booth but left side ist “PROJECT TAS” always only showing one configuration

The button is in the first documentation link that I posted, bottom of the screenshot.

If you don’t want to switch projects you can also put both firmware codes in the same src/ folder, create 2 environments and then write a src_filter expression for each of the environments.

but ist seems it is NOT logical !!!
the Button contains the name of the ENVS Varaibles declared platformio.ini.
so if i choose a correct ENV all is done in a right way. OK
BUT the PROJECT TASKS left side does list only a part of them ?
WHERE they come from - so i have two projects in my workspace, booth with their own INI,
wich of them is “active” ?
Maybe there is another one for describing the current workspace (which is holding to projects in my case, but maybe also more in the future for multiple devices ?)
Bildschirmfoto 2021-03-09 um 13.29.42