- /* remove breakpoint. hw will only be updated if the target is currently halted.
- * However, this method can be invoked on unresponsive targets.
- */
- int (*remove_breakpoint)(struct target_s *target, breakpoint_t *breakpoint);
- int (*add_watchpoint)(struct target_s *target, watchpoint_t *watchpoint);
- /* remove watchpoint. hw will only be updated if the target is currently halted.
- * However, this method can be invoked on unresponsive targets.
- */
- int (*remove_watchpoint)(struct target_s *target, watchpoint_t *watchpoint);
-
- /* target algorithm support */
- int (*run_algorithm_imp)(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_param, u32 entry_point, u32 exit_point, int timeout_ms, void *arch_info);
- /**
- * Target algorithm support. Do @b not call this method directly,
- * use target_run_algorithm() instead.
- */
- int (*run_algorithm)(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_param, u32 entry_point, u32 exit_point, int timeout_ms, void *arch_info);
-
- int (*register_commands)(struct command_context_s *cmd_ctx);
-
- /* called when target is created */
- int (*target_create)( struct target_s *target, Jim_Interp *interp );
-
- /* called for various config parameters */
- /* returns JIM_CONTINUE - if option not understood */
- /* otherwise: JIM_OK, or JIM_ERR, */
- int (*target_jim_configure)( struct target_s *target, Jim_GetOptInfo *goi );
-
- /* target commands specifically handled by the target */
- /* returns JIM_OK, or JIM_ERR, or JIM_CONTINUE - if option not understood */
- int (*target_jim_commands)( struct target_s *target, Jim_GetOptInfo *goi );
-
- /* invoked after JTAG chain has been examined & validated. During
- * this stage the target is examined and any additional setup is
- * performed.
- *
- * invoked every time after the jtag chain has been validated/examined
- */
- int (*examine)(struct target_s *target);
- /* Set up structures for target.
- *
- * It is illegal to talk to the target at this stage as this fn is invoked
- * before the JTAG chain has been examined/verified
- * */
- int (*init_target)(struct command_context_s *cmd_ctx, struct target_s *target);
- int (*quit)(void);
-
- int (*virt2phys)(struct target_s *target, u32 address, u32 *physical);
- int (*mmu)(struct target_s *target, int *enabled);
-
-} target_type_t;
-
-/* forward decloration */
-typedef struct target_event_action_s target_event_action_t;
-
-typedef struct target_s
-{
- target_type_t *type; /* target type definition (name, access functions) */
- const char *cmd_name; /* tcl Name of target */
- int target_number; /* generaly, target index but may not be in order */
- jtag_tap_t *tap; /* where on the jtag chain is this */
- const char *variant; /* what varient of this chip is it? */
- target_event_action_t *event_action;