mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-22 19:32:15 +00:00
panic handlers: Print the PC address where abort() was called, don't dump registers
This commit is contained in:
@@ -42,3 +42,15 @@ void IRAM_ATTR esp_cpu_unstall(int cpu_id)
|
||||
CLEAR_PERI_REG_MASK(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_SW_STALL_PROCPU_C0_M);
|
||||
}
|
||||
}
|
||||
|
||||
bool IRAM_ATTR esp_cpu_in_ocd_debug_mode()
|
||||
{
|
||||
#if CONFIG_ESP32_DEBUG_OCDAWARE
|
||||
int dcr;
|
||||
int reg=0x10200C; //DSRSET register
|
||||
asm("rer %0,%1":"=r"(dcr):"r"(reg));
|
||||
return (dcr&0x1);
|
||||
#else
|
||||
return false; // Always return false if "OCD aware" is disabled
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user