X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fopenocd.c;h=83c35458b9ae89a1ad962f25ded32731a3b00de1;hb=refs%2Fchanges%2F55%2F4055%2F13;hp=604b36d212a28d01ae2240a6d8c74220c47fbb69;hpb=d459a2d27df52643dc8932827a63467a14f7c162;p=openocd.git diff --git a/src/openocd.c b/src/openocd.c index 604b36d212..83c35458b9 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -38,9 +38,11 @@ #include #include #include +#include #include #include +#include #ifdef HAVE_STRINGS_H #include @@ -244,6 +246,7 @@ static struct command_context *setup_command_handler(Jim_Interp *interp) &server_register_commands, &gdb_register_commands, &log_register_commands, + &rtt_server_register_commands, &transport_register_commands, &interface_register_commands, &target_register_commands, @@ -335,6 +338,9 @@ int openocd_main(int argc, char *argv[]) if (ioutil_init(cmd_ctx) != ERROR_OK) return EXIT_FAILURE; + if (rtt_init() != ERROR_OK) + return EXIT_FAILURE; + LOG_OUTPUT("For bug reports, read\n\t" "http://openocd.org/doc/doxygen/bugs.html" "\n"); @@ -364,6 +370,7 @@ int openocd_main(int argc, char *argv[]) /* Shutdown commandline interface */ command_exit(cmd_ctx); + rtt_exit(); free_config(); if (ERROR_FAIL == ret)