Skip to content

Commit

Permalink
Merge branch 'fix/bp_wp_in_panic' into 'master'
Browse files Browse the repository at this point in the history
Fix bp/wp logic when debugger is connected

See merge request espressif/esp-idf!25582
  • Loading branch information
erhankur committed Aug 29, 2023
2 parents c9adbe1 + 7549995 commit f0fba3f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions components/esp_hw_support/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ esp_err_t esp_cpu_set_breakpoint(int bp_num, const void *bp_addr)
if (ret == 0) {
return ESP_ERR_INVALID_RESPONSE;
}
}
rv_utils_set_breakpoint(bp_num, (uint32_t)bp_addr);
} else {
rv_utils_set_breakpoint(bp_num, (uint32_t)bp_addr);
}
#endif // __XTENSA__
return ESP_OK;
}
Expand All @@ -360,8 +361,9 @@ esp_err_t esp_cpu_clear_breakpoint(int bp_num)
if (ret == 0) {
return ESP_ERR_INVALID_RESPONSE;
}
}
rv_utils_clear_breakpoint(bp_num);
} else {
rv_utils_clear_breakpoint(bp_num);
}
#endif // __XTENSA__
return ESP_OK;
}
Expand Down Expand Up @@ -393,8 +395,9 @@ esp_err_t esp_cpu_set_watchpoint(int wp_num, const void *wp_addr, size_t size, e
if (ret == 0) {
return ESP_ERR_INVALID_RESPONSE;
}
}
rv_utils_set_watchpoint(wp_num, (uint32_t)wp_addr, size, on_read, on_write);
} else {
rv_utils_set_watchpoint(wp_num, (uint32_t)wp_addr, size, on_read, on_write);
}
#endif // __XTENSA__
return ESP_OK;
}
Expand All @@ -415,8 +418,9 @@ esp_err_t esp_cpu_clear_watchpoint(int wp_num)
if (ret == 0) {
return ESP_ERR_INVALID_RESPONSE;
}
}
rv_utils_clear_watchpoint(wp_num);
} else {
rv_utils_clear_watchpoint(wp_num);
}
#endif // __XTENSA__
return ESP_OK;
}
Expand Down

0 comments on commit f0fba3f

Please sign in to comment.