Skip to content

Commit

Permalink
Merge branch 'check_debug_aware_config' into 'master'
Browse files Browse the repository at this point in the history
fix(esp_hw_support): re-enable CONFIG_ESP_DEBUG_OCDAWARE functionality

Closes IDF-5881

See merge request espressif/esp-idf!26533
  • Loading branch information
erhankur committed Oct 21, 2023
2 parents 7b8a2e8 + 2d55270 commit 6cd8030
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions components/bootloader_support/src/bootloader_panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ 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
#if CONFIG_ESP_DEBUG_OCDAWARE
if (esp_cpu_dbgr_is_attached()) {
esp_cpu_dbgr_break();
}
#endif
while (1) {
}
}
3 changes: 2 additions & 1 deletion components/esp_system/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ void esp_panic_handler(panic_info_t *info)
// If on-chip-debugger is attached, and system is configured to be aware of this,
// then only print up to details. Users should be able to probe for the other information
// in debug mode.
#if CONFIG_ESP_DEBUG_OCDAWARE
if (esp_cpu_dbgr_is_attached()) {
char *panic_reason_str = NULL;
if (info->pseudo_excause) {
Expand Down Expand Up @@ -324,7 +325,7 @@ void esp_panic_handler(panic_info_t *info)
esp_cpu_set_breakpoint(0, info->addr); // use breakpoint 0
return;
}

#endif //CONFIG_ESP_DEBUG_OCDAWARE
// start panic WDT to restart system if we hang in this handler
if (!wdt_hal_is_enabled(&rtc_wdt_ctx)) {
wdt_hal_init(&rtc_wdt_ctx, WDT_RWDT, 0, false);
Expand Down

0 comments on commit 6cd8030

Please sign in to comment.