How to burn firmware for ESP32 in MAC OS

edited January 16 in Crowbits

1. Install python2.7 and pip

a. python2.7 download address:

https://www.python.org/downloads/release/python-2715/

Please select the corresponding system python2.7 to download and install.

b. pip install:

sudo easy_install pip

c. After the installation is complete, open the terminal and enter python -V to see if the version is correct


2. Install esptool.py

esptool.py is a small tool developed in python for ESP32, which can implement low-level operations, including flash programming and erasing. It is an open source project and the project is hosted on github.

a. Hosting address:

https://github.com/espressif/esptool

b. Installation method:

pip install esptool

pip install pyserial

c. Test whether esptool.py works

Open the terminal and enter esptool.py to see if there is any output. If esptool.py is installed normally, it will output information similar to [ usage: esptool ].


3. Erase the flash (only required for the first programming)

Connect the USB port of the ESP32 to the PC, and then enter the following command in the terminal to erase the Flash:

esptool.py --chip esp32 --port /dev/cu.usbserial-006CB9B9 --baud 115200 erase_flash

( Notice: /dev/cu.usbserial-006CB9B9 is the default port number of the ESP32 serial port on the MAC. If the port cannot be found, please confirm whether the USB port of the ESP32 has been connected,

or use ls /dev/cu.usbserial* to check whether the port exists or the port name is not the default port number. If the port name is not the default port number, please replace /dev/cu.usbserial-006CB9B9 with the correct port name.)


4. Use the esptool.py command to flash the firmware

Switch the terminal path to the corresponding directory (for example: cd /Users/yikenuo/Desktop/Radar/bin), you can see the following files:

Radar

boot_app0.bin                         address: 0xe000

bootloader_dio_40m.bin                address: 0x1000

CrowRaderNew.ino.odroid_esp32.bin     address: 0x10000

default.bin                           address: 0x8000

 

phone

boot_app0.bin                         address: 0xe000

bootloader_dio_40m.bin                address: 0x1000

firmware.bin                          address: 0x10000

partitions.bin                        address: 0x8000

 

game console

bootloader.bin                        address: 0x1000

partitions.bin                        address: 0x8000

odroid-go-firmware.bin                address: 0x10000


Enter the following command in the terminal to start writing programme:

esptool.py --chip esp32 --port /dev/cu.usbserial-006CB9B9 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_40m.bin 0x10000 CrowRaderNew.ino.odroid_esp32.bin 0x8000 default.bin


( Notice:

a. Please replace xxx.bin in the above command with the real file name in the directory according to the actual name of the firmware to be burned.

b. Please replace /dev/cu.usbserial-006CB9B9 with the real port name under the command according to the actual port )

Comments

  • where do I find the latest firmware for the crowbits esp32+tft module?

Sign In or Register to comment.