From 2a34c37181a598ddba5cd58792343215b2cd61f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 24 Oct 2022 18:27:19 +0200 Subject: [PATCH] minor: fix debug messages --- examples/device/dfu_freertos/src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/device/dfu_freertos/src/main.c b/examples/device/dfu_freertos/src/main.c index f2e94b336..a2ada19a4 100644 --- a/examples/device/dfu_freertos/src/main.c +++ b/examples/device/dfu_freertos/src/main.c @@ -111,6 +111,7 @@ static void dl_task(void* arg) if (0 == dl_method) { // using OTA tools // get handle for OTA update if (0 == ota_handle) { + ESP_LOGD(TAG, "init OTA flash"); rc = esp_ota_begin(ota_part, OTA_SIZE_UNKNOWN, &ota_handle); if (ESP_OK != rc) { ESP_LOGE(TAG, "init OTA failed"); @@ -177,6 +178,7 @@ static void dl_task(void* arg) static void complete_task(void* arg) { esp_err_t rc; + // finish flashing if (ota_handle) { rc = esp_ota_end(ota_handle); @@ -215,12 +217,13 @@ static void complete_task(void* arg) int main(void) { board_init(); + const esp_partition_t *next = esp_ota_get_next_update_partition(NULL); esp_app_desc_t next_desc; esp_ota_get_partition_description(next, &next_desc); if (ESP_APP_DESC_MAGIC_WORD == next_desc.magic_word) { - ESP_LOGI(TAG, "boot set to valid app"); + ESP_LOGI(TAG, "set app for next boot"); esp_ota_set_boot_partition(next); } else { ESP_LOGI(TAG, "no valid app");