aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrodrigo_l_rosa <rodrigorosa.lg@gmail.com>2011-10-04 18:17:25 -0700
committerØyvind Harboe <oyvindharboe@gmail.com>2011-11-24 23:25:25 +0000
commite0c0810a8e62af36108cd5ac18b3f64952a7ef71 (patch)
treec3a0e4b0eaea6df471ae0ce9f6b9644851869698 /src
parente2fdb1c864ed0fb9f0e007ce57303554458e1d1a (diff)
downloadriscv-openocd-e0c0810a8e62af36108cd5ac18b3f64952a7ef71.zip
riscv-openocd-e0c0810a8e62af36108cd5ac18b3f64952a7ef71.tar.gz
riscv-openocd-e0c0810a8e62af36108cd5ac18b3f64952a7ef71.tar.bz2
dsp5680xx - fix jtag debug request failure handling
if JTAG debug request fails then halting with a reset should be attempted. the failure was ignored previously. Change-Id: Ibec08e2e97f962d164a110c21aaa80bfc17b7f1a Signed-off-by: Rodrigo L. Rosa <rodrigorosa.lg@gmail.com> Reviewed-on: http://openocd.zylin.com/221 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/target/dsp5680xx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c
index 9c1856a..cca34bc 100644
--- a/src/target/dsp5680xx.c
+++ b/src/target/dsp5680xx.c
@@ -548,10 +548,12 @@ static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t
err_check_propagate(retval);
retval = dsp5680xx_irscan(target, & instr, & ir_out,DSP5680XX_JTAG_CORE_TAP_IRLEN);
err_check_propagate(retval);
- if ((ir_out&JTAG_STATUS_MASK) == JTAG_STATUS_DEBUG)
- target->state = TARGET_HALTED;
- else
- retval = ERROR_FAIL;
+if ((ir_out&JTAG_STATUS_MASK) == JTAG_STATUS_DEBUG)
+ target->state = TARGET_HALTED;
+else{
+ retval = ERROR_FAIL;
+ err_check_propagate(retval);
+}
// Verify that debug mode is enabled
uint16_t data_read_from_dr;
retval = eonce_read_status_reg(target, &data_read_from_dr);