ESP32-C5 devout fails to flash
Posted: Mon May 12, 2025 11:04 am
Hello,
I am experiencing issues when attempting to flash an ESP32-C5 dev kit ()ESP32-C5-Devkit-1 V1.2 using the IDF command line tools.
The applications build correctly but always fails of be flashed. Debug details below and would greatly appreciate any help to resolve this issue.
C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf>idf.py flash --force
Executing action: flash
Serial port COM6
Connecting....
Detecting chip type... ESP32-C5
Running ninja in directory C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build
Executing "ninja flash"...
[1/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\f...eworks/esp-idf-v5.4.1/examples/wifi/iperf/build/iperf.bin"
iperf.bin binary size 0xebcc0 bytes. Smallest app partition is 0x100000 bytes. 0x14340 bytes (8%) free.
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\f...5.4.1/examples/wifi/iperf/build/bootloader/bootloader.bin"
Bootloader binary size 0x57c0 bytes. 0x840 bytes (9%) free.
[4/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\f...sp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32c5 -p COM6 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x2000 bootloader/bootloader.bin 0x10000 iperf.bin 0x8000 partition_table/partition-table.bin --force
esptool.py v4.8.1
Serial port COM6
Connecting....
WARNING: This chip doesn't appear to be a ESP32-C5 (chip magic value 0x5fd1406f). Probably it is unsupported by this version of esptool.
Chip is ESP32-C5 (revision v1.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 48MHz
MAC: 30:ed:a0:ff:fe:e4:6c:50
BASE MAC: 30:ed:a0:e4:6c:50
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00002000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x000fbfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 22464 bytes to 13688...
A fatal error occurred: Packet content transfer stopped (received 4072 bytes)
CMake Error at run_serial_tool.cmake:67 (message):
C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5
failed.
FAILED: CMakeFiles/flash C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/CMakeFiles/flash
C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.4.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build -P C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\log\idf_py_stderr_output_5132 and C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\log\idf_py_stdout_output_5132
Error log contents
[1/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.4.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/partition_table/partition-table.bin C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/iperf.bin"
iperf.bin binary size 0xebcc0 bytes. Smallest app partition is 0x100000 bytes. 0x14340 bytes (8%) free.
[2/5] Performing build step for 'bootloader'
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x2000 C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/bootloader/bootloader.bin"
Bootloader binary size 0x57c0 bytes. 0x840 bytes (9%) free.
[3/5] No install step for 'bootloader'
[4/5] Completed 'bootloader'
[4/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.4.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build -P C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32c5 -p COM6 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x2000 bootloader/bootloader.bin 0x10000 iperf.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.8.1
Serial port COM6
Connecting....
WARNING: This chip doesn't appear to be a ESP32-C5 (chip magic value 0x5fd1406f). Probably it is unsupported by this version of esptool.
Chip is ESP32-C5 (revision v1.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 48MHz
MAC: 30:ed:a0:ff:fe:e4:6c:50
BASE MAC: 30:ed:a0:e4:6c:50
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
A fatal error occurred: bootloader/bootloader.bin requires chip revision in range [v0.0 - v0.99] (this chip is revision v1.0). Use --force to flash anyway.
FAILED: CMakeFiles/flash C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/CMakeFiles/flash
C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.4.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build -P C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
I am experiencing issues when attempting to flash an ESP32-C5 dev kit ()ESP32-C5-Devkit-1 V1.2 using the IDF command line tools.
The applications build correctly but always fails of be flashed. Debug details below and would greatly appreciate any help to resolve this issue.
C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf>idf.py flash --force
Executing action: flash
Serial port COM6
Connecting....
Detecting chip type... ESP32-C5
Running ninja in directory C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build
Executing "ninja flash"...
[1/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\f...eworks/esp-idf-v5.4.1/examples/wifi/iperf/build/iperf.bin"
iperf.bin binary size 0xebcc0 bytes. Smallest app partition is 0x100000 bytes. 0x14340 bytes (8%) free.
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\f...5.4.1/examples/wifi/iperf/build/bootloader/bootloader.bin"
Bootloader binary size 0x57c0 bytes. 0x840 bytes (9%) free.
[4/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\f...sp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32c5 -p COM6 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x2000 bootloader/bootloader.bin 0x10000 iperf.bin 0x8000 partition_table/partition-table.bin --force
esptool.py v4.8.1
Serial port COM6
Connecting....
WARNING: This chip doesn't appear to be a ESP32-C5 (chip magic value 0x5fd1406f). Probably it is unsupported by this version of esptool.
Chip is ESP32-C5 (revision v1.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 48MHz
MAC: 30:ed:a0:ff:fe:e4:6c:50
BASE MAC: 30:ed:a0:e4:6c:50
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00002000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x000fbfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 22464 bytes to 13688...
A fatal error occurred: Packet content transfer stopped (received 4072 bytes)
CMake Error at run_serial_tool.cmake:67 (message):
C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5
failed.
FAILED: CMakeFiles/flash C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/CMakeFiles/flash
C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.4.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build -P C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\log\idf_py_stderr_output_5132 and C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\log\idf_py_stdout_output_5132
Error log contents
[1/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.4.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/partition_table/partition-table.bin C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/iperf.bin"
iperf.bin binary size 0xebcc0 bytes. Smallest app partition is 0x100000 bytes. 0x14340 bytes (8%) free.
[2/5] Performing build step for 'bootloader'
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\examples\wifi\iperf\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x2000 C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/bootloader/bootloader.bin"
Bootloader binary size 0x57c0 bytes. 0x840 bytes (9%) free.
[3/5] No install step for 'bootloader'
[4/5] Completed 'bootloader'
[4/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.4.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build -P C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32c5 -p COM6 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x2000 bootloader/bootloader.bin 0x10000 iperf.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.8.1
Serial port COM6
Connecting....
WARNING: This chip doesn't appear to be a ESP32-C5 (chip magic value 0x5fd1406f). Probably it is unsupported by this version of esptool.
Chip is ESP32-C5 (revision v1.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 48MHz
MAC: 30:ed:a0:ff:fe:e4:6c:50
BASE MAC: 30:ed:a0:e4:6c:50
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
A fatal error occurred: bootloader/bootloader.bin requires chip revision in range [v0.0 - v0.99] (this chip is revision v1.0). Use --force to flash anyway.
FAILED: CMakeFiles/flash C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build/CMakeFiles/flash
C:\Windows\system32\cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.4.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c5 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Espressif/frameworks/esp-idf-v5.4.1/examples/wifi/iperf/build -P C:/Espressif/frameworks/esp-idf-v5.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.