espressif: Use BOOT_LOG_* macros instead of the MCUBOOT_LOG_*
Also refined the include directives, by removing unused headers and
making the usage of brackets and quotes a bit more coherent,
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
diff --git a/boot/espressif/main.c b/boot/espressif/main.c
index e0956af..22391d1 100644
--- a/boot/espressif/main.c
+++ b/boot/espressif/main.c
@@ -5,18 +5,19 @@
*/
#include <bootutil/bootutil.h>
+#include <bootutil/bootutil_log.h>
+#include <bootutil/fault_injection_hardening.h>
#include <bootutil/image.h>
-#include <mcuboot_config/mcuboot_logging.h>
+#include "bootloader_init.h"
-#include <os/os_malloc.h>
-#include <bootloader_init.h>
-#include <esp_loader.h>
+#include "esp_loader.h"
+#include "os/os_malloc.h"
void do_boot(struct boot_rsp *rsp)
{
- MCUBOOT_LOG_INF("br_image_off = 0x%x", rsp->br_image_off);
- MCUBOOT_LOG_INF("ih_hdr_size = 0x%x", rsp->br_hdr->ih_hdr_size);
+ BOOT_LOG_INF("br_image_off = 0x%x", rsp->br_image_off);
+ BOOT_LOG_INF("ih_hdr_size = 0x%x", rsp->br_hdr->ih_hdr_size);
int slot = (rsp->br_image_off == CONFIG_ESP_APPLICATION_PRIMARY_START_ADDRESS) ? 0 : 1;
esp_app_image_load(slot, rsp->br_hdr->ih_hdr_size);
}
@@ -26,7 +27,7 @@
bootloader_init();
struct boot_rsp rsp;
#ifdef MCUBOOT_VER
- MCUBOOT_LOG_INF("*** Booting MCUBoot build %s ***", MCUBOOT_VER);
+ BOOT_LOG_INF("*** Booting MCUBoot build %s ***", MCUBOOT_VER);
#endif
os_heap_init();
@@ -34,7 +35,7 @@
fih_int fih_rc = FIH_FAILURE;
FIH_CALL(boot_go, fih_rc, &rsp);
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
- MCUBOOT_LOG_ERR("Unable to find bootable image");
+ BOOT_LOG_ERR("Unable to find bootable image");
FIH_PANIC;
}
do_boot(&rsp);