2021-05-09 22:35:07 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2020-07-08 04:42:50 -04:00
|
|
|
|
2022-07-21 07:24:42 -04:00
|
|
|
#include "esp_cpu.h"
|
2020-07-08 04:42:50 -04:00
|
|
|
#include "esp_log.h"
|
|
|
|
#include "bootloader_common.h"
|
|
|
|
#include "esp_rom_sys.h"
|
|
|
|
|
|
|
|
|
|
|
|
void __assert_func(const char *file, int line, const char *func, const char *expr)
|
|
|
|
{
|
2022-09-01 22:29:11 -04:00
|
|
|
|
|
|
|
#if !CONFIG_OPTIMIZATION_ASSERTIONS_SILENT
|
2020-07-08 04:42:50 -04:00
|
|
|
esp_rom_printf("Assert failed in %s, %s:%d (%s)\r\n", func, file, line, expr);
|
2022-09-01 22:29:11 -04:00
|
|
|
#endif
|
|
|
|
|
2020-07-08 04:42:50 -04:00
|
|
|
while (1) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void abort(void)
|
|
|
|
{
|
|
|
|
#if !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT
|
|
|
|
esp_rom_printf("abort() was called at PC 0x%08x\r\n", (intptr_t)__builtin_return_address(0) - 3);
|
|
|
|
#endif
|
2022-07-21 07:24:42 -04:00
|
|
|
if (esp_cpu_dbgr_is_attached()) {
|
|
|
|
esp_cpu_dbgr_break();
|
2020-07-08 04:42:50 -04:00
|
|
|
}
|
|
|
|
while (1) {
|
|
|
|
}
|
|
|
|
}
|