* Copyright (C) 2005 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
+ * Copyright (C) 2008 by Spencer Oliver *
+ * spen@spen-soft.co.uk *
+ * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
int arm7tdmi_examine_debug_reason(target_t *target)
{
+ int retval = ERROR_OK;
/* get pointers to arch-specific information */
armv4_5_common_t *armv4_5 = target->arch_info;
arm7_9_common_t *arm7_9 = armv4_5->arch_info;
fields[1].in_handler = NULL;
fields[1].in_handler_priv = NULL;
- arm_jtag_scann(&arm7_9->jtag_info, 0x1);
+ if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
+ {
+ return retval;
+ }
arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL);
jtag_add_dr_scan(2, fields, TAP_PD);
- jtag_execute_queue();
+ if((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ return retval;
+ }
fields[0].in_value = NULL;
fields[0].out_value = &breakpoint;
/* clock the target, reading the databus */
int arm7tdmi_clock_data_in(arm_jtag_t *jtag_info, u32 *in)
{
+ int retval = ERROR_OK;
scan_field_t fields[2];
jtag_add_end_state(TAP_PD);
- arm_jtag_scann(jtag_info, 0x1);
+ if((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+ {
+ return retval;
+ }
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
fields[0].device = jtag_info->chain_pos;
#ifdef _DEBUG_INSTRUCTION_EXECUTION_
{
- jtag_execute_queue();
+ if((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ return retval;
+ }
if (in)
{
*/
int arm7tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info, void *in, int size, int be)
{
+ int retval = ERROR_OK;
scan_field_t fields[2];
jtag_add_end_state(TAP_PD);
- arm_jtag_scann(jtag_info, 0x1);
+ if((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+ {
+ return retval;
+ }
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
fields[0].device = jtag_info->chain_pos;
#ifdef _DEBUG_INSTRUCTION_EXECUTION_
{
- jtag_execute_queue();
+ if((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ return retval;
+ }
if (in)
{
retval = arm7_9_register_commands(cmd_ctx);
- return ERROR_OK;
+ return retval;
}
-
-
-
-
-/*
- * Local Variables: ***
- * c-basic-offset: 4 ***
- * tab-width: 4 ***
- * End: ***
- */