- python ~/esp/esp-idf/components/esptool_py/esptool/esptool.py \
- --chip esp32s2 \
- -p /dev/ttyUSB1 -b 460800 \
- --before=default_reset \
- --after=no_reset \
- --no-stub write_flash \
- --flash_mode dio \
- --flash_freq 80m \
- --flash_size keep \
- 0xc000 build/partition_table/partition-table.bin \
- 0x13000 build/ota_data_initial.bin \
- 0x20000 build/air2color_pro.bin \
- 0x2a0000 build/storage.bin
Equipment: ESP32-S2-WROVER with SDK esp-idf.v5.0-dev-4770-gd622bcfd46
The Problem: flashing above flash offset of 2 MB fails if secure boot is enabled
Executing "idf.py flash" results in the following error message once the area > 2 MB is going to be flashed:
"A fatal error occurred: Failed to enter Flash download mode (result was 01060000)"
I tried to execute the subcommands manually:
And I have figured out that replacing "--flash_size keep" with "--flash_size 4MB" solves the problem.
Why does it not work using "idf.py flash"?
Flashsize is defined in sdkconfig:
- CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
- CONFIG_ESPTOOLPY_FLASHSIZE="4MB"