summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-11 11:19:17 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-11 11:19:17 +0000
commit0d7d64b5e9a463f63deb19f00efa14e6e5b1c34e (patch)
treebe5110afd61445059d3e0dbefdd9540053c590bb /src
parent7805be1b3a8f65aff9a861fd8ca62518143f1524 (diff)
downloadopenocd_libswd-0d7d64b5e9a463f63deb19f00efa14e6e5b1c34e.tar.gz
openocd_libswd-0d7d64b5e9a463f63deb19f00efa14e6e5b1c34e.tar.bz2
openocd_libswd-0d7d64b5e9a463f63deb19f00efa14e6e5b1c34e.tar.xz
openocd_libswd-0d7d64b5e9a463f63deb19f00efa14e6e5b1c34e.zip
Wip - split target setup and target examination
git-svn-id: svn://svn.berlios.de/openocd/trunk@564 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/target/arm720t.c1
-rw-r--r--src/target/arm7tdmi.c6
-rw-r--r--src/target/arm7tdmi.h1
-rw-r--r--src/target/arm920t.c1
-rw-r--r--src/target/arm926ejs.c1
-rw-r--r--src/target/arm966e.c1
-rw-r--r--src/target/arm9tdmi.c6
-rw-r--r--src/target/arm9tdmi.h1
-rw-r--r--src/target/feroceon.c1
-rw-r--r--src/target/target.c7
10 files changed, 26 insertions, 0 deletions
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index d364437a..24885d2e 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -81,6 +81,7 @@ target_type_t arm720t_target =
.register_commands = arm720t_register_commands,
.target_command = arm720t_target_command,
.init_target = arm720t_init_target,
+ .examine = arm7tdmi_examine,
.quit = arm720t_quit
};
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 35902ba6..52a15bc6 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -86,6 +86,7 @@ target_type_t arm7tdmi_target =
.register_commands = arm7tdmi_register_commands,
.target_command = arm7tdmi_target_command,
.init_target = arm7tdmi_init_target,
+ .examine = arm7tdmi_examine,
.quit = arm7tdmi_quit
};
@@ -753,6 +754,11 @@ void arm7tdmi_build_reg_cache(target_t *target)
}
}
+int arm7tdmi_examine(struct command_context_s *cmd_ctx, struct target_s *target)
+{
+ return ERROR_OK;
+}
+
int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target)
{
diff --git a/src/target/arm7tdmi.h b/src/target/arm7tdmi.h
index 104d1e03..95b79385 100644
--- a/src/target/arm7tdmi.h
+++ b/src/target/arm7tdmi.h
@@ -40,6 +40,7 @@ typedef struct arm7tdmi_common_s
int arm7tdmi_register_commands(struct command_context_s *cmd_ctx);
int arm7tdmi_init_arch_info(target_t *target, arm7tdmi_common_t *arm7tdmi, int chain_pos, char *variant);
int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
+int arm7tdmi_examine(struct command_context_s *cmd_ctx, struct target_s *target);
#endif /* ARM7TDMI_H */
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index ae8814e5..93ddb4ca 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -90,6 +90,7 @@ target_type_t arm920t_target =
.register_commands = arm920t_register_commands,
.target_command = arm920t_target_command,
.init_target = arm920t_init_target,
+ .examine = arm9tdmi_examine,
.quit = arm920t_quit
};
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 14cd674a..50abd462 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -90,6 +90,7 @@ target_type_t arm926ejs_target =
.register_commands = arm926ejs_register_commands,
.target_command = arm926ejs_target_command,
.init_target = arm926ejs_init_target,
+ .examine = arm9tdmi_examine,
.quit = arm926ejs_quit,
.virt2phys = arm926ejs_virt2phys,
.mmu = arm926ejs_mmu
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index 84c55cf4..3112e0fc 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -81,6 +81,7 @@ target_type_t arm966e_target =
.register_commands = arm966e_register_commands,
.target_command = arm966e_target_command,
.init_target = arm966e_init_target,
+ .examine = arm9tdmi_examine,
.quit = arm966e_quit,
};
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index 4a4b9a1c..2997ee2e 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -84,6 +84,7 @@ target_type_t arm9tdmi_target =
.register_commands = arm9tdmi_register_commands,
.target_command = arm9tdmi_target_command,
.init_target = arm9tdmi_init_target,
+ .examine = arm9tdmi_examine,
.quit = arm9tdmi_quit
};
@@ -859,6 +860,11 @@ void arm9tdmi_build_reg_cache(target_t *target)
}
}
+int arm9tdmi_examine(struct command_context_s *cmd_ctx, struct target_s *target)
+{
+ return ERROR_OK;
+}
+
int arm9tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target)
{
diff --git a/src/target/arm9tdmi.h b/src/target/arm9tdmi.h
index 728d2951..96567925 100644
--- a/src/target/arm9tdmi.h
+++ b/src/target/arm9tdmi.h
@@ -56,6 +56,7 @@ enum arm9tdmi_vector
};
extern int arm9tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
+int arm9tdmi_examine(struct command_context_s *cmd_ctx, struct target_s *target);
extern int arm9tdmi_init_arch_info(target_t *target, arm9tdmi_common_t *arm9tdmi, int chain_pos, char *variant);
extern int arm9tdmi_register_commands(struct command_context_s *cmd_ctx);
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index 0c1d46da..c6edc429 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -94,6 +94,7 @@ target_type_t feroceon_target =
.register_commands = arm926ejs_register_commands,
.target_command = feroceon_target_command,
.init_target = feroceon_init_target,
+ .examine = arm9tdmi_examine,
.quit = feroceon_quit
};
diff --git a/src/target/target.c b/src/target/target.c
index 5850fada..28639a76 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -436,6 +436,11 @@ static int default_examine(struct command_context_s *cmd_ctx, struct target_s *t
}
+/* Targets that correctly implement init+examine, i.e.
+ * no communication with target during init:
+ *
+ * XScale
+ */
int target_examine(struct command_context_s *cmd_ctx)
{
int retval = ERROR_OK;
@@ -448,6 +453,8 @@ int target_examine(struct command_context_s *cmd_ctx)
}
return retval;
}
+
+
int target_init(struct command_context_s *cmd_ctx)
{
target_t *target = targets;