-int arm9tdmi_examine(struct target_s *target)
-{
- int retval;
- struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
-
- if (!target_was_examined(target))
- {
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
- reg_cache_t *t;
- /* one extra register (vector catch) */
- t = embeddedice_build_reg_cache(target, arm7_9);
- if (t == NULL)
- return ERROR_FAIL;
- (*cache_p) = t;
- arm7_9->eice_cache = (*cache_p);
-
- if (arm7_9->armv4_5_common.etm)
- {
- struct arm_jtag *jtag_info = &arm7_9->jtag_info;
- (*cache_p)->next = etm_build_reg_cache(target,
- jtag_info, arm7_9->armv4_5_common.etm);
- arm7_9->armv4_5_common.etm->reg_cache = (*cache_p)->next;
- }
- target_set_examined(target);
- }
- if ((retval = embeddedice_setup(target)) != ERROR_OK)
- return retval;
- if ((retval = arm7_9_setup(target)) != ERROR_OK)
- return retval;
- if (arm7_9->armv4_5_common.etm)
- {
- if ((retval = etm_setup(target)) != ERROR_OK)
- return retval;
- }
- return ERROR_OK;
-}
-
-int arm9tdmi_init_target(struct command_context_s *cmd_ctx,
- struct target_s *target)