是否遇到以下问题
一、上传失败: 上传错误:exit status 2
esptool.py v4.5.1
Serial port COM4
Connecting…
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
上传失败: 上传错误:exit status 2
二、没有买烧录小板
解决办法
一、先准备下列工具
1、ESP32-CAM
2、USB转TTL
3、5根母对母杜邦线
4、安装了ESP32支持的Arduino IDE
二、具体步骤
1、按下图接好后,再将USB转TTL插到电脑上
2、Arduino IDE按下图设置(COM口要根据实际使用选择)
3、打开IDE中的串口监视器
5、按一下ESP32-CAM上的RST按键,直到串口监视器出现 “waiting for download”
6、此时点击上传程序,就可以烧录成功了
项目使用 819165 字节(26%)的程序存储空间。最大值为 3145728 字节。
个全局变量使用 33612 个字节(10%)的动态内存,剩下 294068 个字节用于局部变量。最大值为 327680 字节。
esptool.py v4.5.1
Serial port COM4
Connecting.....
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:eb:d6:77:dd:a4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000d8fff...
Compressed 18960 bytes to 13073...
Writing at 0x00001000... (100 %)
Wrote 18960 bytes (13073 compressed) at 0x00001000 in 0.7 seconds (effective 223.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 114...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (114 compressed) at 0x00008000 in 0.1 seconds (effective 271.6 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 396.7 kbit/s)...
Hash of data verified.
Compressed 819536 bytes to 517477...
Writing at 0x00010000... (3 %)
Writing at 0x00019ab1... (6 %)
Writing at 0x0001ddf6... (9 %)
Writing at 0x00022296... (12 %)
Writing at 0x00026d84... (15 %)
Writing at 0x0002b9f6... (18 %)
Writing at 0x0003067e... (21 %)
Writing at 0x00035198... (25 %)
Writing at 0x00039ef4... (28 %)
Writing at 0x0003ea9a... (31 %)
Writing at 0x00042e8f... (34 %)
Writing at 0x000472d9... (37 %)
Writing at 0x0004b682... (40 %)
Writing at 0x0004f885... (43 %)
Writing at 0x00053c0a... (46 %)
Writing at 0x00057efe... (50 %)
Writing at 0x0005f633... (53 %)
Writing at 0x00076391... (56 %)
Writing at 0x0007b8d4... (59 %)
Writing at 0x00081216... (62 %)
Writing at 0x00086d0b... (65 %)
Writing at 0x0008c1e9... (68 %)
Writing at 0x00091a76... (71 %)
Writing at 0x00097617... (75 %)
Writing at 0x0009e729... (78 %)
Writing at 0x000a5748... (81 %)
Writing at 0x000addea... (84 %)
Writing at 0x000b5124... (87 %)
Writing at 0x000be9e8... (90 %)
Writing at 0x000c5021... (93 %)
Writing at 0x000ce251... (96 %)
Writing at 0x000d4c2a... (100 %)
Wrote 819536 bytes (517477 compressed) at 0x00010000 in 12.3 seconds (effective 534.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
7、最后断开IO0与GND的连接,再按一下RST键,你的程序就运行了。
8、如果想再次烧录程序,请重复以上步骤。