0%

Arduino报错及其解决方法

缘由:

今天使用新的esp32开发板进行项目开发,在上手时发现无法通过Arduino IDE进行程序烧录,这在其他开发板中并未见过,鉴于往后开发过程中还会遇到许多报错信息,将其记录在此有助于后面的查阅及debug工作,故新开此文。

1. 换新开发板后出现A fatal error occurred: Timed out waiting for packet content错误

描述:换了新的esp32开发板,在下载程序过程中出现错误。具体错误信息如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Arduino:1.8.12 (Windows 10), 开发板:"ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 2MB (16Mb), 115200, None"

esptool.py v2.6
Serial port COM12
Connecting.......
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 30:ae:a4:97:d5:50
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
Compressed 8192 bytes to 47...

A fatal error occurred: Timed out waiting for packet content
A fatal error occurred: Timed out waiting for packet content

解决过程及解决方案:通过查阅网友的资料,并未能很好地解决问题,但其中在https://github.com/espressif/arduino-esp32/issues/2415找到了可能的思路,即程序下载过程中若有端口接线,可能会对下载过程造成影响。

尝试了几次,最后发现将VCCGND上的接线去掉后可以正常下载,初步判断为电压负载过低问题(硬件方面),具体是否为此问题也并无法尝试。

成功解决,下载程序时去掉多于连线即可。