Can't upload sketch to ESP32-C3

Hi all,
I am trying to upload a simple sketch to my ESP32-C3 from Lolin using platformio.

It works perfectly if I switch to ESP32 but not on ESP32-C3.

this is the error:

Retrieving maximum program size .pio\build\glowwormluciferinfull_esp32\firmware.elf
Checking size .pio\build\glowwormluciferinfull_esp32\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  20.0% (used 65508 bytes from 327680 bytes)
Flash: [========  ]  77.3% (used 1013200 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-us
b-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM10
Uploading .pio\build\glowwormluciferinfull_esp32\firmware.bin
esptool.py v4.5.1
Serial port COM10

A fatal error occurred: Could not open COM10, the port doesn't exist
*** [upload] Error 2
============================================== [FAILED] Took 5.88 seconds ==============================================

Environment                  Status    Duration
---------------------------  --------  ------------
glowwormluciferinfull_esp32  FAILED    00:00:05.883
======================================== 1 failed, 0 succeeded in 00:00:05.883 ========================================


Process finished with exit code 1

this is my platformio.ini

[env:glowwormluciferinfull_esp32]
platform = espressif32@6.2
board = lolin_c3_mini
board_build.mcu = esp32c3

any idea on what could it be the problem? thanks

Ports starting at 10 must be specified with the special syntax

upload_port = \\.\COM10

in Windows.

https://support.microsoft.com/en-us/topic/howto-specify-serial-ports-larger-than-com9-db9078a5-b7b6-bf00-240f-f749ebfd913e

I have another error now:

Retrieving maximum program size .pio\build\glowwormluciferinfull_esp32\firmware.elf
Checking size .pio\build\glowwormluciferinfull_esp32\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  21.7% (used 71052 bytes from 327680 bytes)
Flash: [========  ]  82.4% (used 1079525 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex
-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: \\.\COM10
Uploading .pio\build\glowwormluciferinfull_esp32\firmware.bin
esptool.py v4.5.1
Serial port \\.\COM10
Connecting...
Device PID identification is only supported on COM and /dev/ serial ports.
.

A serial exception error occurred: Write timeout
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or
drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
*** [upload] Error 1

Very borked. Is this your board?

https://www.wemos.cc/en/latest/c3/c3_mini.html

What happens without upload_port being set?

I have a lot of boards to try, I have dev kits from Espressif,
Tiny boards from Unexpected maker and boards from Lolin.

I have ESP32 C3, S2 and S3. every boards shows similar errors…

removing the upload_port does not solve the error.

I have done this:

Upload Code

  • Make C3 boards into Device Firmware Upgrade (DFU) mode.
    • Hold on Button 9
    • Press Button Reset
    • Release Button 9 When you hear the prompt tone on usb reconnection

as written here:
https://www.wemos.cc/en/latest/tutorials/c3/get_started_with_arduino_c3.html

and it started working. :slight_smile:

1 Like

Hi, I’m currently experiencing the same issue but with something that isn’t an Arduino board (which it appears to me what the same case for you).

To make this a bit more explicitly obvious what is meant by making the (in my case a) board into "Device Firmware Upgrade (DFU) mode. How did you do this?

Is Button 9 a physical button labelled 9?

Is the reset button a traditional reset button found on many Arduino boards?

Thank you in advance for having dedicated your time to sharing the solution to a problem which no longer is your problem, too many threads end with something along the lines of “I fixed it now thanks” without any explanation as to how.

hi,

I can’t upload firmware to esp32-c3 super mini

pload_port = \.\COM4 ← Com Ports" in Device Manager in Windows 10 when in DFU mode

;upload_speed = 2000000
upload_speed = 115200
monitor_speed = 115200

Thanks in advance for any help you may have,

Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:da:0c:8e:ba:e0
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Flash will be erased from 0x00000000 to 0x00003fff…
Flash will be erased from 0x00008000 to 0x00008fff…
Flash will be erased from 0x0000e000 to 0x0000ffff…
Flash will be erased from 0x00010000 to 0x000fafff…
Compressed 13216 bytes to 9529…

A fatal error occurred: Packet content transfer stopped (received 8 bytes)
*** [upload] Error 2