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.
Jul 15, 2019.
- 690 Bibo Road Block 2 Suite 204, Zhangjiang Shanghai, China. English; 简体中文 /.
- Hiding all non-essential options for flashing. All necessary options for flashing (bootloader, flash mode) are automatically extracted from the binary. This project was originally intended to be a simple command-line tool, but then I decided that a GUI would be nice.
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
in the Linux environment instead of just
make
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:
- 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.
As in ESP32 ESP-IDF v.1.0 with no modified ld script files, the locations should be as follows for normal applications:
0x1000: bootloader.bin
0x4000: partitions_singleapp.bin
0x10000: .bin
0x4000: partitions_singleapp.bin
0x10000: .bin
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).
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.
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 .bin every time you update your program and generate an updated BIN file. Uncheck the bootloader and partition BINs to prevent unnecessary writes to the flash.
If you have not already, we urge you to go through our tutorials on ESP32 ESP-IDF:
ESP-IDF Tutorial Part 1
ESP-IDF Tutorial Part 2
ESP-IDF Tutorial Part 3
ESP-IDF Tutorial Part 1
ESP-IDF Tutorial Part 2
ESP-IDF Tutorial Part 3
Scroll down to the bottom of the page and SUBSCRIBE to us to stay updated!
If you have one or more of these little ESP8266 WiFi modules, sooner or later you will want to update their firmware. Espressif, the module's maker has been regularly releasing firmware updates introducing new functionalities and bug fixes. So, let's give it a try!
In previous posts I demonstrated how to connect the ESP8266 to a computer and test it. You may want to check it out if you don't yet know how to do that. Check the shortcuts at the end of this post.
Which firmware?
You can choose between firmware's with OS or without OS (NONOS). A firmware with OS will make your module a bootable device able to work by its own. You can even develop and upload a customized firmware. There are firmware's from different sources spread across the Internet, some quite suspicious. I recommend to go with a 'trusted' source like AI-Thinker or Espressif. For this guide I will be using firmware from Espressif, the maker of the modules.
I am using a 4Mbit module and, at the time of writing, the latest firmware from Espressif that will 'fit' this memory size is esp8266_nonos_sdk_v1.4.0_15_09_18_0. If your module has 8Mbit flash or more, you can update to a newer version. You can download ESP8266 firmware from Espressif here.
What firmware flasher tool?
To upload the firmware to the ESP8266 we can use several programs. I will be using the free ESP FLASH TOOL from Espressif, the maker of the modules. The latest version is 2.4, you can get it here.
Firmware download mode
Before the firmware can be uploaded, the ESP8266 module must be in firmware download mode. This is done by connecting GPIOØ pin to ground (GND).
Get ESP8266 module info
Once the module is in download mode, powered up and connected to a computer:
- Check the correct COM port is selected in ESP FLASH TOOL. The default Baud rate should work. In case it doesn't try different values.
- Click the START button.
The program should display SYNC in a green square left of the start button. It will retrieve the MAC address, memory size and crystal frequency, among other info. .
Select and upload firmware files
Now that we know the ESP flash download tool is communicating with our module:
- Select the correct flash memory size and crystal frequency. Note: sometimes the program retrieves a wrong crystal frequency (24Mhz or 21Mhz for example).
![Esp download tool Esp download tool](/uploads/1/2/6/7/126791606/524810613.png)
Now, depending on the firmware we want to use, we need to select one or more files in the ESP Flash Download Tool Download Path Config panel. Each of these files must be loaded to the correct memory address. This information should be in a Readme file in the firmware archive file.
- For each file needed, click the ... button of the correct memory address and navigate to the .bin file.
- Check the selection box of each file/memory address.
- Press START.
After a few seconds, if the upload was successful, the ESP Flash Download Tool will display FINISH.
Now that we successfully updated the firmware we must not forget to disable the firmware download mode by disconnecting the GPIOØ pin from ground!
In RealTerm, sending the AT+GMR command will show the new firmware info:
Be aware that the firmware upgrade might change the ESP8266 baud rate. In this case you must change the baud rate in RealTerm also!
I have uploaded a ESP8266 firmware upgrade video tutorial to YouTube. Please check it out and give it a thumbs up if you like it!
Downloads:
Download ESP FLASH DOWNLOAD TOOL
Download ESP8266 firmware
Download RealTerm
Buy the Parts:
Buy the ESP8266 Wi-Fi from Banggood
Buy the ESP8266 Wi-Fi from Dealextreme
Esp Flashing Tool
Buy the USB to Serial Adapter from Banggood
Buy the USB to Serial Adapter from Dealextreme
Previous ESP8266 posts:
ESP8266 ESP-01 testing - Part 2