Downloading Guide

[中文]

This guide takes ESP32-C5-WROOM-1 as an example to describe how to download AT firmware and flash it into the module. The same steps apply to other ESP32-C5 modules.

Before downloading and flashing AT firmware, ensure that the hardware is connected correctly. See Hardware Connection.

The AT commands supported by the default firmware differ across module series. See ESP-AT Firmware Differences.

Follow the steps below to download, flash, and verify the AT firmware.

Step 1. Download AT Firmware

Go to ESP32-C5 Released Firmware, download the firmware for your module, and extract the package.

See ESP32-C5-4MB Series for ESP32-C5-WROOM-1 firmware.

The factory directory contains two combined factory bins. Either can be flashed to address 0x0:

  • factory/factory_ESP32C5-4MB_unfilled.bin (recommended): a single bin with all required functions, and the smallest and fastest to flash. Provided in newly released firmware packages. Necessary unused regions are filled with 0xFF up to the end of the AT application firmware esp-at.bin in the ota_0 partition. If the package does not include this file, use factory/factory_ESP32C5-4MB.bin.

  • factory/factory_ESP32C5-4MB.bin: a single bin with all required functions, but larger and slower to flash. The earlier fill method, still included in new firmware packages. Filling extends through the end of the last partition ota_1. The file size is typically 2 MB or 4 MB.

For other files in the package, see Appendix: Firmware Package Contents.

Step 2. Flash AT Firmware into Your Device

Choose a flashing method according to your use case.

Method

Recommended scenario

Notes

Method 1

First-time flashing or factory production

Flash one factory bin to 0x0. factory/factory_ESP32C5-4MB_unfilled.bin is recommended.

Method 2

Updating selected partitions or secondary development

Flash multiple bins to the addresses specified in download.config.

Flash Multiple Bins According to download.config

Use this method to update selected partitions or for secondary development. Configure the download address of each bin and the flash parameters according to download.config.

The download.config file of the ESP32-C5-WROOM-1 firmware is shown below:

--flash-mode dio --flash-freq 80m --flash-size 4MB
0x2000 bootloader/bootloader.bin
0xc000 partition_table/partition-table.bin
0xd000 ota_data_initial.bin
0x30000 at_customize.bin
0x31000 customized_partitions/mfg_nvs.bin
0xa0000 esp-at.bin

  • --flash-mode dio means the firmware is compiled with flash DIO mode.

  • --flash-freq 80m means the firmware’s flash frequency is 80 MHz.

  • --flash-size 4MB means the firmware requires a flash of at least 4 MB.

  • 0xd000 ota_data_initial.bin means downloading ota_data_initial.bin into the address 0xd000.

Windows

The tool configuration is the same as in Flash the Factory Bin (Recommended) for Windows, with the following differences:

  • Configure each bin and its address according to download.config.

  • Do not select “DoNotChgBin”. Set SPI SPEED and SPI MODE to match download.config.

    Download to Multiple Addresses

    Download to Multiple Addresses (click to enlarge)

When you finish flashing, check whether AT works.

Linux or macOS

Replace PORTNAME with the download interface of the board, replace download.config with the parameters in that file, and run the command in the extracted firmware directory. If you do not know the interface name, see Check port on Linux and macOS.

esptool --chip auto --port PORTNAME --baud 115200 --before default-reset --after hard-reset write-flash -z download.config

Below is the example command for ESP32-C5-WROOM-1.

esptool --chip auto --port /dev/tty.usbserial-0001 --baud 115200 --before default-reset --after hard-reset write-flash -z --flash-mode dio --flash-freq 80m --flash-size 4MB 0xc000 partition_table/partition-table.bin 0xd000 ota_data_initial.bin 0x2000 bootloader/bootloader.bin 0xa0000 esp-at.bin 0x30000 at_customize.bin 0x31000 customized_partitions/mfg_nvs.bin

When you finish flashing, check whether AT works.

Step 3. Check Whether AT Works

Open a serial port tool, such as SecureCRT. Connect to the port attached to the “AT command/response” line (see Hardware Connection) with the following settings:

Parameter

Value

Baudrate

115200

Data Bits

8

Parity

None

Stop Bits

1

Flow Type

None

New line

CR LF

Enter the command AT+GMR with a new line. If the response is OK as shown below, AT works.

AT+GMR
AT version:5.0.0.0(b0fe7e5 - ESP32C5 - Aug 22 2025 09:44:01)
SDK version:v5.5-beta1-695-ga3ca8669f24
compile time(7917c1fb):Aug 25 2025 15:10:23
Bin version:v5.0.0.0(ESP32C5-4MB)

OK

If there is no OK response, check the ESP32-C5 startup log to confirm that the firmware initialized correctly.

  • Open a serial port tool and select the port attached to the “Download/Log output” line. See Hardware Connection.

  • Set Baudrate to 115200, Data Bits to 8, Parity to None, Stop Bits to 1, and Flow Type to None.

  • Press the RST key of the board. If the log is similar to the reference log below, ESP-AT firmware has been initialized correctly.

Reference Log

ESP32-C5 startup log:

ESP-ROM:esp32c5-eco2-20250121
Build:Jan 21 2025
rst:0x1 (POWERON),boot:0x58 (SPI_FAST_FLASH_BOOT)
SPI mode:DIO, clock div:1
load:0x40855720,len:0x1b1c
load:0x4084bba0,len:0xdb8
load:0x4084e5a0,len:0x31f8
load:0x4085a000,len:0x222c
entry 0x4084bbaa
I (26) boot: ESP-IDF v5.5.1-833-gcc569cbd80-dirty 2nd stage bootloader
I (26) boot: compile time Nov 25 2025 03:43:46
I (27) boot: chip revision: v1.0
I (28) boot: efuse block revision: v0.2
I (31) boot.esp32c5: SPI Speed      : 80MHz
I (35) boot.esp32c5: SPI Mode       : DIO
I (39) boot.esp32c5: SPI Flash Size : 4MB
I (43) boot: Enabling RNG early entropy source...
I (47) boot: Partition Table:
I (50) boot: ## Label            Usage          Type ST Offset   Length
I (56) boot:  0 otadata          OTA data         01 00 0000d000 00002000
I (63) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (69) boot:  2 nvs              WiFi data        01 02 00010000 00020000
I (76) boot:  3 at_customize     unknown          40 00 00030000 00070000
I (82) boot:  4 ota_0            OTA app          00 10 000a0000 00220000
I (89) boot:  5 ota_1            OTA app          00 11 002c0000 00140000
I (95) boot: End of partition table
I (99) esp_image: segment 0: paddr=000a0020 vaddr=42170020 size=2c724h (182052) map
I (138) esp_image: segment 1: paddr=000cc74c vaddr=40800000 size=038cch ( 14540) load
I (142) esp_image: segment 2: paddr=000d0020 vaddr=42000020 size=16d084h (1495172) map
I (403) esp_image: segment 3: paddr=0023d0ac vaddr=408038cc size=19ff8h (106488) load
I (425) esp_image: segment 4: paddr=002570ac vaddr=4081d900 size=049b4h ( 18868) load
I (429) esp_image: segment 5: paddr=0025ba68 vaddr=50000000 size=000a4h (   164) load
I (437) boot: Loaded app from partition at offset 0xa0000
I (437) boot: Disabling RNG early entropy source...
I (948) at-init: at param mode: 1
I (1605) at-uart: AT cmd port:uart1 tx:23 rx:24 cts:25 rts:26 baudrate:115200
I (1607) at-init: module_name: ESP32C5-4MB
I (1608) at-init: max tx power=78, ret=0
I (1611) at-init: v5.0.0.0 (gitlab)

Appendix: Firmware Package Contents

The extracted AT firmware package has the following structure (see also Brief Introduction to AT Firmware):

.
├── at_customize.bin                 // secondary partition table
├── bootloader                       // bootloader
│   └── bootloader.bin
├── customized_partitions            // AT customized binaries
│   ├── mfg_nvs.csv                  // raw data of manufacturing nvs partition
│   └── mfg_nvs.bin                  // manufacturing nvs partition binary
├── download.config                  // configuration of downloading
├── esp-at.bin                       // AT application binary
├── esp-at.elf
├── esp-at.map
├── factory                          // Combined bins for factory downloading
│   ├── factory_XXX.bin              // Combined factory bin filled through the end of ota_1
│   └── factory_XXX_unfilled.bin     // Combined factory bin filled through the end of the AT application (recommended)
├── flasher_args.json                // flasher arguments
├── ota_data_initial.bin             // ota data parameters
├── partition_table                  // primary partition table
│   └── partition-table.bin
└── sdkconfig                        // compilation configuration for AT firmware