From fb27b7f8406949cac996529cbd4815f9cf21f23b Mon Sep 17 00:00:00 2001 From: oharboe Date: Thu, 14 Aug 2008 14:44:10 +0000 Subject: [PATCH] feroceon updated w.r.t. latest arm7/9 changes git-svn-id: svn://svn.berlios.de/openocd/trunk@921 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm7_9_common.c | 9 +++++---- src/target/arm7_9_common.h | 2 ++ src/target/feroceon.c | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 8e2adcc6..d014e4b9 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -59,15 +59,14 @@ int handle_arm7_9_dcc_downloads_command(struct command_context_s *cmd_ctx, char 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(); } @@ -2586,11 +2585,13 @@ int arm7_9_init_arch_info(target_t *target, arm7_9_common_t *arm7_9) 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; diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index 6d7e13ef..ae17a6d1 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -44,8 +44,10 @@ typedef struct arm7_9_common_s int sw_breakpoints_added; int breakpoint_count; int wp_available; + int wp_available_max; int wp0_used; int wp1_used; + int wp1_used_default; int force_hw_bkpts; int dbgreq_adjust_pc; int use_dbgrq; diff --git a/src/target/feroceon.c b/src/target/feroceon.c index 9c774716..38444ab7 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -688,8 +688,8 @@ int feroceon_target_command(struct command_context_s *cmd_ctx, char *cmd, char * 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; } -- 2.39.5