Browse Source

xsvf: add missing error propagation

Change-Id: Ibc70deb980d6d18ceb376b72d9104e6180b16acf
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/176
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
tags/v0.6.0-rc1
Øyvind Harboe 12 years ago
committed by Spencer Oliver
parent
commit
3bab899063
1 changed files with 21 additions and 2 deletions
  1. +21
    -2
      src/xsvf/xsvf.c

+ 21
- 2
src/xsvf/xsvf.c View File

@@ -510,14 +510,19 @@ COMMAND_HANDLER(handle_xsvf_command)
if (xruntest) if (xruntest)
{ {
result = svf_add_statemove(TAP_IDLE); result = svf_add_statemove(TAP_IDLE);
if (result != ERROR_OK)
return result;


if (runtest_requires_tck) if (runtest_requires_tck)
jtag_add_clocks(xruntest); jtag_add_clocks(xruntest);
else else
jtag_add_sleep(xruntest); jtag_add_sleep(xruntest);
}
else if (xendir != TAP_DRPAUSE) /* we are already in TAP_DRPAUSE */
} else if (xendir != TAP_DRPAUSE) {
/* we are already in TAP_DRPAUSE */
result = svf_add_statemove(xenddr); result = svf_add_statemove(xenddr);
if (result != ERROR_OK)
return result;
}
} }
break; break;


@@ -790,8 +795,12 @@ COMMAND_HANDLER(handle_xsvf_command)
{ {
/* FIXME handle statemove errors ... */ /* FIXME handle statemove errors ... */
result = svf_add_statemove(wait_state); result = svf_add_statemove(wait_state);
if (result != ERROR_OK)
return result;
jtag_add_sleep(delay); jtag_add_sleep(delay);
result = svf_add_statemove(end_state); result = svf_add_statemove(end_state);
if (result != ERROR_OK)
return result;
} }
} }
break; break;
@@ -846,12 +855,16 @@ COMMAND_HANDLER(handle_xsvf_command)


/* FIXME handle statemove errors ... */ /* FIXME handle statemove errors ... */
result = svf_add_statemove(wait_state); result = svf_add_statemove(wait_state);
if (result != ERROR_OK)
return result;


jtag_add_clocks(clock_count); jtag_add_clocks(clock_count);


jtag_add_sleep(usecs); jtag_add_sleep(usecs);


result = svf_add_statemove(end_state); result = svf_add_statemove(end_state);
if (result != ERROR_OK)
return result;
} }
break; break;


@@ -925,6 +938,8 @@ COMMAND_HANDLER(handle_xsvf_command)
struct scan_field field; struct scan_field field;


result = svf_add_statemove(loop_state); result = svf_add_statemove(loop_state);
if (result != ERROR_OK)
return result;
jtag_add_clocks(loop_clocks); jtag_add_clocks(loop_clocks);
jtag_add_sleep(loop_usecs); jtag_add_sleep(loop_usecs);


@@ -1003,7 +1018,11 @@ COMMAND_HANDLER(handle_xsvf_command)


/* upon error, return the TAPs to a reasonable state */ /* upon error, return the TAPs to a reasonable state */
result = svf_add_statemove(TAP_IDLE); result = svf_add_statemove(TAP_IDLE);
if (result != ERROR_OK)
return result;
result = jtag_execute_queue(); result = jtag_execute_queue();
if (result != ERROR_OK)
return result;
break; break;
} }
} }


Loading…
Cancel
Save