Skip to content

Commit

Permalink
target/esp32p4: enable assist debug monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
erhankur committed Apr 12, 2024
1 parent f3f3fad commit a358cb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/target/espressif/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void esp_common_assist_debug_monitor_disable(struct target *target, uint32_t add
*value = ESP_ASSIST_DEBUG_INVALID_VALUE;
return;
}
LOG_DEBUG("Saved register value 0x%08" PRIx32, *value);
LOG_TARGET_DEBUG(target, "Saved register value 0x%08" PRIx32, *value);

res = target_write_u32(target, address, 0);
if (res != ERROR_OK) {
Expand Down
5 changes: 3 additions & 2 deletions src/target/espressif/esp32p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
#define ESP32P4_BP_NUM 3
#define ESP32P4_WP_NUM 3

#define ESP32P4_ASSIST_DEBUG_CPU0_MON_REG 0xFFFFFFFF /* TODO */
#define ESP32P4_ASSIST_DEBUG_CPU0_MON_REG 0x3FF06000
#define ESP32P4_ASSIST_DEBUG_CPU_OFFSET 0x80

/* components/soc/esp32p4/include/soc/reset_reasons.h */
enum esp32p4_reset_reason {
Expand Down Expand Up @@ -185,7 +186,7 @@ static int esp32p4_target_create(struct target *target, Jim_Interp *interp)
target->arch_info = esp_riscv;

esp_riscv->assist_debug_cpu0_mon_reg = ESP32P4_ASSIST_DEBUG_CPU0_MON_REG;
esp_riscv->assist_debug_cpu_offset = 0;
esp_riscv->assist_debug_cpu_offset = ESP32P4_ASSIST_DEBUG_CPU_OFFSET;

esp_riscv->max_bp_num = ESP32P4_BP_NUM;
esp_riscv->max_wp_num = ESP32P4_WP_NUM;
Expand Down

0 comments on commit a358cb1

Please sign in to comment.