From 0a389b17649ecfb136b2f3a10715dd300db48487 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 4 May 2020 06:20:47 +0200 Subject: [PATCH] esp_system: restore weak esp_reset_reason functions --- components/esp_system/panic.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/components/esp_system/panic.c b/components/esp_system/panic.c index 631a65649..7391bd0b0 100644 --- a/components/esp_system/panic.c +++ b/components/esp_system/panic.c @@ -340,4 +340,17 @@ void __attribute__((noreturn)) panic_abort(const char *details) *((int *) 0) = 0; // NOLINT(clang-analyzer-core.NullDereference) should be an invalid operation on targets while(1); -} \ No newline at end of file +} + +/* Weak versions of reset reason hint functions. + * If these weren't provided, reset reason code would be linked into the app + * even if the app never called esp_reset_reason(). + */ +void IRAM_ATTR __attribute__((weak)) esp_reset_reason_set_hint(esp_reset_reason_t hint) +{ +} + +esp_reset_reason_t IRAM_ATTR __attribute__((weak)) esp_reset_reason_get_hint(void) +{ + return ESP_RST_UNKNOWN; +}