Mac 下刷 Esp32 micropython 固件

在 mac 下的 usb 串口与 windows 不同,查找对应的串口:

cd /dev && ls | grep cu

插拔对应的连接就可以确定是哪一个串口。

安装驱动:https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers

mac 需要安装额外的驱动,下载安装即可。

擦除固件:

esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART erase_flash

写入固件:

esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 460800 write_flash -z 0x1000 /Users/tangweinan/Downloads/esp32-idf3-20200902-v1.13.bin

输出如下及说明写入成功:

esptool.py v2.8
Serial port /dev/cu.SLAB_USBtoUART
Connecting........_
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 98:f4:ab:00:a8:0c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1448768 bytes to 926007...
Wrote 1448768 bytes (926007 compressed) at 0x00001000 in 21.6 seconds (effective 535.8 kbit/s)...
Hash of data verified.