Page 1 of 1

ESP32-C3 does not support erase-flash command?

Posted: Wed Feb 23, 2022 10:36 pm
by dgduncan
Hello,
When attempting to erase the flash of one of my boards today, I got the error
A fatal error occurred: ESP32-C3 ROM does not support function erase_flash.
esptool.py failed with exit code 2
This has started happening as of my upgrade from release/4.3 to release/4.4 of the ESP-IDF. Is this correct? And if so, is there an alternative to cleaning my flash for development?

Re: ESP32-C3 does not support erase-flash command?

Posted: Thu Feb 24, 2022 1:33 am
by ESP_Sprite
How specifically did you try to erase the flash; can you post e.g. the esptool command line here?

Re: ESP32-C3 does not support erase-flash command?

Posted: Thu Feb 24, 2022 2:39 am
by dgduncan
I did

Code: Select all

 idf.py -p COM12 erase-flash
I ran install.bat when I changed version and also ran export.bat to get all ENV variables.

Re: ESP32-C3 does not support erase-flash command?

Posted: Sat Feb 26, 2022 2:51 am
by dgduncan
Is there a

Code: Select all

menuconfig
item that may be doing this? I switched over to another project that was totally default and I had no issues erasing the flash

Re: ESP32-C3 does not support erase-flash command?

Posted: Sat Feb 26, 2022 8:55 pm
by dgduncan
I have figured out the problem. When switching the "Channel for console output" setting in menuconfig, it sets CONFIG_ESPTOOLPY_NO_STUB to Y. When this setting is changed to Y, erase-flash does not work. If you set the "Channel for console output" back to default, that setting does not get reset back to N.