atexit(exit_handler);
+ command_context_mode(CMD_CTX, COMMAND_EXEC);
+
if (target_init(CMD_CTX) != ERROR_OK)
return ERROR_FAIL;
LOG_DEBUG("target init complete");
/* initialize telnet subsystem */
telnet_init("Open On-Chip Debugger");
- gdb_init();
+ gdb_target_add_all(all_targets);
tcl_init(); /* allows tcl to just connect without going thru telnet */
target_register_event_callback(log_target_callback_event_handler, CMD_CTX);
if (ret != ERROR_COMMAND_CLOSE_CONNECTION)
{
- command_context_mode(cmd_ctx, COMMAND_EXEC);
if (command_run_line(cmd_ctx, "init") != ERROR_OK)
return EXIT_FAILURE;