zy1000: keep up with latest changes to command handling
authorØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 1 Dec 2009 07:42:53 +0000 (08:42 +0100)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 1 Dec 2009 08:53:23 +0000 (09:53 +0100)
Keep up with Jim Tcl interpreter creation cleanup.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/ecosboard.c
src/jtag/zy1000/zy1000.c

index 5588934ace90285dcfa93d9e318b08a7b0ac3710..36e807ef79e417f4d743c861d3760550b2dc7a8e 100644 (file)
@@ -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();
index 115b3be117c8ea17f5d12c54657d4ba967d86917..07d840feffebc74f8cb10f04dfe6b7c52b417252 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2007-2008 by Øyvind Harboe                              *
+ *   Copyright (C) 2007-2009 by Øyvind Harboe                              *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)