+ register_command(cmd_ctx, NULL, "init", handle_init_command,
+ COMMAND_ANY, "initializes target and servers - nop on subsequent invocations");
+
+ return cmd_ctx;
+}
+
+/* normally this is the main() function entry, but if OpenOCD is linked
+ * into application, then this fn will not be invoked, but rather that
+ * application will have it's own implementation of main(). */
+int openocd_main(int argc, char *argv[])
+{
+ /* initialize commandline interface */
+ command_context_t *cmd_ctx;
+
+ cmd_ctx = setup_command_handler();
+