Skip to content

Commit

Permalink
target/esp32p4: custom mintstatus declaration as the regno has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sobuch authored and erhankur committed Oct 24, 2024
1 parent 3778e97 commit 7c93f13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/target/espressif/esp32p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static const struct esp_flash_breakpoint_ops esp32p4_flash_brp_ops = {

static const char *esp32p4_csrs[] = {
"mie", "mcause", "mip", "mtvt", "mnxti",
"mintstatus", "mscratchcsw", "mscratchcswl",
"mscratchcsw", "mscratchcswl",
"mcycle", "minstret", "mcounteren", "mcountinhibit",
"mhpmcounter8", "mhpmcounter9", "mhpmcounter13", "mhpmevent8", "mhpmevent9", "mhpmevent13",
"mcycleh", "minstreth", "mhpmcounter8h", "mhpmcounter9h", "mhpmcounter13h",
Expand All @@ -194,6 +194,7 @@ static const char *esp32p4_csrs[] = {
"csr_pma_addr2", "csr_pma_addr3", "csr_pma_addr4", "csr_pma_addr5", "csr_pma_addr6", "csr_pma_addr7",
"csr_pma_addr8", "csr_pma_addr9", "csr_pma_addr10", "csr_pma_addr11", "csr_pma_addr12", "csr_pma_addr13",
"csr_pma_addr14", "csr_pma_addr15",
"csr_mintstatus",
};

static int esp32p4_target_create(struct target *target, Jim_Interp *interp)
Expand Down
1 change: 1 addition & 0 deletions tcl/target/esp32p4.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ proc create_esp32p4_jtag { } {
create_esp_target $_ESP_ARCH

foreach tgt [target names] {
$tgt riscv expose_csrs 838=mintstatus
$tgt riscv expose_csrs 848=mclicbase
$tgt riscv expose_csrs 1984=mxstatus
$tgt riscv expose_csrs 1985=mhcr
Expand Down

0 comments on commit 7c93f13

Please sign in to comment.