XIAO-esp32-c3 Firmware Flashing Problem

I just got Xiao-esp32-C3 from Digikey.
I wrote a simple program (Just print “Hello World” to serial port) to test it.
The first time I managed to flash the code into it; and it runs as expected.
However, I made small change to the code, and tried to flash it again. I got the following error:

In fact, I have a few pieces of esp32-c3, which I purchased awhile ago. The above error happens to those module too. I thought maybe they were damaged.
But for the new module, which I just got today, it also happens.

Can anyone tell me why?

Is there any requirement for the USB-C cable?
I wonder if it’s the cable that causes the problem.

See ESP32C3 wiki

Q1: My Arduino IDE is stuck when uploading code to the board[​]

(Getting Started with Seeed Studio XIAO ESP32C3 | Seeed Studio Wiki)

You can first try to reset the board by clicking the RESET BUTTON once while the board is connected to your PC. If that does not work, hold the BOOT BUTTON, connect the board to your PC while holding the BOOT button, and then release it to enter bootloader mode.

The RESET button method does not help.
After I used Boot-Button method, a new COM port is given by the OS for the esp32-c3 module.
But still has flashing code problem.

My Arduino IDE version is 2.2.1. I tried to run it with admin right; still the same problem.

Usually going into bootloader mode solves the problem of not being able to upload the program. Please check if the port of device manager is the same as the port selection of arduino. And check if you have correctly selected XIAO ESP32C3 as the board.

After I changed the USB cable, and tested on a new ESP32C3, the problem is gone.
However the previous board seemed damaged.
So I wonder whether there is current limit for the cable and the board.

One more thing:
when flashing firmware, do we need to close Arduino serial monitor?
I remember a few years ago, for the old version IDE, there is no need for that.

There are two things to try.
Re-write the boatloader according to the Wiki
When uploading a sketch, specify Erase All Flash Before Sketch Upload: "Enabled

1 Like

The link is here. You can have a try. @djsg

Hi DJSG, try this
Download the ‘Flash Download Tools’ from ‘Tools | Espressif Systems’ and ERASE Flash.
Then follow the instructions in the Wiki to rewrite the firmware.

OK, I followed that wiki, and flashed a bin file (ESP32-C3_RFTest_108_2b9b157_20211014.bin) onto it.

Then I tried to use Arduino IDE to flash my code into it, which is successful.
However, the serial monitor shows nothing but
ESP-ROM:esp32c3-api1-20210207.

The ESP32C3 requires a click on the reset switch to execute the code.