esp8266 Firmware Burning User Manual 1.4
Article directory
- esp8266 Firmware Burning User Manual 1.4
-
- Burn
-
- Required hardware
- software tools
-
- vscode + platformIO
- flash_download_tools
- Wiring between socket and USB to TTL module
-
- esp8266 old version socket (3-pin base plate)
- esp8266 new version socket (4-pin base plate)
- bin firmware and burning address
-
- Obtain the detailed burning address and information of the user program
- Obtain the detailed burning address and information of the file system program
- vscode + platformIO burning method
-
- Compile and download
- Put the device into download mode
- flash_download_tools (old version) burning method
-
- Open flash_download_tools_v3.6.5
- Select ESP8266 DownloadTool
- Select the firmware and fill in the address, check SpiFlashConfig
- Select the serial port, baud rate, and click Start
- Put the device into download mode
- flash_download_tools (new version) burning method
-
- Open flash_download_tools_v3.9.5
- Select ESP8266, other defaults
- Select the firmware and fill in the address. Other configurations are as shown below
- Select the serial port, baud rate, and click Start
- Put the device into download mode
- esptool.py burning method
-
- Install esptool
- Burn
-
- Erase flash
- Burn *.bin
Kind tips:
1. The BOOT pin of esp8266 is GPIO0, which corresponds to the button of the socket
2. All programming-related pins have been reserved in the chip board. You can solder the leads as needed.
3. After downloading the program, when using the serial port to view the log, you need to use a 220v power supply (please be sure to observe power safety).
Reason: Since the socket contains power-consuming equipment such as relays and meters, the 3.3V voltage and current provided by the USB-to-serial port may be insufficient, which manifests as an intermittent connection between the USB-to-serial port and the computer, resulting in the inability to view the log.
Burn
Required hardware
Smart socket kit 1 piece
usb to ttl module 1
Several 4-5 Dupont lines
Acquisition method: Purchase on Taobao
Software Tools
vscode + platformIO
Applicability In the R&D learning and testing phase, there is engineering source code. You can use the development tool to compile the source code and download the program to the board. method of obtaining 1) Obtain it from the `Socket General Information/Software Tools/Development Software (platformIO self-installed)` directory, 2) You can also visit vscode official website to download https://code.visualstudio.com/
flash_download_tools
flash_download_tools_v3.6.5 (old version): It is a very practical ESP module burning software
flash_download_tool_3.9.5 (new version): It is a very practical ESP module burning software
Applicability Factory stage, no source code, only bin, you can use this tool to download firmware method of obtaining 1) Obtain it from the `Socket General Information/Software Tools/Firmware Download` directory, 2) You can also visit Espressif’s official website to download https://www.espressif.com/zh-hans/support/download/other-tools
Wiring between the socket and USB to TTL module
3.3V, gnd, RX, TX in the socket are connected to the 3.3V, gnd, TX, RX of USB to ttl
Line color description below:
Red: 3.3V
Black: gnd
Yellow: RX
Green: TX
esp8266 old version socket (3-pin base plate)
esp8266 new version socket (4-pin base plate)
bin firmware and burning address
Serial number | bin name | Description | Burning address | Applicable products |
---|---|---|---|---|
1 | firmware.bin | The main program generated by platformIO | 0x00000000 | Applicable to sse, ssa products |
2 | littlefs.bin | Generated by platformIO File system | 0x00300000 | Applicable to sse, ssa products |
View the bin address (the following part is for reference only)
For vscode + platformIO development method, you can create a new terminal under the project and enter
Get the detailed burning address and information of the user program
pio run -v -t upload
The main information is as follows:
–chip esp8266
Learned: .pio\build\esp12s_hlw\firmware.bin 0x0 under the project project
Get the detailed burning address and information of the file system program
pio run -v -t uploadfs "C:\Users\hbwang\.platformio\penv\Scripts\python.exe" "C:\Users\hbwang\.platformio\packages\[email protected]\esptool.py" --before default_reset -- after hard_reset --chip esp8266 --port "COM11" --baud 921600 write_flash 3145728 .pio\build\esp12s_hlw\littlefs.bin
Learned: .pio\build\esp12s_hlw\littlefs.bin 3145728 (0x00300000) under the project
vscode + platformIO burning method
Note: In order to reduce welding wires, the chip is reset by powering off and on the chip. You can also solder the EN pin lead and pull EN low and high to reset the chip.
Compile and download
Open code project
First click the
Compile
button to compile the project.Then click the
Download
button and wait for the device to enter download mode to download.At this step, for the new version of the esp8266 socket (4-pin base plate), you need to enter the download mode first, and then click the
Download
button
Compile and download button location screenshot
Compilation completed screenshot
Put the device into download mode
How to enter download mode 1. First power off the 8266 module (disconnect the 3.3V connection between the USB to serial port module and the 8266) 2. Pull the IO0 of the 8266 module low (that is, press and hold the ssa, sse socket button) 3. Then power on the 8266 module (connect the 3.3V wiring between the USB to serial port module and the 8266) 4. When downloading, IO0 should always be pulled low (i.e., press and hold the ssa, sse socket button) (Tip: For the old version of esp8266 socket (3-pin base plate), in this step, IO0 can be pulled high and the button released; esp8266 new version socket (4-pin base plate), in this step, IO0 also needs to be pulled down all the time, i.e. hold down the button, otherwise the programming will be disconnected ) 5. Wait until the download is complete. Note that IO0 of 8266 is the key for ssa and sse socket products.
flash_download_tools (old version) burning method
Open flash_download_tools_v3.6.5
Select ESP8266 DownloadTool
Select the firmware and fill in the address, check SpiFlashConfig
Select the SPIDownload tab, then click Add firmware.bin firmware, fill in its address 0x0000, add littlefs.bin file system firmware, fill in its address 0x300000. Then check the SpiFlashConfig configuration below, as shown in the figure below:
Select the serial port, baud rate, and click Start
Finally, select the com port (the serial port for USB to serial) and bit rate, and click START to start.
Put the device into download mode
How to enter download mode 1. First power off the 8266 module (disconnect the 3.3V connection between the USB to serial port module and the 8266) 2. Pull the IO0 of the 8266 module low (that is, press and hold the ssa, sse socket button) 3. Then power on the 8266 module (connect the 3.3V wiring between the USB to serial port module and the 8266) 4. When prompted to download, pull IO0 high (that is, release the ssa, sse socket button). 5. Wait until the download is complete. Note that IO0 of 8266 is a button for ssa and sse socket products.
flash_download_tools (new version) burning method
Open flash_download_tools_v3.9.5
Select ESP8266, other defaults
Select the firmware and fill in the address. Other configurations are as shown below
Select the serial port, baud rate, and click Start
Finally, select the com port (the serial port for USB to serial) and bit rate, and click START to start.
Put the device into download mode
How to enter download mode 1. First power off the 8266 module (disconnect the 3.3V connection between the USB to serial port module and the 8266) 2. Pull the IO0 of the 8266 module low (that is, press and hold the ssa, sse socket button) 3. Then power on the 8266 module (connect the 3.3V wiring between the USB to serial port module and the 8266) 4. When prompted to download, pull IO0 high (that is, release the ssa, sse socket button). 5. Wait until the download is complete. Note that IO0 of 8266 is a button for ssa and sse socket products.
esptool.py burning method
Install esptool
The prerequisite is to install python3
To check whether python is installed, you can open cmd, enter python and press Enter to check the python version. If it is not installed, please install it on Baidu yourself. As in my screenshot here:
After installing python, in the command line window
pip install esptool
Burning
Erase flash
esptool.py --port COM11 erase_flash illustrate: --port The port number of the USB-to-serial port that the PC connects to the device erase_flash erase operation
Burn *.bin
esptool.py --chip esp32-C3 --port COM11 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0000 D:\aa\bootloader .bin 0x8000 D:\aa\partitions.bin 0xe000 D:\aa\boot_app0.bin 0x10000 D:\aa\firmware.bin 0x3B0000 D:\aa\littlefs.bin Note: --chip chip model, modify according to your own situation --port The port number of the USB-to-serial port that the PC connects to the device is modified according to your own situation. --baud burning speed modified according to your own situation --before default_reset --after hard_reset reset both before and after write_flash write flash --flash_mode dio mode dio modified according to your own situation --flash_freq 80m frequency 80M Modify according to your own situation --flash_size 4MB, size 4M, modify according to your own situation Address + bin file Modify according to your own situation