ESP32 Bootloader - updating app

Jacek@dtm.pl
Posts: 11
Joined: Thu Jan 28, 2021 4:21 pm

ESP32 Bootloader - updating app

Postby Jacek@dtm.pl » Thu Dec 09, 2021 4:19 pm

I need firmware updating via BLE. I have main app, that can receive bin file via BLE. How and where i should save this file and what have to do after that, for updating and starting new app?
Should i make two partitions (eg. ota_0 and ota_1) and program firstly main app in one of this ? I use command line and type for flashing:
"idf.py -p COM flash". How can i flash to specified partition (ota_0)?
Than should i download bin file by main app and save it in some special place (ota_1? how?)
And last, should boot from ota_1? how?
Next updating should save bin file to ota_0 (when main app goes from ota_1)? How to check to which partition have to save bin file (or which is now used for runing app)?

I know that can also use secure boot and flash encryption, but i need just simple way for now, without secure boot and encryption, i'll thing about it in second iteration. Now, please help with simple updating app. I saw some example:
https://github.com/espressif/esp-idf/tr ... bootloader
but don't understand it.

Who is online

Users browsing this forum: No registered users and 45 guests