From 49af663dfb00addd3a863725f00d20e14fada692 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Mon, 6 Feb 2023 11:35:34 +0700 Subject: [PATCH] esp_system: fix gcc-12 compile errors --- components/esp_system/debug_stubs.c | 1 - components/esp_system/port/arch/riscv/panic_arch.c | 1 - components/esp_system/test/test_backtrace.c | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/esp_system/debug_stubs.c b/components/esp_system/debug_stubs.c index 7d1a255278..7de24bf1dd 100644 --- a/components/esp_system/debug_stubs.c +++ b/components/esp_system/debug_stubs.c @@ -55,7 +55,6 @@ static void esp_dbg_stubs_data_free(void *addr) { ESP_LOGV(TAG, "%s %p", __func__, addr); free(addr); - ESP_LOGV(TAG, "%s EXIT %p", __func__, addr); } void esp_dbg_stubs_init(void) diff --git a/components/esp_system/port/arch/riscv/panic_arch.c b/components/esp_system/port/arch/riscv/panic_arch.c index 8ad790160c..2010d004f1 100644 --- a/components/esp_system/port/arch/riscv/panic_arch.c +++ b/components/esp_system/port/arch/riscv/panic_arch.c @@ -348,7 +348,6 @@ void panic_arch_fill_info(void *frame, panic_info_t *info) info->description = "Exception was unhandled."; info->addr = (void *) regs->mepc; - info->frame = ®s; } static void panic_print_basic_backtrace(const void *frame, int core) diff --git a/components/esp_system/test/test_backtrace.c b/components/esp_system/test/test_backtrace.c index 11a82b83f0..034c5201ae 100644 --- a/components/esp_system/test/test_backtrace.c +++ b/components/esp_system/test/test_backtrace.c @@ -19,6 +19,7 @@ #include "esp_intr_alloc.h" #include "esp_rom_sys.h" #include "esp_rom_uart.h" +#include "hal/misc.h" #define SW_ISR_LEVEL_1 7 #define SW_ISR_LEVEL_3 29 @@ -83,7 +84,7 @@ TEST_CASE("Test backtrace from interrupt watchdog timeout", "[reset_reason][rese static void write_char_crash(char c) { esp_rom_uart_putc(c); - *(char*) 0x00000001 = 0; + hal_memset((void *)0x00000001, 0, 1); } TEST_CASE("Test backtrace with a ROM function", "[reset_reason][reset=StoreProhibited,SW_CPU_RESET]")