Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading code from platform IO to esp32

I'm sorry for that stupid question but I really can't find what I need.

I made a code to use a ESP Wrover 32 with PlatformIO/VScode and I need to upload the code to the ESP32 (connected to the computer using USB) but I can't find how to select the right USB port to upload the code.

The error is :

Please specify 'upload_port' for environment or use global '--upload-port' option.

I tried to use the command lines but nothing works.

How can I upload my code ?

Thanks

like image 217
Quentin Girault Avatar asked Jul 18 '26 11:07

Quentin Girault


1 Answers

To find the USB port: Hit WindowsKey-X, select Device Manager, plug in the device and observe what's listed under Ports (COM & LPT) - the one that just appeared has the port in brackets (COMn).

Then in platformio.ini in your PlatformIo initialised project folder, you specify the port as a line under the platform section (env: square brackets line): upload_port = com9 or whatever you got from Device Manager.

I hope this helps.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!