It's been several weeks since I last used the Arduino IDE. This morning, when I opened it, it wanted to update, so I did. Now, I am consistently unable to upload code to xiao esp32c3 boards. I have been able to do so before, and can't think of what might be causing this, except for some change from the update.
The issue persists across combinations of different cables and boards(both in a circuit and completely unconnected to anything), so I do not believe it is a hardware issue, or a problem with a specific board.
The code I am using is just the blink example sketch with #define LED_BUILTIN 4 added before the setup.
Very rarely, it will complete the upload, but in the vast majority of cases, it will fail. Shown below is an error message.
Sketch uses 254152 bytes (19%) of program storage space. Maximum is 1310720 bytes.
Global variables use 11780 bytes (3%) of dynamic memory, leaving 315900 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\ziadn\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.6/esptool.exe" --chip esp32c3 --port "COM10" --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 "C:\Users\ziadn\AppData\Local\arduino\sketches\16D1FF072F731880C53DFD9C0821CBF0/Blink.ino.bootloader.bin" 0x8000 "C:\Users\ziadn\AppData\Local\arduino\sketches\16D1FF072F731880C53DFD9C0821CBF0/Blink.ino.partitions.bin" 0xe000 "C:\Users\ziadn\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\ziadn\AppData\Local\arduino\sketches\16D1FF072F731880C53DFD9C0821CBF0/Blink.ino.bin"
esptool.py v4.6
Serial port COM10
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 64:e8:33:85:b6:04
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00050fff...
Compressed 18688 bytes to 12099...
Writing at 0x00000000... (100 %)
Wrote 18688 bytes (12099 compressed) at 0x00000000 in 0.3 seconds (effective 547.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 629.3 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 686.8 kbit/s)...
Hash of data verified.
Compressed 265120 bytes to 147030...
Writing at 0x00010000... (11 %)
Writing at 0x0001bc15... (22 %)
Writing at 0x00023ba0... (33 %)
Writing at 0x0002a283... (44 %)
Writing at 0x0003054a... (55 %)
Writing at 0x00036830... (66 %)
Writing at 0x0003ce9f... (77 %)
Writing at 0x000449cd... (88 %)
Writing at 0x0004a649... (100 %)
Traceback (most recent call last):
File "esptool_init_.py", line 1064, in main
File "esptool_init.py", line 859, in main
File "esptool\cmds.py", line 595, in write_flash
File "esptool\loader.py", line 131, in inner
File "esptool\loader.py", line 1032, in flash_defl_block
File "esptool\loader.py", line 435, in check_command
File "esptool\loader.py", line 404, in command
File "esptool\loader.py", line 337, in read
StopIteration
A fatal error occurred: The chip stopped responding.
Failed uploading: uploading error: exit status 2
The terminating error is either as shown or
A fatal error occurred: Packet content transfer stopped (received 0 bytes)
Failed uploading: uploading error: exit status 2
, but it doesn't always happen in the same place. Sometimes it comes after "stub running", sometimes in the middle of the "writing at..." messages, and sometimes at the end. Both means of entering bootloader mode have no effect. Once in a blue moon it will upload successfully, but not in a repeatable manner.
I've tried looking online, but can't find anything helpful given that this issue is occurring with multiple brand new boards, not connected to anything, not even pin headers.
any help would be greatly appreciated. Thank you.