-command_context_t *setup_command_handler()
-{
- command_context_t *cmd_ctx;
-
- cmd_ctx = command_init();
-
- register_command(cmd_ctx, NULL, "version", handle_version_command,
- COMMAND_EXEC, "show OpenOCD version");
- register_command(cmd_ctx, NULL, "daemon_startup", handle_daemon_startup_command, COMMAND_CONFIG,
- "deprecated - use \"init\" and \"reset\" at end of startup script instead");
-
- /* register subsystem commands */
- server_register_commands(cmd_ctx);
- telnet_register_commands(cmd_ctx);
- gdb_register_commands(cmd_ctx);
- tcl_register_commands(cmd_ctx); /* tcl server commands */
- log_register_commands(cmd_ctx);
- jtag_register_commands(cmd_ctx);
- interpreter_register_commands(cmd_ctx);
- xsvf_register_commands(cmd_ctx);
- target_register_commands(cmd_ctx);
- flash_register_commands(cmd_ctx);
- nand_register_commands(cmd_ctx);
- pld_register_commands(cmd_ctx);
-
- if (log_init(cmd_ctx) != ERROR_OK)
- {
- exit(-1);
- }
- LOG_DEBUG("log init complete");
-
- LOG_OUTPUT( OPENOCD_VERSION "\n" );
-
-
- /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
- LOG_OUTPUT( "$URL$\n");
- /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
- /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
-
- register_command(cmd_ctx, NULL, "init", handle_init_command,
- COMMAND_ANY, "initializes target and servers - nop on subsequent invocations");