diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-03-23 14:50:40 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-03-23 14:50:40 -0700 |
commit | 03fa9d22c4c5d925bedd517dfcbcc7b014236cf4 (patch) | |
tree | 4bc04ea25e24ef5000230b8846004586851e89aa | |
parent | 84fa7aa91637a2c16a187ea895ce7898a9a24576 (diff) | |
download | riscv-openocd-03fa9d22c4c5d925bedd517dfcbcc7b014236cf4.zip riscv-openocd-03fa9d22c4c5d925bedd517dfcbcc7b014236cf4.tar.gz riscv-openocd-03fa9d22c4c5d925bedd517dfcbcc7b014236cf4.tar.bz2 |
Don't set abstractauto at the start
-rw-r--r-- | src/target/riscv/riscv-013.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 1bd31f9..6a71298 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1859,11 +1859,12 @@ static int read_memory(struct target *target, uint32_t address, return ERROR_FAIL; } dmi_write(target, DMI_ABSTRACTCS, DMI_ABSTRACTCS_CMDERR); - dmi_write(target, DMI_ABSTRACTAUTO, 0x1 << DMI_ABSTRACTAUTO_AUTOEXECDATA_OFFSET); uint32_t abstractcs; for (uint32_t i = 0; i < count; i++) { uint32_t value = dmi_read(target, DMI_DATA0); + if (i == 0) + dmi_write(target, DMI_ABSTRACTAUTO, 0x1 << DMI_ABSTRACTAUTO_AUTOEXECDATA_OFFSET); switch (size) { case 1: buffer[i] = value; |