From 89d39308a092d57d71264de96669ed0c6e241b55 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 2 Dec 2020 16:33:43 +0100 Subject: [PATCH] bootloader: avoid printing load addresses with '0x' Since idf_monitor decodes anything that looks like a code address and starts with 0x, bootloader logs often get annotated with function names such as WindowOverflow and other random and scary looking things unrelated to the issue the user is facing. Print the addresses without 0x to avoid confusion by decoded function names. Print hexadecimal size with 'h' suffix to distinguish it from the decimal value that follows. --- components/bootloader_support/src/esp_image_format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bootloader_support/src/esp_image_format.c b/components/bootloader_support/src/esp_image_format.c index 8c6e46a1c6..e61972f573 100644 --- a/components/bootloader_support/src/esp_image_format.c +++ b/components/bootloader_support/src/esp_image_format.c @@ -535,7 +535,7 @@ static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segme do_load = do_load && should_load(load_addr); if (!silent) { - ESP_LOGI(TAG, "segment %d: paddr=0x%08x vaddr=0x%08x size=0x%05x (%6d) %s", + ESP_LOGI(TAG, "segment %d: paddr=%08x vaddr=%08x size=%05xh (%6d) %s", index, data_addr, load_addr, data_len, data_len, (do_load) ? "load" : (is_mapping) ? "map" : "");