Alright, dude, so where is my COM port?
Below is a run through of various scenarios and what can be done to get basic sketch uploading functionality working again and recover that missing COM port.
Is The Correct Board Selected?
This really isn't a COM port issue but is important to mention here. It is a very common source of issues and can also appear to be a failed upload. It doesn't help when there are a ton of similarly sounding board names - the Feather ESP32, Feather ESP32 V2, Feather ESP32-S2, and Feather ESP32-S3 are all different boards. Double check the correct board is selected in the Arduino IDE.
Did COM Port Change Location?
This seems to mainly happen on Windows. However, it's easy to check for any setup. Before uploading a sketch, double check the COM port setting in the Arduino IDE. Maybe it's there, but just given a new location that must be re-chosen in the Arduino IDE before uploading the sketch.
Serial Monitor or Plotter Left Open?
Leaving the Arduino Serial Monitor or Plotter open between sketch uploads may interfere. The host PC may retain whatever COM port it was using, waiting for more serial output. Then, when the board resets, the host PC may give it a new different COM port assignment. But the Arduino IDE is still set to the other one. So try closing the Serial Monitor and/or Plotter. If they are closed and the sketch upload is still failing, double check the Port setting in the Arduino IDE.
COM Port Not Showing Up Anywhere?
This process applies to boards with the following processors:
- ATmega32u4
- ATSAMD M0 and M4
If a COM port used to show up, but now can't be found anywhere, then recovery with some manual intervention is suggested. This situation generally happens as a result of a malformed sketch that "crashes" the board. So the general idea is to upload a known good sketch (Blink) and sort of "kick" the board during the upload process (press reset).
Why any given sketch causes this to happen is beyond the scope of this guide. Here, we only provide a way to recover basic functionality. This is important to help verify that the board hardware itself is OK.
- Turn on verbose upload in the Arduino IDE preferences.
- Plug in the Arduino board. It won't show up as a COM port. That is OK at this point.
- Open up the Blink example: File->Examples->Basics->Blink
- Double check the correct board in the Tools menu. Physically check your board to make sure you have the right one selected!
- Compile the sketch via the Verify (check mark) button just to make sure it works. This does not upload the sketch. That's next.
- Now click the Upload (arrow) button to attempt to upload the sketch.
- The IDE will print out a bunch of COM ports as it tries to upload. During this time, double-click the reset button.
- The board should show up as a COM port.
- The IDE should see that COM port and upload properly.
Boards with ROM Bootloaders and Native USB COM Ports
This process applies to boards with the following processors:
- ESP32-S2
- ESP32-S3
- ESP32-C3
This is similar to the above process, but is specific to boards that also have a ROM bootloader along with native USB used to provide the COM port. For these boards, manually entering ROM bootloader first can be used as a way to recover.
To enter ROM bootloader mode:
- Hold down the BOOT button
- Press and release the RESET button
- Release the BOOT button
A COM port should now show up and the Arduino IDE should be able to upload the Blink sketch.
RP2040 ROM Bootloader Specific
The Raspberry Pi RP2040 has native USB and a ROM bootloader. However, the ROM bootloader does not provide any serial connection and therefore no COM port. Instead, it only provides a USB Mass Storage Device (MSD) interface, which shows up as a folder named RPI-RP2. If an RP2040 board is refusing to accept an Arduino sketch upload for some reason, it should be possible to:
- Manually enter bootloader mode so the RPI-RP2 folder shows up in the host PC's file explorer (not in Arduino). See board specific info for how to enter bootloader mode.
- In Arduino, leave the Port selection blank.
- Double check the correct Board is selected.
- Upload the Blink example sketch.
Once the sketch upload is complete, the board should reset, the RPI-RP2 folder will not show up, the onboard LED should blink, and a now a serial port should be showing up in the Arduino IDE's Port selection.
Text editor powered by tinymce.