diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-12-01 08:42:53 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-12-01 09:53:23 +0100 |
commit | 445da543d8db868466dcef7e23f75b3c2b54bc72 (patch) | |
tree | 819361158cd05346790c0cd9d7bdc7340dd97a36 /src/ecosboard.c | |
parent | 5576a6240a103879e1a8d9d4c2b6ff4aee0d23fa (diff) | |
download | riscv-openocd-445da543d8db868466dcef7e23f75b3c2b54bc72.zip riscv-openocd-445da543d8db868466dcef7e23f75b3c2b54bc72.tar.gz riscv-openocd-445da543d8db868466dcef7e23f75b3c2b54bc72.tar.bz2 |
zy1000: keep up with latest changes to command handling
Keep up with Jim Tcl interpreter creation cleanup.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/ecosboard.c')
-rw-r--r-- | src/ecosboard.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ecosboard.c b/src/ecosboard.c index 5588934..36e807e 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -80,6 +80,7 @@ #include <unistd.h> #include <stdio.h> +#include <openocd.h> #ifdef CYGPKG_HAL_NIOS2 #define ZY1000_SER_DEV "/dev/uart_0" @@ -505,8 +506,6 @@ static void zylinjtag_startNetwork(void) cyg_httpd_init_tcl_interpreter(); - interp = httpstate.jim_interp; - Jim_CreateCommand(httpstate.jim_interp, "log", zylinjtag_Jim_Command_log, NULL, NULL); Jim_CreateCommand(httpstate.jim_interp, "zy1000_reboot", @@ -933,8 +932,6 @@ bool logAllToSerial = false; int boolParam(char *var); -struct command_context *setup_command_handler(void); - static const char *zylin_config_dir="/config/settings"; static int add_default_dirs(void) @@ -1078,7 +1075,8 @@ int main(int argc, char *argv[]) /* initialize commandline interface */ struct command_context * cmd_ctx; - cmd_ctx = setup_command_handler(); + struct command_context *setup_command_handler(Jim_Interp *interp); + cmd_ctx = setup_command_handler(httpstate.jim_interp); command_set_output_handler(cmd_ctx, configuration_output_handler, NULL); command_context_mode(cmd_ctx, COMMAND_CONFIG); @@ -1095,7 +1093,7 @@ int main(int argc, char *argv[]) COMMAND_ANY, NULL); #endif - Jim_CreateCommand(interp, "uart", zylinjtag_Jim_Command_uart, NULL, NULL); + Jim_CreateCommand(httpstate.jim_interp, "uart", zylinjtag_Jim_Command_uart, NULL, NULL); log_init(); |