PlatformIO Community

Platformio won't recognize my upload port on my laptop

Hi All,

Bought an Arduino AT Mega2560 and am using visual studio code with PlatformIO. I set up a simple program to turn on LED lights. When I went to upload code it couldn’t talk to the development board. The error message was:

, 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//)

then i spent approximately 2 solid days trying to trouble shoot it. Didnt have any luck. I tried modifying the platformio.ini file to specify upload port.

I have a Lenovo Ideapad with 2 USB ports.


What is your platformio.ini and your OS? Do you see the ATMega or the USB-UART converter on your computer?

Thanks fo your reply. I have Windows 8.1. I do not see ATMeGA or USB-UART converter on my computer. My platformio.ini file is copied below:

; PlatformIO Project Configuration File
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
; Please visit documentation for the other options and examples

platform = atmelavr
board = megaatmega2560
framework = arduino

So problem #1 is that your Arduino doesn’t get recognized.

What does the device manager say? Do you have any COM ports? Any non-recognized USB devices?

I have 2 COM ports and they both work. When I plug in the cable to one of the USB com ports, I hear the sound that it recognized that something was plugged in but if I go to contro panel and look at devices and printers, it lists the connection to my Arduino board as unknown device. Is there a driver that I need to install?

Can you upload a screenshot of what you’re seeing?

What’s the type of USB-Serial chip you have on your board? Silabs CP210, CHG240, FTDI, …? There is a set of general drivers for a few different chips at

I took a screen shot of the USB drivers installed


That looks okay, what’s up in the COM ports? (the deactivated network adaper is ok)

when I plug in the Sunfounder MEGA 2560 board, it detects something is there but reports unknown device.

So what is the USB-UART chip on your board (see above)? Do you have a genuine board or a clone?

Ah, you already said you have the Sunfounder board, so it has a ATMega 16u2 chip as the UART bridge. Do the above Adafruit drivers help recognize the device? Flashing the board in the Arduino IDE should thus also fail, right?

I havent tried installing the Adafruit drivers yet. When you install Platform IO does it install drivers for the development boards? What type of driver does Platform IO expect to see if it does not install a USB driver?

I also have not installed Arduino IDE software. I went straight to the Platform IO software. Does Platform IO require Arduindo IDE software to be installed?

No, but PlatformIO needs to be able to speak to the boards, aka the drivers have to be installed, which Arduino IDE does. So, you do not need the Arduino IDE if you have working drivers for your board.

I finally got it to work by installing the Arduino IDE software. It had a driver for it. Platform IO does not have a driver. I recommend that Platform IO note that in the documentation somewhere. Thank you very much for your help.

use of an operational USB-cable is important, not all cables work. That solved this problem for me

1 Like

Very true… some USB cables are ‘charge only’ cables… and of the four connections for USB-A, only the two outer power lines are connected, not the inner two data pins… so it will power your device, but not talk to it.

Yes, but if you’re using a charge only cable, it will be obvious as you won’t hear Windows make the sound when it detects a device, and you won’t see a COM port for it.

In OP’s case, Device Manager was saying it had no driver for the board’s UART that it detected on the USB line.