Obtaining Firmware Flashing Information for Different Software Development Platforms (Development Stage)

[中文]

Note

This document is automatically translated using AI. Please excuse any detailed errors. The official English version is still in progress.

The firmware of a complete project developed based on the ESP-IDF SDK usually includes bootloader.bin, partition-table.bin, and app.bin.
  • bootloader.bin: is the second-stage bootloader

  • partition-table.bin: is the firmware for managing the Flash partition table, for detailed explanation, see: Partition Table

  • app.bin: is the firmware for executing user application functions

The download address (also called offset address) of the bootloader.bin of the non-series chip is fixed and does not support modification. The specifics are as follows:

Chip and bootloader.bin Download Address

Chip

bootloader.bin Download Address

ESP8266/ESP8285

0x0

ESP32

0x1000

ESP32-C2/ESP8684

0x0

ESP32-C3/ESP8685

0x0

ESP32-C5

0x2000

ESP32-C6

0x0

ESP32-S2

0x0

ESP32-S3

0x0

ESP32-H2

0x0

ESP32-P4

0x0

The specific firmware and corresponding download address generated by the project depend on the project’s partition table settings. Each project needs to set the corresponding partition table. The ESP-IDF SDK provides a series of default partition table files for users to use, see: esp-idf/components/partition_table in the .csv files.

Partition Table Files

Users can also set custom partition table files for the project, refer to: esp-idf/examples/storage/spiffs example. Create a .csv file in the project directory, and then refer to the Partition Table usage instructions for settings, such as the partition table file below:

Customer Partition Table

If the project uses a custom partition table file, you will need to set the custom partition table name and path in the project software configuration, as follows:

Customer Partition Setting

The software development of ESP series products supports various software development environments, commonly used software environments include ESP-IDF CMD terminal compilation environment, VSCODE IDE, Arduino IDE and other software environments.

1. Windows ESP-IDF CMD Software Compilation Environment

In the Windows ESP-IDF CMD software compilation environment, project configuration, compilation, download, and monitoring are all completed by executing specific commands. For example:

Users can execute the idf.py menuconfig command for project configuration

Partition table settings:

Partition Table Setting

Partition table download address setting:

Partition Table Address

After compiling the project using the Windows ESP-IDF CMD software compilation environment, the following log will be printed after the idf.py build command is executed to display the firmware generated by the current project and the corresponding firmware download address.

IDF CMD Build

Users can also directly open the flash_project_args file in the build folder to obtain firmware download information, as follows:

Flash File

Finally, users can directly run the idf.py flash monitor command to download the firmware and monitor the firmware operation log.

After obtaining the firmware and address compiled by the project, you can also refer to the Selecting the Suitable Flashing Platform section for firmware download.

2. VSCODE IDE Software Compilation Environment

In the VS CODE IDE environment, shortcut buttons are provided for software compilation, flashing, configuration, monitoring, and debugging, and users can directly complete specific settings through these buttons. For example:

Software settings: equivalent to the idf.py menuconfig configuration interface.

IDE  Menuconfig

Project Flashing: equivalent to idf.py flash.

During the project Flashing process, the firmware and corresponding download address of the project flashing will also be printed on the terminal running interface, as follows:

IDE  Flashing

After the project burning is completed, the log of the command running during the firmware flashing will also be printed, as follows:

IDE Flashing Log

Similarly, you can also directly open the flash_project_args file in the build folder generated by the project compilation to obtain firmware download information, as follows:

IDE Flashing File

After obtaining the firmware and address of the project compilation, you can also refer to the instructions in the Selecting the Suitable Flashing Platform section for firmware download.

3. Arduino IDE Software Compilation Environment

Open the example in Arduino IDE:

Arduino Examples

Arduino IDE Software Configuration:

Arduino Software Setting

Arduino IDE Firmware Download Log:

Arduino Flashing

Copy the log out, you can get the firmware and download address information corresponding to the project. As follows:

esp32s3 --port "COM4" --baud 921600  --before default_reset --after hard_reset write_flash  -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 "C:\Users\caiguanhong\AppData\Local\Temp\arduino\sketches\7B5F00811F0549D692D11436750291AC/I2S_Toggle_Test.ino.bootloader.bin" 0x8000 "C:\Users\caiguanhong\AppData\Local\Temp\arduino\sketches\7B5F00811F0549D692D11436750291AC/I2S_Toggle_Test.ino.partitions.bin" 0xe000 "C:\Users\caiguanhong\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\caiguanhong\AppData\Local\Temp\arduino\sketches\7B5F00811F0549D692D11436750291AC/I2S_Toggle_Test.ino.bin" esptool.py v4.8.1

Then, you can find the firmware of the corresponding project according to the path information provided by the log, as follows:

Arduino Firmware

After obtaining the firmware and address of the project compilation, you can also refer to the Selecting the Suitable Flashing Platform chapter for firmware download instructions.