X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fopenocd.c;h=026a32b3f2f1dc062064297a7753fe0489946bb9;hb=f499341558dce8a41086f5439ca0458f4ea1fbfd;hp=226a7310ad6fd1b3b6f266bd908c2b9861228845;hpb=6cacbd9575e03c37057719a97bf260217c4e275f;p=openocd.git diff --git a/src/openocd.c b/src/openocd.c index 226a7310ad..026a32b3f2 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -28,8 +28,6 @@ #include "config.h" #endif -#include "log.h" -#include "types.h" #include "jtag.h" #include "configuration.h" #include "xsvf.h" @@ -40,20 +38,14 @@ #include "pld.h" #include "mflash.h" -#include "command.h" #include "server.h" #include "telnet_server.h" #include "gdb_server.h" #include "tcl_server.h" -#include -#include +#ifdef HAVE_STRINGS_H #include -#include -#include -#include -#include -#include +#endif #define OPENOCD_VERSION \ @@ -87,9 +79,7 @@ static int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, static void exit_handler(void) { - /* close JTAG interface */ - if (jtag && jtag->quit) - jtag->quit(); + jtag_interface_quit(); } static int log_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv) @@ -187,7 +177,8 @@ static int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, cha command_context_t *global_cmd_ctx; -static command_context_t *setup_command_handler(void) +/* NB! this fn can be invoked outside this file for non PC hosted builds */ +command_context_t *setup_command_handler(void) { command_context_t *cmd_ctx; @@ -229,7 +220,7 @@ int httpd_start(void); void httpd_stop(void); -#if !BUILD_HTTPD +#if !BUILD_HTTPD && !BUILD_ECOSBOARD /* implementations of OpenOCD that uses multithreading needs to know when * OpenOCD is sleeping. No-op in vanilla OpenOCD */