Error when uploading on ESP32 (upload_port error)

When I am trying to upload my code on an ESP32. I get this error

CURRENT: upload_protocol = esptool
Looking for upload port...
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)
*** [upload] Explicit exit, status 1

I already specified the upload port (in ini file) as follows

platform = espressif32
board = pico32
framework = arduino
monitor_speed = 115200
upload_port = COM[10]

I am using an auto-reset/flash circuit and I can see the COM communication is working fine and it manages to reset the ESP when opening the Serial monitor.

I am doubtful where is the source of the problem.

This regex expression will validate for either COM1 or COM0. Is your device on that COM port? If not, you’re using upload_port incorrectly.

1 Like

Thank you for your quick reply. well, it seems I was doing the stupid thing.
I just realized I should’ve wrote COM10 instead od COM[10]