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>
if (xruntest)
{
result = svf_add_statemove(TAP_IDLE);
if (xruntest)
{
result = svf_add_statemove(TAP_IDLE);
+ if (result != ERROR_OK)
+ return result;
if (runtest_requires_tck)
jtag_add_clocks(xruntest);
else
jtag_add_sleep(xruntest);
if (runtest_requires_tck)
jtag_add_clocks(xruntest);
else
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;
+ }
{
/* FIXME handle statemove errors ... */
result = svf_add_statemove(wait_state);
{
/* FIXME handle statemove errors ... */
result = svf_add_statemove(wait_state);
+ if (result != ERROR_OK)
+ return result;
jtag_add_sleep(delay);
result = svf_add_statemove(end_state);
jtag_add_sleep(delay);
result = svf_add_statemove(end_state);
+ if (result != ERROR_OK)
+ return result;
/* FIXME handle statemove errors ... */
result = svf_add_statemove(wait_state);
/* FIXME handle statemove errors ... */
result = svf_add_statemove(wait_state);
+ if (result != ERROR_OK)
+ return result;
jtag_add_clocks(clock_count);
jtag_add_sleep(usecs);
result = svf_add_statemove(end_state);
jtag_add_clocks(clock_count);
jtag_add_sleep(usecs);
result = svf_add_statemove(end_state);
+ if (result != ERROR_OK)
+ return result;
struct scan_field field;
result = svf_add_statemove(loop_state);
struct scan_field field;
result = svf_add_statemove(loop_state);
+ if (result != ERROR_OK)
+ return result;
jtag_add_clocks(loop_clocks);
jtag_add_sleep(loop_usecs);
jtag_add_clocks(loop_clocks);
jtag_add_sleep(loop_usecs);
/* upon error, return the TAPs to a reasonable state */
result = svf_add_statemove(TAP_IDLE);
/* upon error, return the TAPs to a reasonable state */
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;