From 65dcc565a73b5f230dcbb8952592d4c8ed084d9b Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Fri, 25 Aug 2023 17:37:37 +0200 Subject: [PATCH 1/2] fix(breakpoint): fix bp/wp logic when debugger is connected --- components/esp_hw_support/cpu.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/components/esp_hw_support/cpu.c b/components/esp_hw_support/cpu.c index 2be2d4769c5..43e7188c110 100644 --- a/components/esp_hw_support/cpu.c +++ b/components/esp_hw_support/cpu.c @@ -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; } @@ -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; } @@ -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; } @@ -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; } From 754999575452d0f2a1ebd8e0a8258840837a2e04 Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Sun, 27 Aug 2023 16:57:43 +0200 Subject: [PATCH 2/2] fix(readme): add esp32p4 etm test app to the supported targets table --- components/esp_hw_support/test_apps/etm/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_hw_support/test_apps/etm/README.md b/components/esp_hw_support/test_apps/etm/README.md index b450dc5ffac..7b822bdb0ef 100644 --- a/components/esp_hw_support/test_apps/etm/README.md +++ b/components/esp_hw_support/test_apps/etm/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32-C6 | ESP32-H2 | -| ----------------- | -------- | -------- | +| Supported Targets | ESP32-C6 | ESP32-H2 | ESP32-P4 | +| ----------------- | -------- | -------- | -------- |