PlatformIO tries to upload to wrong port (even if declared in platformio.ini)

Since a while (i don’t know, if it appears with a patch or something… didn’t use PIO for some time) i can’t upload code to my ESP32-boards any more.
Running VSCode with Ubuntu Linux, PIO always tries to upload code to /dev/cu.SLAB_USBtoUART (which is the standard port for Mac, as my research showed?) instead of /dev/ttyUSB0.

Adding “upload_port = /dev/ttyUSB0” in the platformio.ini does change just as little as un- and reinstalling VSC and/or PIO (with also deleting the settings in my /~ Directory).

Uploading the code with Arduino IDE works well, so it shouldn’t be a driver-related problem.
Does anyone have a solution for this?

The newest extension version introduced explicit switching of the project and environment. Are you double-sure that you’ve selected the right one?

:scream: this indeed solved my problem :man_facepalming:
Thank you alot!

1 Like

No problem. Indeed the switch to that was confusing for many users (Add a "Changelog" page on extension updates · Issue #2412 · platformio/platformio-vscode-ide · GitHub) and not properly communicated in e.g. update pages – there’s ongoing discussion at Having to separately select a default to compile and upload since v2.3.0 · Issue #2410 · platformio/platformio-vscode-ide · GitHub.