1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
26 #include "arm7_9_common.h"
30 #include "embeddedice.h"
41 #define _DEBUG_INSTRUCTION_EXECUTION_
45 int arm9tdmi_register_commands(struct command_context_s
*cmd_ctx
);
46 int handle_arm9tdmi_catch_vectors_command(struct command_context_s
*cmd_ctx
, char *cmd
, char **args
, int argc
);
48 /* forward declarations */
49 int arm9tdmi_target_command(struct command_context_s
*cmd_ctx
, char *cmd
, char **args
, int argc
, struct target_s
*target
);
50 int arm9tdmi_init_target(struct command_context_s
*cmd_ctx
, struct target_s
*target
);
53 target_type_t arm9tdmi_target
=
58 .arch_state
= armv4_5_arch_state
,
60 .target_request_data
= arm7_9_target_request_data
,
63 .resume
= arm7_9_resume
,
66 .assert_reset
= arm7_9_assert_reset
,
67 .deassert_reset
= arm7_9_deassert_reset
,
68 .soft_reset_halt
= arm7_9_soft_reset_halt
,
69 .prepare_reset_halt
= arm7_9_prepare_reset_halt
,
71 .get_gdb_reg_list
= armv4_5_get_gdb_reg_list
,
73 .read_memory
= arm7_9_read_memory
,
74 .write_memory
= arm7_9_write_memory
,
75 .bulk_write_memory
= arm7_9_bulk_write_memory
,
77 .run_algorithm
= armv4_5_run_algorithm
,
79 .add_breakpoint
= arm7_9_add_breakpoint
,
80 .remove_breakpoint
= arm7_9_remove_breakpoint
,
81 .add_watchpoint
= arm7_9_add_watchpoint
,
82 .remove_watchpoint
= arm7_9_remove_watchpoint
,
84 .register_commands
= arm9tdmi_register_commands
,
85 .target_command
= arm9tdmi_target_command
,
86 .init_target
= arm9tdmi_init_target
,
90 arm9tdmi_vector_t arm9tdmi_vectors
[] =
92 {"reset", ARM9TDMI_RESET_VECTOR
},
93 {"undef", ARM9TDMI_UNDEF_VECTOR
},
94 {"swi", ARM9TDMI_SWI_VECTOR
},
95 {"pabt", ARM9TDMI_PABT_VECTOR
},
96 {"dabt", ARM9TDMI_DABT_VECTOR
},
97 {"reserved", ARM9TDMI_RESERVED_VECTOR
},
98 {"irq", ARM9TDMI_IRQ_VECTOR
},
99 {"fiq", ARM9TDMI_FIQ_VECTOR
},
103 int arm9tdmi_jtag_error_handler(u8
*in_value
, void *priv
)
107 DEBUG("caller: %s", caller
);
109 return ERROR_JTAG_QUEUE_FAILED
;
112 int arm9tdmi_examine_debug_reason(target_t
*target
)
114 /* get pointers to arch-specific information */
115 armv4_5_common_t
*armv4_5
= target
->arch_info
;
116 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
118 /* only check the debug reason if we don't know it already */
119 if ((target
->debug_reason
!= DBG_REASON_DBGRQ
)
120 && (target
->debug_reason
!= DBG_REASON_SINGLESTEP
))
122 scan_field_t fields
[3];
124 u8 instructionbus
[4];
127 jtag_add_end_state(TAP_PD
);
129 fields
[0].device
= arm7_9
->jtag_info
.chain_pos
;
130 fields
[0].num_bits
= 32;
131 fields
[0].out_value
= NULL
;
132 fields
[0].out_mask
= NULL
;
133 fields
[0].in_value
= databus
;
134 fields
[0].in_check_value
= NULL
;
135 fields
[0].in_check_mask
= NULL
;
136 fields
[0].in_handler
= NULL
;
137 fields
[0].in_handler_priv
= NULL
;
139 fields
[1].device
= arm7_9
->jtag_info
.chain_pos
;
140 fields
[1].num_bits
= 3;
141 fields
[1].out_value
= NULL
;
142 fields
[1].out_mask
= NULL
;
143 fields
[1].in_value
= &debug_reason
;
144 fields
[1].in_check_value
= NULL
;
145 fields
[1].in_check_mask
= NULL
;
146 fields
[1].in_handler
= NULL
;
147 fields
[1].in_handler_priv
= NULL
;
149 fields
[2].device
= arm7_9
->jtag_info
.chain_pos
;
150 fields
[2].num_bits
= 32;
151 fields
[2].out_value
= NULL
;
152 fields
[2].out_mask
= NULL
;
153 fields
[2].in_value
= instructionbus
;
154 fields
[2].in_check_value
= NULL
;
155 fields
[2].in_check_mask
= NULL
;
156 fields
[2].in_handler
= NULL
;
157 fields
[2].in_handler_priv
= NULL
;
159 arm_jtag_scann(&arm7_9
->jtag_info
, 0x1);
160 arm_jtag_set_instr(&arm7_9
->jtag_info
, arm7_9
->jtag_info
.intest_instr
, NULL
);
162 jtag_add_dr_scan(3, fields
, TAP_PD
, NULL
);
163 jtag_execute_queue();
165 fields
[0].in_value
= NULL
;
166 fields
[0].out_value
= databus
;
167 fields
[1].in_value
= NULL
;
168 fields
[1].out_value
= &debug_reason
;
169 fields
[2].in_value
= NULL
;
170 fields
[2].out_value
= instructionbus
;
172 jtag_add_dr_scan(3, fields
, TAP_PD
, NULL
);
174 if (debug_reason
& 0x4)
175 if (debug_reason
& 0x2)
176 target
->debug_reason
= DBG_REASON_WPTANDBKPT
;
178 target
->debug_reason
= DBG_REASON_WATCHPOINT
;
180 target
->debug_reason
= DBG_REASON_BREAKPOINT
;
186 /* put an instruction in the ARM9TDMI pipeline or write the data bus, and optionally read data */
187 int arm9tdmi_clock_out(arm_jtag_t
*jtag_info
, u32 instr
, u32 out
, u32
*in
, int sysspeed
)
189 scan_field_t fields
[3];
192 u8 sysspeed_buf
= 0x0;
195 buf_set_u32(out_buf
, 0, 32, out
);
197 buf_set_u32(instr_buf
, 0, 32, flip_u32(instr
, 32));
200 buf_set_u32(&sysspeed_buf
, 2, 1, 1);
202 jtag_add_end_state(TAP_PD
);
203 arm_jtag_scann(jtag_info
, 0x1);
205 arm_jtag_set_instr(jtag_info
, jtag_info
->intest_instr
, NULL
);
207 fields
[0].device
= jtag_info
->chain_pos
;
208 fields
[0].num_bits
= 32;
209 fields
[0].out_value
= out_buf
;
210 fields
[0].out_mask
= NULL
;
211 fields
[0].in_value
= NULL
;
214 fields
[0].in_handler
= arm_jtag_buf_to_u32
;
215 fields
[0].in_handler_priv
= in
;
219 fields
[0].in_handler
= NULL
;
220 fields
[0].in_handler_priv
= NULL
;
222 fields
[0].in_check_value
= NULL
;
223 fields
[0].in_check_mask
= NULL
;
225 fields
[1].device
= jtag_info
->chain_pos
;
226 fields
[1].num_bits
= 3;
227 fields
[1].out_value
= &sysspeed_buf
;
228 fields
[1].out_mask
= NULL
;
229 fields
[1].in_value
= NULL
;
230 fields
[1].in_check_value
= NULL
;
231 fields
[1].in_check_mask
= NULL
;
232 fields
[1].in_handler
= NULL
;
233 fields
[1].in_handler_priv
= NULL
;
235 fields
[2].device
= jtag_info
->chain_pos
;
236 fields
[2].num_bits
= 32;
237 fields
[2].out_value
= instr_buf
;
238 fields
[2].out_mask
= NULL
;
239 fields
[2].in_value
= NULL
;
240 fields
[2].in_check_value
= NULL
;
241 fields
[2].in_check_mask
= NULL
;
242 fields
[2].in_handler
= NULL
;
243 fields
[2].in_handler_priv
= NULL
;
245 jtag_add_dr_scan(3, fields
, -1, NULL
);
247 jtag_add_runtest(0, -1);
249 #ifdef _DEBUG_INSTRUCTION_EXECUTION_
251 jtag_execute_queue();
255 DEBUG("instr: 0x%8.8x, out: 0x%8.8x, in: 0x%8.8x", instr
, out
, *in
);
258 DEBUG("instr: 0x%8.8x, out: 0x%8.8x", instr
, out
);
265 /* just read data (instruction and data-out = don't care) */
266 int arm9tdmi_clock_data_in(arm_jtag_t
*jtag_info
, u32
*in
)
268 scan_field_t fields
[3];
270 jtag_add_end_state(TAP_PD
);
271 arm_jtag_scann(jtag_info
, 0x1);
273 arm_jtag_set_instr(jtag_info
, jtag_info
->intest_instr
, NULL
);
275 fields
[0].device
= jtag_info
->chain_pos
;
276 fields
[0].num_bits
= 32;
277 fields
[0].out_value
= NULL
;
278 fields
[0].out_mask
= NULL
;
279 fields
[0].in_value
= NULL
;
280 fields
[0].in_handler
= arm_jtag_buf_to_u32
;
281 fields
[0].in_handler_priv
= in
;
282 fields
[0].in_check_value
= NULL
;
283 fields
[0].in_check_mask
= NULL
;
285 fields
[1].device
= jtag_info
->chain_pos
;
286 fields
[1].num_bits
= 3;
287 fields
[1].out_value
= NULL
;
288 fields
[1].out_mask
= NULL
;
289 fields
[1].in_value
= NULL
;
290 fields
[1].in_handler
= NULL
;
291 fields
[1].in_handler_priv
= NULL
;
292 fields
[1].in_check_value
= NULL
;
293 fields
[1].in_check_mask
= NULL
;
295 fields
[2].device
= jtag_info
->chain_pos
;
296 fields
[2].num_bits
= 32;
297 fields
[2].out_value
= NULL
;
298 fields
[2].out_mask
= NULL
;
299 fields
[2].in_value
= NULL
;
300 fields
[2].in_check_value
= NULL
;
301 fields
[2].in_check_mask
= NULL
;
302 fields
[2].in_handler
= NULL
;
303 fields
[2].in_handler_priv
= NULL
;
305 jtag_add_dr_scan(3, fields
, -1, NULL
);
307 jtag_add_runtest(0, -1);
309 #ifdef _DEBUG_INSTRUCTION_EXECUTION_
311 jtag_execute_queue();
315 DEBUG("in: 0x%8.8x", *in
);
319 ERROR("BUG: called with in == NULL");
327 /* clock the target, and read the databus
328 * the *in pointer points to a buffer where elements of 'size' bytes
329 * are stored in big (be==1) or little (be==0) endianness
331 int arm9tdmi_clock_data_in_endianness(arm_jtag_t
*jtag_info
, void *in
, int size
, int be
)
333 scan_field_t fields
[3];
335 jtag_add_end_state(TAP_PD
);
336 arm_jtag_scann(jtag_info
, 0x1);
338 arm_jtag_set_instr(jtag_info
, jtag_info
->intest_instr
, NULL
);
340 fields
[0].device
= jtag_info
->chain_pos
;
341 fields
[0].num_bits
= 32;
342 fields
[0].out_value
= NULL
;
343 fields
[0].out_mask
= NULL
;
344 fields
[0].in_value
= NULL
;
348 fields
[0].in_handler
= (be
) ? arm_jtag_buf_to_be32
: arm_jtag_buf_to_le32
;
351 fields
[0].in_handler
= (be
) ? arm_jtag_buf_to_be16
: arm_jtag_buf_to_le16
;
354 fields
[0].in_handler
= arm_jtag_buf_to_8
;
357 fields
[0].in_handler_priv
= in
;
358 fields
[0].in_check_value
= NULL
;
359 fields
[0].in_check_mask
= NULL
;
361 fields
[1].device
= jtag_info
->chain_pos
;
362 fields
[1].num_bits
= 3;
363 fields
[1].out_value
= NULL
;
364 fields
[1].out_mask
= NULL
;
365 fields
[1].in_value
= NULL
;
366 fields
[1].in_handler
= NULL
;
367 fields
[1].in_handler_priv
= NULL
;
368 fields
[1].in_check_value
= NULL
;
369 fields
[1].in_check_mask
= NULL
;
371 fields
[2].device
= jtag_info
->chain_pos
;
372 fields
[2].num_bits
= 32;
373 fields
[2].out_value
= NULL
;
374 fields
[2].out_mask
= NULL
;
375 fields
[2].in_value
= NULL
;
376 fields
[2].in_check_value
= NULL
;
377 fields
[2].in_check_mask
= NULL
;
378 fields
[2].in_handler
= NULL
;
379 fields
[2].in_handler_priv
= NULL
;
381 jtag_add_dr_scan(3, fields
, -1, NULL
);
383 jtag_add_runtest(0, -1);
385 #ifdef _DEBUG_INSTRUCTION_EXECUTION_
387 jtag_execute_queue();
391 DEBUG("in: 0x%8.8x", *in
);
395 ERROR("BUG: called with in == NULL");
403 void arm9tdmi_change_to_arm(target_t
*target
, u32
*r0
, u32
*pc
)
405 /* get pointers to arch-specific information */
406 armv4_5_common_t
*armv4_5
= target
->arch_info
;
407 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
408 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
410 /* save r0 before using it and put system in ARM state
411 * to allow common handling of ARM and THUMB debugging */
413 /* fetch STR r0, [r0] */
414 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_STR(0, 0), 0, NULL
, 0);
415 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
416 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
417 /* STR r0, [r0] in Memory */
418 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, r0
, 0);
420 /* MOV r0, r15 fetched, STR in Decode */
421 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_MOV(0, 15), 0, NULL
, 0);
422 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
423 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_STR(0, 0), 0, NULL
, 0);
424 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
425 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
426 /* nothing fetched, STR r0, [r0] in Memory */
427 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, pc
, 0);
429 /* use pc-relative LDR to clear r0[1:0] (for switch to ARM mode) */
430 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_LDR_PCREL(0), 0, NULL
, 0);
432 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
434 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
435 /* LDR in Memory (to account for interlock) */
436 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
439 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_BX(0), 0, NULL
, 0);
440 /* NOP fetched, BX in Decode, MOV in Execute */
441 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
442 /* NOP fetched, BX in Execute (1) */
443 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
445 jtag_execute_queue();
447 /* fix program counter:
448 * MOV r0, r15 was the 5th instruction (+8)
449 * reading PC in Thumb state gives address of instruction + 4
454 void arm9tdmi_read_core_regs(target_t
*target
, u32 mask
, u32
* core_regs
[16])
457 /* get pointers to arch-specific information */
458 armv4_5_common_t
*armv4_5
= target
->arch_info
;
459 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
460 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
462 /* STMIA r0-15, [r0] at debug speed
463 * register values will start to appear on 4th DCLK
465 arm9tdmi_clock_out(jtag_info
, ARMV4_5_STMIA(0, mask
& 0xffff, 0, 0), 0, NULL
, 0);
467 /* fetch NOP, STM in DECODE stage */
468 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
469 /* fetch NOP, STM in EXECUTE stage (1st cycle) */
470 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
472 for (i
= 0; i
<= 15; i
++)
475 /* nothing fetched, STM in MEMORY (i'th cycle) */
476 arm9tdmi_clock_data_in(jtag_info
, core_regs
[i
]);
481 void arm9tdmi_read_core_regs_target_buffer(target_t
*target
, u32 mask
, void* buffer
, int size
)
484 /* get pointers to arch-specific information */
485 armv4_5_common_t
*armv4_5
= target
->arch_info
;
486 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
487 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
488 int be
= (target
->endianness
== TARGET_BIG_ENDIAN
) ? 1 : 0;
489 u32
*buf_u32
= buffer
;
490 u16
*buf_u16
= buffer
;
493 /* STMIA r0-15, [r0] at debug speed
494 * register values will start to appear on 4th DCLK
496 arm9tdmi_clock_out(jtag_info
, ARMV4_5_STMIA(0, mask
& 0xffff, 0, 0), 0, NULL
, 0);
498 /* fetch NOP, STM in DECODE stage */
499 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
500 /* fetch NOP, STM in EXECUTE stage (1st cycle) */
501 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
503 for (i
= 0; i
<= 15; i
++)
506 /* nothing fetched, STM in MEMORY (i'th cycle) */
510 arm9tdmi_clock_data_in_endianness(jtag_info
, buf_u32
++, 4, be
);
513 arm9tdmi_clock_data_in_endianness(jtag_info
, buf_u16
++, 2, be
);
516 arm9tdmi_clock_data_in_endianness(jtag_info
, buf_u8
++, 1, be
);
523 void arm9tdmi_read_xpsr(target_t
*target
, u32
*xpsr
, int spsr
)
525 /* get pointers to arch-specific information */
526 armv4_5_common_t
*armv4_5
= target
->arch_info
;
527 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
528 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
531 arm9tdmi_clock_out(jtag_info
, ARMV4_5_MRS(0, spsr
& 1), 0, NULL
, 0);
532 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
533 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
534 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
535 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
538 arm9tdmi_clock_out(jtag_info
, ARMV4_5_STR(0, 15), 0, NULL
, 0);
539 /* fetch NOP, STR in DECODE stage */
540 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
541 /* fetch NOP, STR in EXECUTE stage (1st cycle) */
542 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
543 /* nothing fetched, STR in MEMORY */
544 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, xpsr
, 0);
548 void arm9tdmi_write_xpsr(target_t
*target
, u32 xpsr
, int spsr
)
550 /* get pointers to arch-specific information */
551 armv4_5_common_t
*armv4_5
= target
->arch_info
;
552 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
553 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
555 DEBUG("xpsr: %8.8x, spsr: %i", xpsr
, spsr
);
558 arm9tdmi_clock_out(jtag_info
, ARMV4_5_MSR_IM(xpsr
& 0xff, 0, 1, spsr
), 0, NULL
, 0);
559 /* MSR2 fetched, MSR1 in DECODE */
560 arm9tdmi_clock_out(jtag_info
, ARMV4_5_MSR_IM((xpsr
& 0xff00) >> 8, 0xc, 2, spsr
), 0, NULL
, 0);
561 /* MSR3 fetched, MSR1 in EXECUTE (1), MSR2 in DECODE */
562 arm9tdmi_clock_out(jtag_info
, ARMV4_5_MSR_IM((xpsr
& 0xff0000) >> 16, 0x8, 4, spsr
), 0, NULL
, 0);
563 /* nothing fetched, MSR1 in EXECUTE (2) */
564 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
565 /* nothing fetched, MSR1 in EXECUTE (3) */
566 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
567 /* MSR4 fetched, MSR2 in EXECUTE (1), MSR3 in DECODE */
568 arm9tdmi_clock_out(jtag_info
, ARMV4_5_MSR_IM((xpsr
& 0xff000000) >> 24, 0x4, 8, spsr
), 0, NULL
, 0);
569 /* nothing fetched, MSR2 in EXECUTE (2) */
570 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
571 /* nothing fetched, MSR2 in EXECUTE (3) */
572 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
573 /* NOP fetched, MSR3 in EXECUTE (1), MSR4 in DECODE */
574 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
575 /* nothing fetched, MSR3 in EXECUTE (2) */
576 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
577 /* nothing fetched, MSR3 in EXECUTE (3) */
578 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
579 /* NOP fetched, MSR4 in EXECUTE (1) */
580 /* last MSR writes flags, which takes only one cycle */
581 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
584 void arm9tdmi_write_xpsr_im8(target_t
*target
, u8 xpsr_im
, int rot
, int spsr
)
586 /* get pointers to arch-specific information */
587 armv4_5_common_t
*armv4_5
= target
->arch_info
;
588 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
589 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
591 DEBUG("xpsr_im: %2.2x, rot: %i, spsr: %i", xpsr_im
, rot
, spsr
);
594 arm9tdmi_clock_out(jtag_info
, ARMV4_5_MSR_IM(xpsr_im
, rot
, 1, spsr
), 0, NULL
, 0);
595 /* NOP fetched, MSR in DECODE */
596 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
597 /* NOP fetched, MSR in EXECUTE (1) */
598 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
600 /* rot == 4 writes flags, which takes only one cycle */
603 /* nothing fetched, MSR in EXECUTE (2) */
604 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
605 /* nothing fetched, MSR in EXECUTE (3) */
606 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
610 void arm9tdmi_write_core_regs(target_t
*target
, u32 mask
, u32 core_regs
[16])
613 /* get pointers to arch-specific information */
614 armv4_5_common_t
*armv4_5
= target
->arch_info
;
615 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
616 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
618 /* LDMIA r0-15, [r0] at debug speed
619 * register values will start to appear on 4th DCLK
621 arm9tdmi_clock_out(jtag_info
, ARMV4_5_LDMIA(0, mask
& 0xffff, 0, 0), 0, NULL
, 0);
623 /* fetch NOP, LDM in DECODE stage */
624 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
625 /* fetch NOP, LDM in EXECUTE stage (1st cycle) */
626 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
628 for (i
= 0; i
<= 15; i
++)
631 /* nothing fetched, LDM still in EXECUTE (1+i cycle) */
632 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, core_regs
[i
], NULL
, 0);
634 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
638 void arm9tdmi_load_word_regs(target_t
*target
, u32 mask
)
640 /* get pointers to arch-specific information */
641 armv4_5_common_t
*armv4_5
= target
->arch_info
;
642 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
643 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
645 /* put system-speed load-multiple into the pipeline */
646 arm9tdmi_clock_out(jtag_info
, ARMV4_5_LDMIA(0, mask
& 0xffff, 0, 1), 0, NULL
, 0);
647 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
651 void arm9tdmi_load_hword_reg(target_t
*target
, int num
)
653 /* get pointers to arch-specific information */
654 armv4_5_common_t
*armv4_5
= target
->arch_info
;
655 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
656 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
658 /* put system-speed load half-word into the pipeline */
659 arm9tdmi_clock_out(jtag_info
, ARMV4_5_LDRH_IP(num
, 0), 0, NULL
, 0);
660 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
663 void arm9tdmi_load_byte_reg(target_t
*target
, int num
)
665 /* get pointers to arch-specific information */
666 armv4_5_common_t
*armv4_5
= target
->arch_info
;
667 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
668 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
670 /* put system-speed load byte into the pipeline */
671 arm9tdmi_clock_out(jtag_info
, ARMV4_5_LDRB_IP(num
, 0), 0, NULL
, 0);
672 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
676 void arm9tdmi_store_word_regs(target_t
*target
, u32 mask
)
678 /* get pointers to arch-specific information */
679 armv4_5_common_t
*armv4_5
= target
->arch_info
;
680 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
681 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
683 /* put system-speed store-multiple into the pipeline */
684 arm9tdmi_clock_out(jtag_info
, ARMV4_5_STMIA(0, mask
, 0, 1), 0, NULL
, 0);
685 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
689 void arm9tdmi_store_hword_reg(target_t
*target
, int num
)
691 /* get pointers to arch-specific information */
692 armv4_5_common_t
*armv4_5
= target
->arch_info
;
693 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
694 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
696 /* put system-speed store half-word into the pipeline */
697 arm9tdmi_clock_out(jtag_info
, ARMV4_5_STRH_IP(num
, 0), 0, NULL
, 0);
698 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
702 void arm9tdmi_store_byte_reg(target_t
*target
, int num
)
704 /* get pointers to arch-specific information */
705 armv4_5_common_t
*armv4_5
= target
->arch_info
;
706 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
707 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
709 /* put system-speed store byte into the pipeline */
710 arm9tdmi_clock_out(jtag_info
, ARMV4_5_STRB_IP(num
, 0), 0, NULL
, 0);
711 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
715 void arm9tdmi_write_pc(target_t
*target
, u32 pc
)
717 /* get pointers to arch-specific information */
718 armv4_5_common_t
*armv4_5
= target
->arch_info
;
719 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
720 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
722 /* LDMIA r0-15, [r0] at debug speed
723 * register values will start to appear on 4th DCLK
725 arm9tdmi_clock_out(jtag_info
, ARMV4_5_LDMIA(0, 0x8000, 0, 0), 0, NULL
, 0);
727 /* fetch NOP, LDM in DECODE stage */
728 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
729 /* fetch NOP, LDM in EXECUTE stage (1st cycle) */
730 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
731 /* nothing fetched, LDM in EXECUTE stage (2nd cycle) (output data) */
732 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, pc
, NULL
, 0);
733 /* nothing fetched, LDM in EXECUTE stage (3rd cycle) */
734 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
735 /* fetch NOP, LDM in EXECUTE stage (4th cycle) */
736 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
737 /* fetch NOP, LDM in EXECUTE stage (5th cycle) */
738 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
742 void arm9tdmi_branch_resume(target_t
*target
)
744 /* get pointers to arch-specific information */
745 armv4_5_common_t
*armv4_5
= target
->arch_info
;
746 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
747 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
749 arm9tdmi_clock_out(jtag_info
, ARMV4_5_B(0xfffffc, 0), 0, NULL
, 0);
750 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 1);
754 void arm9tdmi_branch_resume_thumb(target_t
*target
)
758 /* get pointers to arch-specific information */
759 armv4_5_common_t
*armv4_5
= target
->arch_info
;
760 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
761 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
762 reg_t
*dbg_stat
= &arm7_9
->eice_cache
->reg_list
[EICE_DBG_STAT
];
764 /* LDMIA r0-15, [r0] at debug speed
765 * register values will start to appear on 4th DCLK
767 arm9tdmi_clock_out(jtag_info
, ARMV4_5_LDMIA(0, 0x1, 0, 0), 0, NULL
, 0);
769 /* fetch NOP, LDM in DECODE stage */
770 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
771 /* fetch NOP, LDM in EXECUTE stage (1st cycle) */
772 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
773 /* nothing fetched, LDM in EXECUTE stage (2nd cycle) */
774 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, buf_get_u32(armv4_5
->core_cache
->reg_list
[15].value
, 0, 32) | 1, NULL
, 0);
775 /* nothing fetched, LDM in EXECUTE stage (3rd cycle) */
776 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
778 /* Branch and eXchange */
779 arm9tdmi_clock_out(jtag_info
, ARMV4_5_BX(0), 0, NULL
, 0);
781 embeddedice_read_reg(dbg_stat
);
783 /* fetch NOP, BX in DECODE stage */
784 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
786 embeddedice_read_reg(dbg_stat
);
788 /* fetch NOP, BX in EXECUTE stage (1st cycle) */
789 arm9tdmi_clock_out(jtag_info
, ARMV4_5_NOP
, 0, NULL
, 0);
791 /* target is now in Thumb state */
792 embeddedice_read_reg(dbg_stat
);
794 /* load r0 value, MOV_IM in Decode*/
795 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_LDR_PCREL(0), 0, NULL
, 0);
796 /* fetch NOP, LDR in Decode, MOV_IM in Execute */
797 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
798 /* fetch NOP, LDR in Execute */
799 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
800 /* nothing fetched, LDR in EXECUTE stage (2nd cycle) */
801 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, buf_get_u32(armv4_5
->core_cache
->reg_list
[0].value
, 0, 32), NULL
, 0);
802 /* nothing fetched, LDR in EXECUTE stage (3rd cycle) */
803 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
805 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
806 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
808 embeddedice_read_reg(dbg_stat
);
810 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_B(0x7f7), 0, NULL
, 1);
811 arm9tdmi_clock_out(jtag_info
, ARMV4_5_T_NOP
, 0, NULL
, 0);
815 void arm9tdmi_enable_single_step(target_t
*target
)
817 /* get pointers to arch-specific information */
818 armv4_5_common_t
*armv4_5
= target
->arch_info
;
819 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
821 if (arm7_9
->has_single_step
)
823 buf_set_u32(arm7_9
->eice_cache
->reg_list
[EICE_DBG_CTRL
].value
, 3, 1, 1);
824 embeddedice_store_reg(&arm7_9
->eice_cache
->reg_list
[EICE_DBG_CTRL
]);
828 arm7_9_enable_eice_step(target
);
832 void arm9tdmi_disable_single_step(target_t
*target
)
834 /* get pointers to arch-specific information */
835 armv4_5_common_t
*armv4_5
= target
->arch_info
;
836 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
838 if (arm7_9
->has_single_step
)
840 buf_set_u32(arm7_9
->eice_cache
->reg_list
[EICE_DBG_CTRL
].value
, 3, 1, 0);
841 embeddedice_store_reg(&arm7_9
->eice_cache
->reg_list
[EICE_DBG_CTRL
]);
845 arm7_9_disable_eice_step(target
);
849 void arm9tdmi_build_reg_cache(target_t
*target
)
851 reg_cache_t
**cache_p
= register_get_last_cache_p(&target
->reg_cache
);
852 /* get pointers to arch-specific information */
853 armv4_5_common_t
*armv4_5
= target
->arch_info
;
854 arm7_9_common_t
*arm7_9
= armv4_5
->arch_info
;
855 arm_jtag_t
*jtag_info
= &arm7_9
->jtag_info
;
857 (*cache_p
) = armv4_5_build_reg_cache(target
, armv4_5
);
858 armv4_5
->core_cache
= (*cache_p
);
860 /* one extra register (vector catch) */
861 (*cache_p
)->next
= embeddedice_build_reg_cache(target
, arm7_9
);
862 arm7_9
->eice_cache
= (*cache_p
)->next
;
866 (*cache_p
)->next
->next
= etm_build_reg_cache(target
, jtag_info
, arm7_9
->etm_ctx
);
867 arm7_9
->etm_ctx
->reg_cache
= (*cache_p
)->next
->next
;
871 int arm9tdmi_init_target(struct command_context_s
*cmd_ctx
, struct target_s
*target
)
874 arm9tdmi_build_reg_cache(target
);
886 int arm9tdmi_init_arch_info(target_t
*target
, arm9tdmi_common_t
*arm9tdmi
, int chain_pos
, char *variant
)
888 armv4_5_common_t
*armv4_5
;
889 arm7_9_common_t
*arm7_9
;
891 arm7_9
= &arm9tdmi
->arm7_9_common
;
892 armv4_5
= &arm7_9
->armv4_5_common
;
894 /* prepare JTAG information for the new target */
895 arm7_9
->jtag_info
.chain_pos
= chain_pos
;
896 arm7_9
->jtag_info
.scann_size
= 5;
898 /* register arch-specific functions */
899 arm7_9
->examine_debug_reason
= arm9tdmi_examine_debug_reason
;
900 arm7_9
->change_to_arm
= arm9tdmi_change_to_arm
;
901 arm7_9
->read_core_regs
= arm9tdmi_read_core_regs
;
902 arm7_9
->read_core_regs_target_buffer
= arm9tdmi_read_core_regs_target_buffer
;
903 arm7_9
->read_xpsr
= arm9tdmi_read_xpsr
;
905 arm7_9
->write_xpsr
= arm9tdmi_write_xpsr
;
906 arm7_9
->write_xpsr_im8
= arm9tdmi_write_xpsr_im8
;
907 arm7_9
->write_core_regs
= arm9tdmi_write_core_regs
;
909 arm7_9
->load_word_regs
= arm9tdmi_load_word_regs
;
910 arm7_9
->load_hword_reg
= arm9tdmi_load_hword_reg
;
911 arm7_9
->load_byte_reg
= arm9tdmi_load_byte_reg
;
913 arm7_9
->store_word_regs
= arm9tdmi_store_word_regs
;
914 arm7_9
->store_hword_reg
= arm9tdmi_store_hword_reg
;
915 arm7_9
->store_byte_reg
= arm9tdmi_store_byte_reg
;
917 arm7_9
->write_pc
= arm9tdmi_write_pc
;
918 arm7_9
->branch_resume
= arm9tdmi_branch_resume
;
919 arm7_9
->branch_resume_thumb
= arm9tdmi_branch_resume_thumb
;
921 arm7_9
->enable_single_step
= arm9tdmi_enable_single_step
;
922 arm7_9
->disable_single_step
= arm9tdmi_disable_single_step
;
924 arm7_9
->pre_debug_entry
= NULL
;
925 arm7_9
->post_debug_entry
= NULL
;
927 arm7_9
->pre_restore_context
= NULL
;
928 arm7_9
->post_restore_context
= NULL
;
930 /* initialize arch-specific breakpoint handling */
931 arm7_9
->arm_bkpt
= 0xdeeedeee;
932 arm7_9
->thumb_bkpt
= 0xdeee;
934 arm7_9
->sw_bkpts_use_wp
= 1;
935 arm7_9
->sw_bkpts_enabled
= 0;
936 arm7_9
->dbgreq_adjust_pc
= 3;
937 arm7_9
->arch_info
= arm9tdmi
;
939 arm9tdmi
->common_magic
= ARM9TDMI_COMMON_MAGIC
;
940 arm9tdmi
->arch_info
= NULL
;
944 arm9tdmi
->variant
= strdup(variant
);
948 arm9tdmi
->variant
= strdup("");
951 arm7_9_init_arch_info(target
, arm7_9
);
953 /* override use of DBGRQ, this is safe on ARM9TDMI */
954 arm7_9
->use_dbgrq
= 1;
956 /* all ARM9s have the vector catch register */
957 arm7_9
->has_vector_catch
= 1;
962 int arm9tdmi_get_arch_pointers(target_t
*target
, armv4_5_common_t
**armv4_5_p
, arm7_9_common_t
**arm7_9_p
, arm9tdmi_common_t
**arm9tdmi_p
)
964 armv4_5_common_t
*armv4_5
= target
->arch_info
;
965 arm7_9_common_t
*arm7_9
;
966 arm9tdmi_common_t
*arm9tdmi
;
968 if (armv4_5
->common_magic
!= ARMV4_5_COMMON_MAGIC
)
973 arm7_9
= armv4_5
->arch_info
;
974 if (arm7_9
->common_magic
!= ARM7_9_COMMON_MAGIC
)
979 arm9tdmi
= arm7_9
->arch_info
;
980 if (arm9tdmi
->common_magic
!= ARM9TDMI_COMMON_MAGIC
)
985 *armv4_5_p
= armv4_5
;
987 *arm9tdmi_p
= arm9tdmi
;
993 /* target arm9tdmi <endianess> <startup_mode> <chain_pos> <variant>*/
994 int arm9tdmi_target_command(struct command_context_s
*cmd_ctx
, char *cmd
, char **args
, int argc
, struct target_s
*target
)
997 char *variant
= NULL
;
998 arm9tdmi_common_t
*arm9tdmi
= malloc(sizeof(arm9tdmi_common_t
));
1002 ERROR("'target arm9tdmi' requires at least one additional argument");
1006 chain_pos
= strtoul(args
[3], NULL
, 0);
1011 arm9tdmi_init_arch_info(target
, arm9tdmi
, chain_pos
, variant
);
1016 int arm9tdmi_register_commands(struct command_context_s
*cmd_ctx
)
1020 command_t
*arm9tdmi_cmd
;
1023 retval
= arm7_9_register_commands(cmd_ctx
);
1025 arm9tdmi_cmd
= register_command(cmd_ctx
, NULL
, "arm9tdmi", NULL
, COMMAND_ANY
, "arm9tdmi specific commands");
1027 register_command(cmd_ctx
, arm9tdmi_cmd
, "vector_catch", handle_arm9tdmi_catch_vectors_command
, COMMAND_EXEC
, "catch arm920t vectors ['all'|'none'|'<vec1 vec2 ...>']");
1034 int handle_arm9tdmi_catch_vectors_command(struct command_context_s
*cmd_ctx
, char *cmd
, char **args
, int argc
)
1036 target_t
*target
= get_current_target(cmd_ctx
);
1037 armv4_5_common_t
*armv4_5
;
1038 arm7_9_common_t
*arm7_9
;
1039 arm9tdmi_common_t
*arm9tdmi
;
1040 reg_t
*vector_catch
;
1041 u32 vector_catch_value
;
1044 if (arm9tdmi_get_arch_pointers(target
, &armv4_5
, &arm7_9
, &arm9tdmi
) != ERROR_OK
)
1046 command_print(cmd_ctx
, "current target isn't an ARM9TDMI based target");
1050 vector_catch
= &arm7_9
->eice_cache
->reg_list
[EICE_VEC_CATCH
];
1052 /* read the vector catch register if necessary */
1053 if (!vector_catch
->valid
)
1054 embeddedice_read_reg(vector_catch
);
1056 /* get the current setting */
1057 vector_catch_value
= buf_get_u32(vector_catch
->value
, 0, 32);
1061 vector_catch_value
= 0x0;
1062 if (strcmp(args
[0], "all") == 0)
1064 vector_catch_value
= 0xdf;
1066 else if (strcmp(args
[0], "none") == 0)
1072 for (i
= 0; i
< argc
; i
++)
1074 /* go through list of vectors */
1075 for(j
= 0; arm9tdmi_vectors
[j
].name
; j
++)
1077 if (strcmp(args
[i
], arm9tdmi_vectors
[j
].name
) == 0)
1079 vector_catch_value
|= arm9tdmi_vectors
[j
].value
;
1084 /* complain if vector wasn't found */
1085 if (!arm9tdmi_vectors
[j
].name
)
1087 command_print(cmd_ctx
, "vector '%s' not found, leaving current setting unchanged", args
[i
]);
1089 /* reread current setting */
1090 vector_catch_value
= buf_get_u32(vector_catch
->value
, 0, 32);
1097 /* store new settings */
1098 buf_set_u32(vector_catch
->value
, 0, 32, vector_catch_value
);
1099 embeddedice_store_reg(vector_catch
);
1102 /* output current settings (skip RESERVED vector) */
1103 for (i
= 0; i
< 8; i
++)
1107 command_print(cmd_ctx
, "%s: %s", arm9tdmi_vectors
[i
].name
,
1108 (vector_catch_value
& (1 << i
)) ? "catch" : "don't catch");
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)