diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2010-01-30 18:08:19 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2010-01-30 18:08:19 -0800 |
commit | 46b6d5bfe644b5f6a1fe50930c850f09a78b5bad (patch) | |
tree | cdb12190013f640c5099f303b854cc02c455c0b7 | |
parent | 3d3128a8f5bb15f1d05ac5eb7ecc5e692ae290ce (diff) | |
download | openocd_libswd-46b6d5bfe644b5f6a1fe50930c850f09a78b5bad.tar.gz openocd_libswd-46b6d5bfe644b5f6a1fe50930c850f09a78b5bad.tar.bz2 openocd_libswd-46b6d5bfe644b5f6a1fe50930c850f09a78b5bad.tar.xz openocd_libswd-46b6d5bfe644b5f6a1fe50930c850f09a78b5bad.zip |
ARM ADIv5: fix diagnostics for block writes
They were reporting "read" errors, not "write" errors.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-rw-r--r-- | src/target/arm_adi_v5.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index b8744d55..0a6a7ef7 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -641,9 +641,12 @@ static int mem_ap_write_buf_packed_u16(struct swjdp_common *swjdp, if (nbytes < 4) { - if (mem_ap_write_buf_u16(swjdp, buffer, nbytes, address) != ERROR_OK) + if (mem_ap_write_buf_u16(swjdp, buffer, + nbytes, address) != ERROR_OK) { - LOG_WARNING("Block read error address 0x%" PRIx32 ", count 0x%x", address, count); + LOG_WARNING("Block write error address " + "0x%" PRIx32 ", count 0x%x", + address, count); return ERROR_JTAG_DEVICE_ERROR; } @@ -665,7 +668,9 @@ static int mem_ap_write_buf_packed_u16(struct swjdp_common *swjdp, dap_ap_write_reg_u32(swjdp, AP_REG_DRW, outvalue); if (jtagdp_transaction_endcheck(swjdp) != ERROR_OK) { - LOG_WARNING("Block read error address 0x%" PRIx32 ", count 0x%x", address, count); + LOG_WARNING("Block write error address " + "0x%" PRIx32 ", count 0x%x", + address, count); return ERROR_JTAG_DEVICE_ERROR; } } @@ -736,7 +741,9 @@ static int mem_ap_write_buf_packed_u8(struct swjdp_common *swjdp, { if (mem_ap_write_buf_u8(swjdp, buffer, nbytes, address) != ERROR_OK) { - LOG_WARNING("Block read error address 0x%" PRIx32 ", count 0x%x", address, count); + LOG_WARNING("Block write error address " + "0x%" PRIx32 ", count 0x%x", + address, count); return ERROR_JTAG_DEVICE_ERROR; } @@ -758,7 +765,9 @@ static int mem_ap_write_buf_packed_u8(struct swjdp_common *swjdp, dap_ap_write_reg_u32(swjdp, AP_REG_DRW, outvalue); if (jtagdp_transaction_endcheck(swjdp) != ERROR_OK) { - LOG_WARNING("Block read error address 0x%" PRIx32 ", count 0x%x", address, count); + LOG_WARNING("Block write error address " + "0x%" PRIx32 ", count 0x%x", + address, count); return ERROR_JTAG_DEVICE_ERROR; } } |