Flash failure Error 22, but with good serial connection

ptipaldo
Posts: 4
Joined: Sun Mar 23, 2025 8:05 pm

Flash failure Error 22, but with good serial connection

Postby ptipaldo » Sun Apr 20, 2025 6:08 pm

Hi all,

I have flashed my board before, however, I recently went to try again a few days ago and my flash command is not working anymore with error 22. (See picture).
I have since tried editing the run_serial_tool.cmake file but to no avail so far...
The weird thing here, atleast to me, is this seems to indicate a serial connection error to the device, however, I can run
idf.py monitor perfectly fine.... (also see below).
I can also connect to the device via serial port on putty too as well. So I think that indicates the serial connection is stable/can be established... which means this has to be a problem with the actual flash steps? Does anyone know what's going on here, or atleast, where the issue lies?
I even tried to run CMake manually (without idf.py flash) and still does not work with basically the same error...
I am using an ESP32c3 chip
esptool version 4.8.1
and esp-idf v5.4.1 offline installer
Attachments
serial monitor.png
serial monitor.png (95.47 KiB) Viewed 159 times
flash failure.png
flash failure.png (69.87 KiB) Viewed 159 times

ptipaldo
Posts: 4
Joined: Sun Mar 23, 2025 8:05 pm

Re: Flash failure Error 22, but with good serial connection

Postby ptipaldo » Tue Apr 22, 2025 12:29 am

Hi all, just to provide some clarity, it seems to be a CMake issue, here is the log file that the error references:
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/components/esptool_py/esptool/esptool.py;--chip;esp32c3
failed.

This is back to the standard build with no changes too... Even on a fresh install of the current v5.4 I cannot flash even an example project...

Who is online

Users browsing this forum: Applebot, ChatGPT-User, Qwantbot, Semrush [Bot] and 6 guests