fields[0].tap = arm7_9->jtag_info.tap;
fields[0].num_bits = 32;
fields[0].out_value = NULL;
-
+
fields[0].in_value = databus;
-
-
+
+
fields[0].in_handler = NULL;
-
+
fields[1].tap = arm7_9->jtag_info.tap;
fields[1].num_bits = 3;
fields[1].out_value = NULL;
-
+
fields[1].in_value = &debug_reason;
-
-
+
+
fields[1].in_handler = NULL;
-
+
fields[2].tap = arm7_9->jtag_info.tap;
fields[2].num_bits = 32;
fields[2].out_value = NULL;
-
+
fields[2].in_value = instructionbus;
-
-
+
+
fields[2].in_handler = NULL;
-
+
if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
{
fields[0].tap = jtag_info->tap;
fields[0].num_bits = 32;
fields[0].out_value = out_buf;
-
fields[0].in_value = NULL;
- if (in)
- {
- fields[0].in_handler = arm_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
- fields[0].in_handler_priv = in;
- }
- else
- {
- fields[0].in_handler = NULL;
-
- }
-
-
+ fields[0].in_handler = NULL;
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].out_value = &sysspeed_buf;
-
fields[1].in_value = NULL;
-
-
fields[1].in_handler = NULL;
-
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 32;
fields[2].out_value = instr_buf;
-
fields[2].in_value = NULL;
-
-
fields[2].in_handler = NULL;
-
- jtag_add_dr_scan(3, fields, TAP_INVALID);
+ if (in)
+ {
+ u8 tmp[4];
+ fields[0].in_value=tmp;
+ jtag_add_dr_scan_now(3, fields, TAP_INVALID);
+
+ *in=flip_u32(le_to_h_u32(tmp), 32);
+ }
+ else
+ {
+ jtag_add_dr_scan(3, fields, TAP_INVALID);
+ }
jtag_add_runtest(0, TAP_INVALID);
fields[0].tap = jtag_info->tap;
fields[0].num_bits = 32;
fields[0].out_value = NULL;
-
+
fields[0].in_value = NULL;
fields[0].in_handler = arm_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
fields[0].in_handler_priv = in;
-
-
+
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].out_value = NULL;
-
+
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
-
-
-
+
+
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 32;
fields[2].out_value = NULL;
-
+
fields[2].in_value = NULL;
-
-
+
+
fields[2].in_handler = NULL;
-
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].tap = jtag_info->tap;
fields[0].num_bits = 32;
fields[0].out_value = NULL;
-
+
fields[0].in_value = NULL;
switch (size)
{
break;
}
fields[0].in_handler_priv = in;
-
-
+
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].out_value = NULL;
-
+
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
-
-
-
+
+
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 32;
fields[2].out_value = NULL;
-
+
fields[2].in_value = NULL;
-
-
+
+
fields[2].in_handler = NULL;
-
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
{
int retval;
command_t *arm9tdmi_cmd;
-
+
retval = arm7_9_register_commands(cmd_ctx);
arm9tdmi_cmd = register_command(cmd_ctx, NULL, "arm9tdmi", NULL, COMMAND_ANY, "arm9tdmi specific commands");
register_command(cmd_ctx, arm9tdmi_cmd, "vector_catch", handle_arm9tdmi_catch_vectors_command, COMMAND_EXEC, "catch arm920t vectors ['all'|'none'|'<vec1 vec2 ...>']");
-
+
return retval;
}