ESP32 OTA 接口简略说明
ota源碼路徑:\esp-idf-v3.0\examples\system\ota\main\ota_example_main.c
?? ??? ??? ?1
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?esp_ota_get_boot_partition
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?boot
?? ??? ??? ?
?? ??? ?
?? ??? ??? ?2
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?esp_ota_get_running_partition
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?獲取當前系統執行的固件所在的Flash分區
?? ??? ??? ?
?? ??? ?
?? ??? ??? ?3
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?esp_ota_get_next_update_partition
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?獲取當前系統下一個(緊鄰當前使用的OTA_X分區)可用于燒錄升級固件的Flash分區
?? ??? ??? ?
?? ??? ?
?? ??? ??? ?4
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?esp_ota_begin
?? ??? ??? ?esp_ota_write
?? ??? ??? ?esp_ota_end
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?向可用的Flash分區(一般是OTA_X分區)刷入升級目標固件
?? ??? ??? ?
?? ??? ?
?? ??? ??? ?5
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?esp_ota_set_boot_partition
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?升級完成更新OTA data區數據,重啟時根據OTA data區數據到Flash分區加載執行目標(新)固件
?? ??? ??? ?
?? ??? ??
boot源碼路徑:\esp-idf-v3.0\components\bootloader\subproject\main\bootloader_start.c
?? ??? ??? ?1
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?load_partition_table
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?加載Flash分區表(從分區表找到OTA data區地址)
?? ??? ??? ?
?? ??? ?
?? ??? ??? ?2
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?get_selected_boot_partition
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?獲取Flash啟動分區(計算OTA data區數據得到)
?? ??? ??? ?
?? ??? ?
?? ??? ??? ?3
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?load_boot_imageunpack_load_app:
?? ??? ??? ?
?? ??? ??? ?
?? ??? ??? ?從Flash啟動分區加載解壓固件并執行
?
總結
以上是生活随笔為你收集整理的ESP32 OTA 接口简略说明的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OTA分区操作流程
- 下一篇: NRF52832编译micro-ecc是