mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
bootloader: provide implementation of abort
ROM definition of `abort` was removed in 9240bbb
. The old definition
resulted in a panic due to a jump to a null pointer (abort member in
ROM stub table was zero). The new definition triggers a debug
exception if JTAG is connected, or goes into an infinite loop to be
reset by the WDT.
This commit is contained in:
@@ -537,3 +537,14 @@ void __assert_func(const char *file, int line, const char *func, const char *exp
|
|||||||
ESP_LOGE(TAG, "Assert failed in %s, %s:%d (%s)", func, file, line, expr);
|
ESP_LOGE(TAG, "Assert failed in %s, %s:%d (%s)", func, file, line, expr);
|
||||||
while(1) {}
|
while(1) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void abort()
|
||||||
|
{
|
||||||
|
#if !CONFIG_ESP32_PANIC_SILENT_REBOOT
|
||||||
|
ets_printf("abort() was called at PC 0x%08x\r\n", (intptr_t)__builtin_return_address(0) - 3);
|
||||||
|
#endif
|
||||||
|
if (esp_cpu_in_ocd_debug_mode()) {
|
||||||
|
__asm__ ("break 0,0");
|
||||||
|
}
|
||||||
|
while(1) {}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user