platform-espressif32 icon indicating copy to clipboard operation
platform-espressif32 copied to clipboard

Add a build target for otatool.py

Open Ivorforce opened this issue 5 years ago • 2 comments

In espressif32, there is a script called otatool.py which lets you download or wipe partitions. There ought to be some kind of access to it (e.g. run -t otatool, same as menuconfig).

Why is this specifically important?

If you have setup an OTA updater, you might run into the same issue as I did: Once OTA updates are installed, Serial updates won't change anything anymore. The firmware partition is unused as long as there are OTA partitions that are marked as "working". To re-access the firmware partition, and fix potential startup bugs, you will have to wipe OTA partitions. And this is what otatool.py does.

Workaround

What I did was find the platformio python executable and run a hacked-together script in it. It is notable that otatool does not propagate any input from esptool back, and the device has to (silently) be restarted in download mode twice for it to work. This is however a problem on espressif's end.

I'd like to have support for otatool - and, even better, a "platformio tinker" command would be cool, since I had to manually find the python executable to run anything in it. But I guess this is outside the scope of this issue.

Ivorforce avatar Jul 10 '20 17:07 Ivorforce

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 21:07 stale[bot]

Bumping because of the bot. If further details are needed, please ask - I am willing to assist.

Ivorforce avatar Jul 31 '22 23:07 Ivorforce