Page 1 of 1

How to use delete OTA app?

Posted: Wed Nov 14, 2018 7:28 pm
by cwallach
I used OTA to flash application code. However, there is an exception during init that causes the system to reboot. It reboots, hits the exception, reboots, hits the exception....

I then rebuilt a new app without the problematic code.

OTA not longer works because of the reboots. So I hold the reset button and run make flash. When it catches the right time window the new app is flashed. However, the new app does not run. Instead the OTA app continues to run!

How does one delete the OTA app and/or force the "make flash" app to run?

Thanks

Re: How to use delete OTA app?

Posted: Wed Nov 14, 2018 11:27 pm
by ESP_igrr
In recent versions of esp-idf, when you run 'make flash', otadata partition responsible for selecting the app to boot is erased, in order to run the factory app. Can you check the output of 'make flash' and see which regions it writes? If it doesn't clear otadata, you may try doing 'make erase_flash' to clear entire flash contents, and then the 'make flash' again.

Re: How to use delete OTA app?

Posted: Thu Nov 15, 2018 7:09 pm
by fly135
You can also erase OTADATA by...

Code: Select all

$IDF_PATH/components/esptool_py/esptool/esptool.py --port com3 erase_region 0xd000 0x2000
Change the com port, offset, and size to match your setup.

John A