How to use delete OTA app?

cwallach
Posts: 3
Joined: Thu Sep 20, 2018 9:49 pm

How to use delete OTA app?

Postby cwallach » Wed Nov 14, 2018 7:28 pm

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

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: How to use delete OTA app?

Postby ESP_igrr » Wed Nov 14, 2018 11:27 pm

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.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: How to use delete OTA app?

Postby fly135 » Thu Nov 15, 2018 7:09 pm

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

Who is online

Users browsing this forum: No registered users and 133 guests