简书链接:esp32C2刷入thonny之坑记录
文章字数:907,阅读全文大约需要3分钟
esp32- c2
image.png

https://micropython.org/download/ESP32_GENERIC/
固件
https://micropython.org/resources/firmware/ESP32_GENERIC-20231005-v1.21.0.bin
(2}P@A$YZKOCXVSM7PPC6(B.png
半天没反应使用命令装
pip install esptool

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
E:\Software\thonny-4.1.3-windows-portable> esptool --chip esp32 --port COM3 erase_flash
esptool.py v4.6.2
Serial port COM3
Connecting....

A fatal error occurred: This chip is ESP32-C2 not ESP32. Wrong --chip argument?

E:\Software\thonny-4.1.3-windows-portable> esptool --chip esp32-C2 --port COM3 erase_flash
esptool.py v4.6.2
Serial port COM3
Connecting....
Chip is ESP32-C2 (revision v1.0)
Features: WiFi, BLE
Crystal is 26MHz
MAC: 34:98:7a:0e:8f:34
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.1s
Hard resetting via RTS pin...

E:\Software\thonny-4.1.3-windows-portable> esptool --chip esp32-C2 --port COM3 erase_flash--baud 460800 write_flash -z 0
x1000

E:\Software\thonny-4.1.3-windows-portable> esptool --chip esp32 --port COM3 --baud 460800 write_flash -z 0x1000 E:\Softw
are\esp32fireware\ESP32_GENERIC-20231005-v1.21.0.bin
esptool.py v4.6.2
Serial port COM3
Connecting....

A fatal error occurred: This chip is ESP32-C2 not ESP32. Wrong --chip argument?

E:\Software\thonny-4.1.3-windows-portable> esptool --chip esp32-c2 --port COM3 --baud 460800 write_flash -z 0x1000 E:\So
ftware\esp32fireware\ESP32_GENERIC-20231005-v1.21.0.bin
esptool.py v4.6.2
Serial port COM3
Connecting....
Chip is ESP32-C2 (revision v1.0)
Features: WiFi, BLE
Crystal is 26MHz
MAC: 34:98:7a:0e:8f:34
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Unexpected chip id in image. Expected 12 but value was 0. Is this image for a different chip model?

最后发现我的esp32-c2感觉不是esp32虽然芯片是而是esp32的开头
19E(VU0MNN1(Y@7Y1O85QD4.png
界面并没有

image.png

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
E:\Software\thonny-4.1.3-windows-portable> esptool --chip esp32-c2 --port COM3 --baud 460800 write_flash -z 0x1000 E:\Software\esp32firewar
e\ESP8266_GENERIC-20231005-v1.21.0.bin
esptool.py v4.6.2
Serial port COM3
Connecting....
Chip is ESP32-C2 (revision v1.0)
Features: WiFi, BLE
Crystal is 26MHz
MAC: 34:98:7a:0e:8f:34
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Unexpected chip id in image. Expected 12 but value was 31168. Is this image for a different chip model?
Flash will be erased from 0x00001000 to 0x0009dfff...
Compressed 641212 bytes to 425908...
Wrote 641212 bytes (425908 compressed) at 0x00001000 in 9.9 seconds (effective 519.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

E:\Software\thonny-4.1.3-windows-portable>


总结,最后用esp8266刷入进去的
https://micropython.org/resources/firmware/ESP8266_GENERIC-20231005-v1.21.0.bin
所以他在老外那里就是esp8266

arduino这里的配置

http://arduino.esp8266.com/stable/package_esp8266com_index.json
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

image.png
2023-11-12 19:31:38
esp32camra刷入

camera_feeeb5ea3_esp32_idf4_4.bin```
这里flash_size改detect可能更好一些, 
esptool命令参考
https://www.python100.com/html/115966.html