The UF2 bootloader of ESP32-S2 has now been merged into . It is mainly aimed at MCUs using , and currently supports ESP32-S2, iMXRT10xx, LPC55xx, and STM32F4. Using the UF2 bootloader, you can easily update the program in disk mode via USB without other software, which is very convenient. The following is how to install the UF2 bootloader in esp32-s2.
1. Before downloading Bootoader, you first need to update esptool.py to support esp32-s2.
pip install esptool --upgrade
2. Then download the corresponding firmware from the tinyuf2 website, or download the source code and compile it yourself. Because I have tested Espressif's Espressif SAOLAR1 WROOM development board before, I directly downloaded the corresponding firmware file.
3. Use a microUSB cable to connect the USB of the Espressif SAOLAR1 WROOM development board to the computer
4. Expand the zip firmware file and download the firmware through the command line
esptool.py --chip esp32s2 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition-table.bin 0xe000 ota_data_initial.bin 0x1000 bootloader.bin 0x2d0000 tinyuf2.bin
Note that you should change the serial port after -p /dev/ttyUSB0 to the corresponding serial port on your computer. If it is a Windows system, it is COMXXX (XXX is the serial port number).
After downloading, connect P19/P20 to the D-/D+ of the USB, and you can see the corresponding disk. For specific connections, please refer to this post: ESP32 - S 2- Saola -1 connect USB
|