This error might be caused by the board not being able to support the rather high default upload speed. If so, the problem should be fixed by reducing the upload speed, which is configurable via a convenient menu.
Select Tools > Upload Speed > 115200 from the Arduino IDE menus and then try uploading the sketch again, just as you did before. Hopefully this time the upload will be successful. If not, add a reply here on the forum topic to let us know and we'll investigate further.
Optimizing Upload Speed
If the sketch upload no longer failed after reducing the upload speed, you will have determined that the board is not capable of managing uploads at the default 921600 baud, but is capable of them at 115200 baud.
Especially with more complex sketches, the upload will take a significant amount of time at 115200 baud. It is likely that the board is capable of managing uploads at some speed higher than 115200 baud, so it is worth doing some experimentation to determine the maximum speed at which you can reliably upload to the board. You can do this by repeating the "Configure Upload Speed" procedure above, but selecting different speeds each time. Then attempting an upload to see if the new speed is appropriate.
your board looks like a Espressif ESP32-S3-DevKitC-1 or similar
what Tools>Board have you selected? I use "ESP32S3 Dev Module"
have you tried a simple program such as blink? e.g.
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
#define LED_BUILTIN 97
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
delay(3000);
Serial.printf("\n\nESP32S3 Blink - LED_BUILTIN %d\n", LED_BUILTIN);
}
// the loop function runs over and over again forever
void loop() {
Serial.print('*');
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
are you sure you have the correct COM port?
if you run the Device Manager does COM port appear/disappear as plug/unplug the microcontroller?
if not do you get any message, e.g. "USB device not recognized"
disconnect everything (sensors/relays etc) from the board
try a different USB port
try a different USB cable (some are charge only)