From 7805be1b3a8f65aff9a861fd8ca62518143f1524 Mon Sep 17 00:00:00 2001 From: oharboe Date: Fri, 11 Apr 2008 06:52:52 +0000 Subject: added target->type->examine(). Eventually this will allow for bringing up telnet/gdb *before* jtag chain has been validated + it might fix some reset halt problems seen as examine() needs to run after TRST has been asserted. git-svn-id: svn://svn.berlios.de/openocd/trunk@563 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/openocd.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/openocd.c') diff --git a/src/openocd.c b/src/openocd.c index 71963cb9..3c7816ea 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -95,6 +95,10 @@ int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **arg atexit(exit_handler); + /* FIX!!! this should happen *after* target_init(), but + * for now there are target initialisations that talk + * to JTAG whereas that *should* happen during target_examine() + */ if (jtag_init(cmd_ctx) != ERROR_OK) return ERROR_FAIL; LOG_DEBUG("jtag init complete"); @@ -103,6 +107,10 @@ int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **arg return ERROR_FAIL; LOG_DEBUG("target init complete"); + if (target_examine(cmd_ctx) != ERROR_OK) + return ERROR_FAIL; + LOG_DEBUG("target examine complete"); + if (flash_init_drivers(cmd_ctx) != ERROR_OK) return ERROR_FAIL; LOG_DEBUG("flash init complete"); -- cgit v1.2.3