Chapter 2. API Reference
• STR Mode (ESPTOOLPY_FLASH_SAMPLE_MODE_STR)
• DTR Mode (ESPTOOLPY_FLASH_SAMPLE_MODE_DTR)
CONFIG_ESPTOOLPY_FLASHFREQ
Flash SPI speed
Found in: Serial flasher config
The SPI flash frequency to be used.
Available options:
• 120 MHz (ESPTOOLPY_FLASHFREQ_120M)
• 80 MHz (ESPTOOLPY_FLASHFREQ_80M)
• 40 MHz (ESPTOOLPY_FLASHFREQ_40M)
• 26 MHz (ESPTOOLPY_FLASHFREQ_26M)
• 20 MHz (ESPTOOLPY_FLASHFREQ_20M)
CONFIG_ESPTOOLPY_FLASHSIZE
Flash size
Found in: Serial flasher config
SPI flash size, in megabytes
Available options:
• 1 MB (ESPTOOLPY_FLASHSIZE_1MB)
• 2 MB (ESPTOOLPY_FLASHSIZE_2MB)
• 4 MB (ESPTOOLPY_FLASHSIZE_4MB)
• 8 MB (ESPTOOLPY_FLASHSIZE_8MB)
• 16 MB (ESPTOOLPY_FLASHSIZE_16MB)
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT
Detect flash size when flashing bootloader
Found in: Serial flasher config
If this option is set, flashing the project will automatically detect the flash size of the target chip and
update the bootloader image before it is flashed.
Default value:
• Yes (enabled)
CONFIG_ESPTOOLPY_BEFORE
Before flashing
Found in: Serial flasher config
Configure whether esptool.py should reset the ESP32 before flashing.
Automatic resetting depends on the RTS & DTR signals being wired from the serial port to the ESP32.
Most USB development boards do this internally.
Available options:
• Reset to bootloader (ESPTOOLPY_BEFORE_RESET)
• No reset (ESPTOOLPY_BEFORE_NORESET)
Espressif Systems 1078
Submit Document Feedback
Release v4.4