The ESP32 Flash Download Tool, just like the ESP8266 download tool, is the official Espressif Download tool that runs on Windows platform. The tool can be used to modify and generate init BINs, generate consolidated BIN files or program multiple chips for production runs.
The tool uses COM port to send BIN files from PC to the ESP32, which then flashes the data to the primary flash chip.
Download ESP32 Flash Download Tool
There are multiple approaches to flashing the BIN files on to your ESP32 based system. Perhaps the simplest method to use with Espressif ESP32 ESP-IDF is to use command
in the Linux environment instead of just
as instructed in Getting Started with ESP-IDF Part – 3.
make flash will invoke scripts to actually flash your BIN files to your ESP32 through the USB-to-UART adapter. However, this may not work very well if you are running the Linux environment on a Virtual Machine. In that case, the flash download tool comes in handy!
However, here we will go through the process of programming the ESP32 with the GUI based ESP32 Flash Download Tool. It is the official tool from Espressif Systems, the manufacturer of ESP32.
To proceed with the article, download the flash tool from here:
ESP32 Flash Download Tool Interface
- Select a particular tab to find related options. Select HSPI tab for HSPI flash download. In general, you should use SPI download mode.
- BIN files to be downloaded. The checkbox must be checked and the file and address must be valid for a file to be successfully opened by program for download.
- Crystal Frequency should be the frequency of the crystal connected to your ESP32 module.
- SPI Flash speed. You may switch to 80MHz with fast flash chips. However, the ESP-IDF v.1.0 seems to be having issues with this higher than 40MHz.
- Tells about the current operation status. Whether the download tool is idle or running, etc.
- Start/Stop button to start or stop programming.
- Progressbar to indicate firmware download program.
- COM port settings such as baud rate and port number.
- PHY MAC IDs for Wifi, BLE, ethernet, etc.
- Information on the flash chip. This is acquired by low level API and this information is necessary for evaluating flash map, etc at runtime.
- Flash memory size. Most modules will contain the ESP32 hooked to a Winbond 32MBit flash memory. You may change accordingly if your hardware differs.
Binary Download Locations
As in ESP32 ESP-IDF v.1.0 with no modified ld script files, the locations should be as follows for normal applications:
The flash map is very simple as the ESP-IDF does not support OTA in this version yet. Therefore, the system only consists of a bootloader, a data partition table and the main user application BIN (generated by you by compiling your code).
Downloading the Program
Pull GPIO0 LOW by pressing the “program” button on your development board. Reset the ESP32 by pressing the EN button momentarily while holding down the IO0 button.
Now the ESP32 will successfully enter the flash programming mode. You can now set the files and check the required BIN file slots in the software such that they are all set to be downloaded into the flash.
Next press the Start button to continue and flash the BIN files into your ESP32 module!
Make sure that the COM port has been correctly selected. The download tool would typically automatically detect an USB-UART converter.
Repeated Downloading (prototyping)
If you are repeatedly flashing revised versions of your application during the development process, note that you need not flash bootloader and singleapp partition BINs repeatedly.
You simply need to flash the