int handle_arm7_9_etm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-/* FIX!!! this needs to be overrideable by e.g. fereceon*/
static int arm7_9_clear_watchpoints(arm7_9_common_t *arm7_9)
{
embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_W0_CONTROL_VALUE], 0x0);
embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_W1_CONTROL_VALUE], 0x0);
arm7_9->sw_breakpoints_added = 0;
arm7_9->wp0_used = 0;
- arm7_9->wp1_used = 0;
- arm7_9->wp_available = 2;
+ arm7_9->wp1_used = arm7_9->wp1_used_default;
+ arm7_9->wp_available = arm7_9->wp_available_max;
return jtag_execute_queue();
}
arm7_9->common_magic = ARM7_9_COMMON_MAGIC;
arm_jtag_setup_connection(&arm7_9->jtag_info);
- arm7_9->wp_available = 2;
+ arm7_9->wp_available = 0; /* this is set up in arm7_9_clear_watchpoints() */
+ arm7_9->wp_available_max = 2;
arm7_9->sw_breakpoints_added = 0;
arm7_9->breakpoint_count = 0;
arm7_9->wp0_used = 0;
arm7_9->wp1_used = 0;
+ arm7_9->wp1_used_default = 0;
arm7_9->use_dbgrq = 0;
arm7_9->etm_ctx = NULL;
arm7_9->set_special_dbgrq = feroceon_set_dbgrq;
/* only one working comparator */
- arm7_9->wp_available = 1;
- arm7_9->wp1_used = -1;
+ arm7_9->wp_available_max = 1;
+ arm7_9->wp1_used_default = -1;
return ERROR_OK;
}