ESP32-C3 does not support erase-flash command?

dgduncan
Posts: 15
Joined: Wed Jan 12, 2022 4:47 pm

ESP32-C3 does not support erase-flash command?

Postby dgduncan » Wed Feb 23, 2022 10:36 pm

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?

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Thu Feb 24, 2022 1:33 am

How specifically did you try to erase the flash; can you post e.g. the esptool command line here?

dgduncan
Posts: 15
Joined: Wed Jan 12, 2022 4:47 pm

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

Postby dgduncan » Thu Feb 24, 2022 2:39 am

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.

dgduncan
Posts: 15
Joined: Wed Jan 12, 2022 4:47 pm

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

Postby dgduncan » Sat Feb 26, 2022 2:51 am

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

dgduncan
Posts: 15
Joined: Wed Jan 12, 2022 4:47 pm

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

Postby dgduncan » Sat Feb 26, 2022 8:55 pm

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.

Who is online

Users browsing this forum: No registered users and 119 guests