esp_app_format: Fixed build errors and resolved dependencies

This commit is contained in:
Laukik Hase
2022-07-29 16:07:04 +05:30
parent 0519f604db
commit 0071ea498f
14 changed files with 71 additions and 86 deletions

View File

@@ -24,9 +24,9 @@
#include "sdkconfig.h"
#if __has_include("esp_ota_ops.h")
#include "esp_ota_ops.h"
#define HAS_ESP_OTA 1
#if __has_include("esp_app_desc.h")
#define WITH_ELF_SHA256
#include "esp_app_desc.h"
#endif
#if CONFIG_ESP_COREDUMP_ENABLE
@@ -312,13 +312,13 @@ void esp_panic_handler(panic_info_t *info)
PANIC_INFO_DUMP(info, state);
panic_print_str("\r\n");
#if HAS_ESP_OTA
#ifdef WITH_ELF_SHA256
panic_print_str("\r\nELF file SHA256: ");
char sha256_buf[65];
esp_ota_get_app_elf_sha256(sha256_buf, sizeof(sha256_buf));
esp_app_get_elf_sha256(sha256_buf, sizeof(sha256_buf));
panic_print_str(sha256_buf);
panic_print_str("\r\n");
#endif //HAS_ESP_OTA
#endif
panic_print_str("\r\n");