Category:ESP8266 Program
Jump to navigation
Jump to search
Contents
Enter Into Flash Mode
- Most development board has auto enter into flash mode circuits, more commerial products do not really need this.
- Pull GPIO 0 of ESP8266 before power up or reboot to enter into flash mode. -> So simply hold down GPIO 0 and press once reset will enter into flash mode manully.
- Connect 3.3V/GND/TXD=>RXD/RXD->TXD to target, recommand USB-TTL downloader here
Programming
- Use Arduino-ESP8266 to compile and download
- Use ESP Download Tool (windows) to download firmware bin only
- Use ESPTool (linux) to download firmware bin only
Details For Firmware
Boot Process
- Reset vector is 0x40000080.
- Boots into Espressif code in IROM0.
- Loads SPI ROM data.
- Starts executing ESP SDK-code shadowed SPI ROM (unconfirmed).
SPI Flash ROM Layout
Address | Size | Name | Description |
---|---|---|---|
00000h | 248k | app.v6.flash.bin | User application |
3E000h | 8k | master_device_key.bin | OTA device key |
40000h | 240K | app.v6.irom0text.bin | SDK libraries |
7C000h | 8k | esp_init_data_default.bin | Default configuration |
7E000h | 8k | blank.bin | Filled with FFh. May be WiFi configuration. |
Debug
- Open arduino IDE, and set baud rate to 74880 on serial, can find esp8266 debug info.
Dump and mass deply
- After finish coding, upload your code lua into target board, better be complied
- dump out the flash content out and save as firmware.bin file for batch deploy
- use this firmware.bin for new products
- So first setup the esptool.py working environment
- read out the flash content by command
./esptool.py --baud 115200 --port /dev/ttyUSB0 read_flash 0 4194304 output.bin
- 4194304 mbits = 4MB, read flash time take at least more than 5 minutes
- 2097152 mb = 2MB, 1048576 mbits = 1MB, 524288 = 512 KB, 262144 = 256 KB
- use flash download tool flash normally
- Also can try dump mem out, like RAM, etc, dumping the ROM (64 KiB) from the chip:
./esptool.py dump_mem 0x40000000 65536 iram0.bin
Details For Boards
Flash Mode for ESP Relay Board Series
Product | Manully Enter Into Flash Mode | Note |
---|---|---|
ESP Relay Board SPST | The board has not reset pin lead out please hold down BTN2, and then power up | No need to connect AC mains power, supply 5V only |
ESP Relay Board DPST | Hold down BTN, and press RST once | - |
ESP Relay Board VDC | Hold down BTN, and press RST once | No need to connect AC mains power, supply 5V only |
ESP Relay Board IL | Hold down BTN, and press RST once | - |
ESP LEDs | Hold down IO0, and press RST once | - |
Programming Details for ESP Relay Board
- Our default firmware bin file can be found on this page, including arduino or nodemcu firmware.
- Serial port output debug information by our default firmwarem baudrate 115200.
- Get esp download tool from ESP_Download_Tool, flash .bin firmware file to board 0x00000, more instruction please see the page.
Documents
backup
Pages in category "ESP8266 Program"
The following 3 pages are in this category, out of 3 total.