Skip to content

Commit

Permalink
target/esp32c[5|61]: remove user counters
Browse files Browse the repository at this point in the history
This workaround fixes register access from GDB,
when the target is in user mode.
  • Loading branch information
sobuch authored and erhankur committed Jan 17, 2025
1 parent 9bf8214 commit 8d84fc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/target/espressif/esp32c5.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ static const char *esp32c5_csrs[] = {

static const char *esp32c5_ro_csrs[] = {
/* read-only CSRs, cannot be save/restored as the write would fail */
"cycle", "time", "instreth", "cycleh", "instret", "timeh",
"hpmcounter8", "hpmcounter9", "hpmcounter13", "hpmcounter8h", "hpmcounter9h", "hpmcounter13h",
/* TODO: Workaround solution for OCD-1066. */
// "cycle", "time", "instreth", "cycleh", "instret", "timeh",
// "hpmcounter8", "hpmcounter9", "hpmcounter13", "hpmcounter8h", "hpmcounter9h", "hpmcounter13h",
"mintstatus",
/* custom exposed CSRs will start with 'csr_' prefix*/
"csr_mcpuid",
Expand Down
5 changes: 3 additions & 2 deletions src/target/espressif/esp32c61.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ static const char *esp32c61_csrs[] = {

static const char *esp32c61_ro_csrs[] = {
/* read-only CSRs, cannot be save/restored as the write would fail */
"cycle", "time", "instreth", "cycleh", "instret", "timeh",
"hpmcounter8", "hpmcounter9", "hpmcounter13", "hpmcounter8h", "hpmcounter9h", "hpmcounter13h",
/* TODO: Workaround solution for OCD-1066. */
// "cycle", "time", "instreth", "cycleh", "instret", "timeh",
// "hpmcounter8", "hpmcounter9", "hpmcounter13", "hpmcounter8h", "hpmcounter9h", "hpmcounter13h",
"mintstatus",
/* custom exposed CSRs will start with 'csr_' prefix*/
"csr_mcpuid",
Expand Down

0 comments on commit 8d84fc7

Please sign in to comment.