From fdae51287cf55a039f3401ed92151dbf518e4e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Thu, 11 Nov 2010 08:15:49 +0100 Subject: [PATCH] httpd: retire this server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this never panned out and there are enough mistakes in the code that probably nobody used this. Use the tcl server and implement a standalone http app instead works fine. Signed-off-by: Øyvind Harboe --- README | 2 - configure.in | 5 - doc/manual/server.txt | 14 - src/Makefile.am | 4 - src/openocd.c | 6 - src/server/Makefile.am | 24 +- src/server/httpd.c | 506 --------- src/server/httpd.h | 28 - src/server/httpd/Stylizer.class | Bin 4493 -> 0 bytes src/server/httpd/Stylizer.java | 114 -- src/server/httpd/browsemem.tcl | 454 -------- src/server/httpd/build.sh | 5 - src/server/httpd/downloadmem.tcl | 366 ------- src/server/httpd/editconfigs.tcl | 462 --------- src/server/httpd/editfile.tcl | 436 -------- src/server/httpd/erase.tcl | 387 ------- src/server/httpd/flash.tcl | 459 --------- src/server/httpd/flashinfo.tcl | 382 ------- src/server/httpd/guiupload.tcl | 336 ------ src/server/httpd/html2tcl.sh | 128 --- src/server/httpd/httpd.tcl | 100 -- src/server/httpd/index.tcl | 376 ------- src/server/httpd/log.tcl | 343 ------ src/server/httpd/menu.xml | 973 ------------------ src/server/httpd/menu.xsl | 298 ------ src/server/httpd/menu_cuts/center_bottom.png | Bin 309 -> 0 bytes src/server/httpd/menu_cuts/center_top.png | Bin 307 -> 0 bytes src/server/httpd/menu_cuts/h_tab1.png | Bin 364 -> 0 bytes .../httpd/menu_cuts/h_tab1_selected.png | Bin 310 -> 0 bytes src/server/httpd/menu_cuts/h_tab2.png | Bin 349 -> 0 bytes .../httpd/menu_cuts/h_tab2_selected.png | Bin 330 -> 0 bytes src/server/httpd/menu_cuts/h_tab_free.png | Bin 454 -> 0 bytes src/server/httpd/menu_cuts/logo_bottom.png | Bin 960 -> 0 bytes src/server/httpd/menu_cuts/logo_top.png | Bin 3082 -> 0 bytes src/server/httpd/menu_cuts/right_bottom.png | Bin 351 -> 0 bytes src/server/httpd/menu_cuts/right_top.png | Bin 281 -> 0 bytes .../httpd/menu_cuts/right_top_small.png | Bin 265 -> 0 bytes src/server/httpd/menu_cuts/top_right.png | Bin 352 -> 0 bytes src/server/httpd/menu_cuts/v_1.png | Bin 305 -> 0 bytes src/server/httpd/menu_cuts/v_2_tile.png | Bin 169 -> 0 bytes src/server/httpd/menu_cuts/v_3.png | Bin 2289 -> 0 bytes src/server/httpd/menu_cuts/v_tab.png | Bin 390 -> 0 bytes src/server/httpd/menu_cuts/v_tab_selected.png | Bin 357 -> 0 bytes src/server/httpd/menuweb.css | 132 --- src/server/httpd/openocd.tcl | 355 ------- src/server/httpd/preconfig.tcl | 429 -------- src/server/httpd/production.tcl | 392 ------- src/server/httpd/readme.txt | 24 - src/server/httpd/reload.tcl | 322 ------ src/server/httpd/run.tcl | 382 ------- src/server/httpd/support.tcl | 431 -------- src/server/httpd/targets.tcl | 560 ---------- src/server/httpd/terminal.tcl | 364 ------- src/server/httpd/upgrade.tcl | 418 -------- src/server/httpd_stubs.c | 33 - src/server/server.h | 4 +- 56 files changed, 3 insertions(+), 10051 deletions(-) delete mode 100644 src/server/httpd.c delete mode 100644 src/server/httpd.h delete mode 100755 src/server/httpd/Stylizer.class delete mode 100755 src/server/httpd/Stylizer.java delete mode 100644 src/server/httpd/browsemem.tcl delete mode 100755 src/server/httpd/build.sh delete mode 100644 src/server/httpd/downloadmem.tcl delete mode 100644 src/server/httpd/editconfigs.tcl delete mode 100644 src/server/httpd/editfile.tcl delete mode 100644 src/server/httpd/erase.tcl delete mode 100644 src/server/httpd/flash.tcl delete mode 100644 src/server/httpd/flashinfo.tcl delete mode 100644 src/server/httpd/guiupload.tcl delete mode 100755 src/server/httpd/html2tcl.sh delete mode 100644 src/server/httpd/httpd.tcl delete mode 100644 src/server/httpd/index.tcl delete mode 100644 src/server/httpd/log.tcl delete mode 100644 src/server/httpd/menu.xml delete mode 100644 src/server/httpd/menu.xsl delete mode 100644 src/server/httpd/menu_cuts/center_bottom.png delete mode 100644 src/server/httpd/menu_cuts/center_top.png delete mode 100644 src/server/httpd/menu_cuts/h_tab1.png delete mode 100644 src/server/httpd/menu_cuts/h_tab1_selected.png delete mode 100644 src/server/httpd/menu_cuts/h_tab2.png delete mode 100644 src/server/httpd/menu_cuts/h_tab2_selected.png delete mode 100644 src/server/httpd/menu_cuts/h_tab_free.png delete mode 100644 src/server/httpd/menu_cuts/logo_bottom.png delete mode 100644 src/server/httpd/menu_cuts/logo_top.png delete mode 100644 src/server/httpd/menu_cuts/right_bottom.png delete mode 100644 src/server/httpd/menu_cuts/right_top.png delete mode 100644 src/server/httpd/menu_cuts/right_top_small.png delete mode 100644 src/server/httpd/menu_cuts/top_right.png delete mode 100644 src/server/httpd/menu_cuts/v_1.png delete mode 100644 src/server/httpd/menu_cuts/v_2_tile.png delete mode 100644 src/server/httpd/menu_cuts/v_3.png delete mode 100644 src/server/httpd/menu_cuts/v_tab.png delete mode 100644 src/server/httpd/menu_cuts/v_tab_selected.png delete mode 100644 src/server/httpd/menuweb.css delete mode 100644 src/server/httpd/openocd.tcl delete mode 100644 src/server/httpd/preconfig.tcl delete mode 100644 src/server/httpd/production.tcl delete mode 100644 src/server/httpd/readme.txt delete mode 100644 src/server/httpd/reload.tcl delete mode 100644 src/server/httpd/run.tcl delete mode 100644 src/server/httpd/support.tcl delete mode 100644 src/server/httpd/targets.tcl delete mode 100644 src/server/httpd/terminal.tcl delete mode 100644 src/server/httpd/upgrade.tcl delete mode 100644 src/server/httpd_stubs.c diff --git a/README b/README index a683476c4..fd0bd33d5 100644 --- a/README +++ b/README @@ -255,8 +255,6 @@ options may be available there: --enable-ioutil Enable ioutil functions - useful for standalone OpenOCD implementations - --enable-httpd Enable builtin httpd server - useful for standalone - OpenOCD implementations --disable-doxygen-html Disable building Doxygen manual as HTML. --enable-doxygen-pdf Enable building Doxygen manual as PDF. diff --git a/configure.in b/configure.in index a15b80a60..70dddb95e 100644 --- a/configure.in +++ b/configure.in @@ -420,10 +420,6 @@ AC_ARG_ENABLE(ioutil, AS_HELP_STRING([--enable-ioutil], [Enable ioutil functions - useful for standalone OpenOCD implementations]), [build_ioutil=$enableval], [build_ioutil=no]) -AC_ARG_ENABLE(httpd, - AS_HELP_STRING([--enable-httpd], [Enable builtin httpd server - useful for standalone OpenOCD implementations]), - [build_httpd=$enableval], [build_httpd=no]) - case "${host_cpu}" in arm*) AC_ARG_ENABLE(ep93xx, @@ -1039,7 +1035,6 @@ AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes) AM_CONDITIONAL(ZY1000, test $build_zy1000 = yes) AM_CONDITIONAL(ZY1000_MASTER, test $build_zy1000_master = yes) AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes) -AM_CONDITIONAL(HTTPD, test $build_httpd = yes) AM_CONDITIONAL(AT91RM9200, test $build_at91rm9200 = yes) AM_CONDITIONAL(BITBANG, test $build_bitbang = yes) AM_CONDITIONAL(FT2232_LIBFTDI, test $build_ft2232_libftdi = yes) diff --git a/doc/manual/server.txt b/doc/manual/server.txt index f75f1d1d3..f6a06700b 100644 --- a/doc/manual/server.txt +++ b/doc/manual/server.txt @@ -309,17 +309,3 @@ This section needs to be expanded. */ -/** @page serverhttp OpenOCD HTTP Server API - - -Smoketest: - -configure --enable-httpd --enable-dummy --enable-ioutil - -openocd -s /usr/local/share/openocd -f httpd/httpd.tcl -f interface/dummy.cfg -f target/lpc2148.cfg - -Navigate to: http://localhost:8888/ - - - - */ diff --git a/src/Makefile.am b/src/Makefile.am index b54161c82..19a0ba96c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -101,10 +101,6 @@ libopenocd_la_LIBADD = \ $(top_builddir)/src/helper/libhelper.la \ $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) -if HTTPD -libopenocd_la_LIBADD += -lmicrohttpd -endif - STARTUP_TCL_SRCS = \ $(srcdir)/helper/startup.tcl \ $(srcdir)/jtag/startup.tcl \ diff --git a/src/openocd.c b/src/openocd.c index 7347cad8e..5ce01e82b 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -42,7 +42,6 @@ #include #include -#include #ifdef HAVE_STRINGS_H #include @@ -337,9 +336,6 @@ int openocd_main(int argc, char *argv[]) if (ret != ERROR_OK) return EXIT_FAILURE; - if (httpd_start(cmd_ctx) != ERROR_OK) - return EXIT_FAILURE; - ret = server_init(cmd_ctx); if (ERROR_OK != ret) return EXIT_FAILURE; @@ -357,8 +353,6 @@ int openocd_main(int argc, char *argv[]) server_quit(); - httpd_stop(); - unregister_all_commands(cmd_ctx, NULL); /* free commandline interface */ diff --git a/src/server/Makefile.am b/src/server/Makefile.am index c6c946f0b..ac24ebb55 100644 --- a/src/server/Makefile.am +++ b/src/server/Makefile.am @@ -8,15 +8,9 @@ noinst_LTLIBRARIES = libserver.la noinst_HEADERS = server.h telnet_server.h gdb_server.h libserver_la_SOURCES = server.c telnet_server.c gdb_server.c -if HTTPD -libserver_la_SOURCES += httpd.c -else -libserver_la_SOURCES += httpd_stubs.c if !ECOSBOARD libserver_la_SOURCES += server_stubs.c endif -endif -noinst_HEADERS += httpd.h libserver_la_CFLAGS = if IS_MINGW @@ -28,23 +22,7 @@ endif noinst_HEADERS += tcl_server.h libserver_la_SOURCES += tcl_server.c -if HTTPD -nobase_dist_pkgdata_DATA = \ - $(wildcard \ - $(srcdir)/httpd/*.tcl \ - $(srcdir)/httpd/*.css \ - $(srcdir)/httpd/menu_cuts/*.png \ - ) -endif - EXTRA_DIST = \ - startup.tcl \ - httpd/readme.txt \ - httpd/menu.xml \ - httpd/menu.xsl \ - httpd/build.sh \ - httpd/html2tcl.sh \ - httpd/Stylizer.java \ - httpd/Stylizer.class + startup.tcl MAINTAINERCLEANFILES = $(srcdir)/Makefile.in diff --git a/src/server/httpd.c b/src/server/httpd.c deleted file mode 100644 index af8c3c8bb..000000000 --- a/src/server/httpd.c +++ /dev/null @@ -1,506 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007,2008,2009 Øyvind Harboe * - * oyvind.harboe@zylin.com * - * * - * 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 * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -/* some bits were copied from ahttpd which is under eCos license and - * copyright to FSF - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "telnet_server.h" -#include - -#include -#include -#include - -#define PAGE_NOT_FOUND " File not found File not found" - -static pthread_mutex_t mutex; - -void openocd_sleep_prelude(void) -{ - pthread_mutex_unlock(&mutex); -} - -void openocd_sleep_postlude(void) -{ - pthread_mutex_lock(&mutex); -} - - - -int loadFile(const char *name, void **data, size_t *len); - -static const char *appendf(const char *prev, const char *format, ...) -{ - va_list ap; - va_start(ap, format); - char *string = alloc_vprintf(format, ap); - va_end(ap); - char *string2 = NULL; - - if (string != NULL) - { - string2 = alloc_printf("%s%s", (prev == NULL) ? "" : prev, string); - } - - if (prev != NULL) - { - free((void *)prev); - } - - if (string == NULL) - free(string); - - return string2; -} - -static const char *httpd_exec_cgi_tcl_error(Jim_Interp *interp) -{ - int len, i; - - const char *t = NULL; - t = appendf(t, "\n"); - - t = appendf(t, "Runtime error, file \"%s\", line %d:
", - interp->errorFileName, interp->errorLine); - t = appendf(t, " %s < br>", Jim_GetString(interp->result, NULL)); - Jim_ListLength(interp, interp->stackTrace, &len); - for (i = 0; i < len; i += 3) - { - Jim_Obj *objPtr; - const char *proc, *file, *line; - - Jim_ListIndex(interp, interp->stackTrace, i, &objPtr, JIM_NONE); - proc = Jim_GetString(objPtr, NULL); - Jim_ListIndex(interp, interp->stackTrace, i + 1, &objPtr, JIM_NONE); - file = Jim_GetString(objPtr, NULL); - Jim_ListIndex(interp, interp->stackTrace, i + 2, &objPtr, JIM_NONE); - line = Jim_GetString(objPtr, NULL); - t = appendf(t, "In procedure '%s' called at file \"%s\", line %s < br>", - proc, file, line); - } - t = appendf(t, "\n"); - - return t; -} - -static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc, - Jim_Obj * const *argv) -{ - if (argc != 3) - { - Jim_WrongNumArgs(interp, 1, argv, "method ?CMD_ARGV ...?"); - return JIM_ERR; - } - char *name = (char*) Jim_GetString(argv[1], NULL); - char *file = (char*) Jim_GetString(argv[2], NULL); - - // Find length - const char *data; - int actual; - int retcode; - const char *script = alloc_printf( - "set dummy_val $httppostdata(%s); set dummy_val", - name); - - retcode = Jim_Eval_Named(interp, script, __FILE__, __LINE__); - free((void *) script); - if (retcode != JIM_OK) - return retcode; - - data = Jim_GetString(Jim_GetResult(interp), &actual); - - FILE *f = fopen(file, "wb"); - if (NULL == f) - { - Jim_SetResultString(interp, "Could not create file", -1); - return JIM_ERR; - } - - int result = fwrite(data, 1, actual, f); - fclose(f); - - if (result != actual) - { - Jim_SetResultString(interp, "Could not write to file", -1); - return JIM_ERR; - } - return JIM_OK; -} - - -int -httpd_Jim_Command_formfetch(Jim_Interp *interp, - int argc, - Jim_Obj *const *argv) -{ - if (argc != 2) - { - Jim_WrongNumArgs(interp, 1, argv, "method ?CMD_ARGV ...?"); - return JIM_ERR; - } - - char *name = (char*)Jim_GetString(argv[1], NULL); - const char *script = alloc_printf( - "set dummy_val $httppostdata(%s); set dummy_val", - name); - int retcode = Jim_Eval_Named(interp, script, __FILE__, __LINE__); - - free((void *) script); - if (retcode != JIM_OK) - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - else - Jim_SetResult(interp, Jim_GetResult(interp)); - - return JIM_OK; -} - -struct httpd_request -{ - int post; - Jim_Interp *interp; - struct MHD_PostProcessor *postprocessor; - - //Jim_Obj *dict; - - int complete; /* did we receive the entire post ? */ - -}; - -static void request_completed(void *cls, struct MHD_Connection *connection, - void **con_cls, enum MHD_RequestTerminationCode toe) -{ - struct httpd_request *r = (struct httpd_request*) *con_cls; - - if (NULL == r) - return; - - if (r->postprocessor) - { - openocd_sleep_postlude(); - MHD_destroy_post_processor(r->postprocessor); - openocd_sleep_prelude(); - } - - free(r); - *con_cls = NULL; -} - -/* append to said key in dictionary */ -static void append_key(Jim_Interp *interp, - struct httpd_request *r, const char *key, - const char *data, size_t off, size_t size) -{ - Jim_Obj *keyObj = Jim_NewStringObj(interp, key, -1); - Jim_IncrRefCount(keyObj); - Jim_Obj *value = NULL; - - Jim_Obj *dict = Jim_GetVariableStr(interp, "httppostdata", 0); - - if (dict != NULL) - { - if (Jim_DictKey(interp, dict, keyObj, &value, 0) != JIM_OK) - { - value = NULL; - } - else - { - Jim_IncrRefCount(value); - } - } - - if (value == NULL) - { - value = Jim_NewStringObj(interp, "", -1); - Jim_IncrRefCount(value); - - } - - /* create a new object we append to and insert into this location */ - Jim_Obj *newObj = Jim_NewStringObj(interp, "", -1); - Jim_IncrRefCount(newObj); - Jim_AppendObj(interp, newObj, value); - Jim_AppendString(interp, newObj, data, size); - /* uhh... use name here of dictionary */ - dict = Jim_NewStringObj(interp, "httppostdata", -1); - Jim_IncrRefCount(dict); - Jim_SetDictKeysVector(interp, dict, &keyObj, 1, newObj); - Jim_DecrRefCount(interp, dict); - Jim_DecrRefCount(interp, value); - Jim_DecrRefCount(interp, newObj); - Jim_DecrRefCount(interp, keyObj); -} - -/* append data to each key */ -static int iterate_post(void *con_cls, enum MHD_ValueKind kind, - const char *key, const char *filename, const char *content_type, - const char *transfer_encoding, const char *data, uint64_t off, - size_t size) -{ - struct httpd_request *r = (struct httpd_request*) con_cls; - - append_key(r->interp, r, key, data, off, size); - - return MHD_YES; -} - -static int record_arg(void *cls, enum MHD_ValueKind kind, const char *key, - const char *value) -{ - struct httpd_request *r = (struct httpd_request*) cls; - append_key(r->interp, r, key, value, 0, strlen(value)); - return MHD_YES; -} - - -static int handle_request(Jim_Interp *interp, - struct MHD_Connection * connection, const char * url) -{ - struct MHD_Response * response; - - int ret; - const char *suffix; - suffix = strrchr(url, '.'); - if ((suffix != NULL) && (strcmp(suffix, ".tcl") == 0)) - { - printf("Run tcl %s\n", url); - - int retcode; - - const char *script = alloc_printf( - "global httpdata; source {%s}; set httpdata", url); - retcode = Jim_Eval_Named(interp, script, __FILE__, __LINE__); - free((void *) script); - - if (retcode != JIM_OK) - { - printf("Tcl failed\n"); - const char *t = httpd_exec_cgi_tcl_error(interp); - if (t == NULL) - return MHD_NO; - - response = MHD_create_response_from_data(strlen(t), (void *) t, - MHD_YES, MHD_NO); - ret = MHD_queue_response(connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, response); - MHD_destroy_response(response); - return ret; - } - else - { - LOG_DEBUG("Tcl OK"); - /* FIX!!! how to handle mime types??? */ - const char *result; - int reslen; - result = Jim_GetString(Jim_GetResult(interp), &reslen); - - response = MHD_create_response_from_data(reslen, (void *) result, - MHD_NO, MHD_YES); - ret = MHD_queue_response(connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, response); - MHD_destroy_response(response); - return ret; - } - } - else - { - void *data; - size_t len; - - int retval = loadFile(url, &data, &len); - if (retval != ERROR_OK) - { - printf("Did not find %s\n", url); - - response = MHD_create_response_from_data(strlen(PAGE_NOT_FOUND), - (void *) PAGE_NOT_FOUND, MHD_NO, MHD_NO); - ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response); - MHD_destroy_response(response); - return ret; - } - - LOG_DEBUG("Serving %s length=%zu", url, len); - /* serve file directly */ - response = MHD_create_response_from_data(len, data, MHD_YES, MHD_NO); - /* Should we expose mimetype via tcl here or just let the browser - guess? - MHD_add_response_header(response, "Content-Type", "image/png"); - */ - - ret = MHD_queue_response(connection, MHD_HTTP_OK, response); - MHD_destroy_response(response); - - //free(data); - return ret; - } -} - -static int ahc_echo_inner(void * cls, struct MHD_Connection * connection, - const char * url, const char * method, const char * version, - const char * upload_data, size_t * upload_data_size, void ** ptr) -{ - Jim_Interp *interp = (Jim_Interp *)cls; - int post = 0; - - if (0 == strcmp(method, "POST")) - { - post = 1; - } - else if (0 == strcmp(method, "GET")) - { - } - else - { - return MHD_NO; /* unexpected method */ - } - - struct httpd_request *r; - if (*ptr == NULL) - { - /* The first time only the headers are valid, - do not respond in the first round... */ - - *ptr = malloc(sizeof(struct httpd_request)); - if (*ptr == NULL) - return MHD_NO; - memset(*ptr, 0, sizeof(struct httpd_request)); - - r = (struct httpd_request *) *ptr; - r->interp = interp; - r->post = post; - Jim_SetVariableStr(interp, "httppostdata", Jim_NewDictObj(interp, NULL, 0)); - - /* fill in url query strings in dictionary */ - MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND, - record_arg, r); - - if (r->post) - { - r->postprocessor = MHD_create_post_processor(connection, 2048 - * 1024, &iterate_post, r); - } - - return MHD_YES; - } - - r = (struct httpd_request *) *ptr; - - if (r->post) - { - /* consume post data */ - if (*upload_data_size) - { - MHD_post_process(r->postprocessor, upload_data, *upload_data_size); - *upload_data_size = 0; - return MHD_YES; - } - else - { - } - } else - { - } - - /* hand over to request who will be using it. */ - // r->dict = NULL; - - - /* FIX!!!! we need more advanced handling of url's to avoid them - * being subverted to evil purposes - */ - - const char *httpd_dir = PKGDATADIR "/httpd"; - - if (*url=='/') - { - url++; /* skip '/' */ - } - if (!*url) - url="index.tcl"; - - const char *file_name = alloc_printf("%s/%s", httpd_dir, url); - int result = handle_request(interp, connection, file_name); - free((void *)file_name); - return result; -} - - -static int ahc_echo(void * cls, struct MHD_Connection * connection, - const char * url, const char * method, const char * version, - const char * upload_data, size_t * upload_data_size, void ** ptr) -{ - int result; - - openocd_sleep_postlude(); - - result = ahc_echo_inner(cls, connection, url, method, version, upload_data, upload_data_size, ptr); - - openocd_sleep_prelude(); - - return result; -} - -static struct MHD_Daemon * d; - -static const struct command_registration httpd_command_handlers[] = { - { - .name = "formfetch", - .jim_handler = httpd_Jim_Command_formfetch, - .mode = COMMAND_EXEC, - .usage = "parameter_name", - .help = "Reads a posted form value.", - }, - { - .name = "writeform", - .jim_handler = httpd_Jim_Command_writeform, - .mode = COMMAND_EXEC, - .usage = "parameter_name filename", - .help = "Writes a form value to a file.", - }, - COMMAND_REGISTRATION_DONE -}; - -int httpd_start(struct command_context *cmd_ctx) -{ - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutex_init(&mutex, &attr); - - int port = 8888; - LOG_USER("Launching httpd server on port %d", port); - d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, port, NULL, NULL, - &ahc_echo, cmd_ctx->interp, - MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL, /* Closure... what's that??? */ - MHD_OPTION_END); - if (d == NULL) - return ERROR_FAIL; - - return register_commands(cmd_ctx, NULL, httpd_command_handlers); -} - -void httpd_stop(void) -{ - MHD_stop_daemon(d); - pthread_mutex_destroy(&mutex); -} - diff --git a/src/server/httpd.h b/src/server/httpd.h deleted file mode 100644 index 0502deb1d..000000000 --- a/src/server/httpd.h +++ /dev/null @@ -1,28 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 Zachary T Welch * - * * - * 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 * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#ifndef OPENOCD_SERVER_HTTPD_H -#define OPENOCD_SERVER_HTTPD_H - -struct command_context; - -int httpd_start(struct command_context *cmd_ctx); -void httpd_stop(void); - -#endif // OPENOCD_SERVER_HTTPD_H diff --git a/src/server/httpd/Stylizer.class b/src/server/httpd/Stylizer.class deleted file mode 100755 index ffa08ce7e2a2f6cb8382bfcff3dc5c11727c6a2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4493 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 diff --git a/src/server/httpd/Stylizer.java b/src/server/httpd/Stylizer.java deleted file mode 100755 index 721e84cad..000000000 --- a/src/server/httpd/Stylizer.java +++ /dev/null @@ -1,114 +0,0 @@ -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.xpath.XPathAPI; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -/** used to generate .tcl files from */ -public class Stylizer -{ - // Global value so it can be ref'd by the tree-adapter - static Document document; - public static void main(String argv[]) - { - if (argv.length != 3) - { - System.err.println("Usage: java Stylizer stylesheet xmlfile outputdir"); - System.exit(1); - } - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - try - { - System.err.println("Starting conversion..."); - - File stylesheet = new File(argv[0]); - File datafile = new File(argv[1]); - DocumentBuilder builder = factory.newDocumentBuilder(); - document = builder.parse(datafile); - - NodeList list = XPathAPI.selectNodeList(document, "website/language/page"); - - for (int i=0; i - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Browse / Edit Memory

-
- - - - } - - - set form_address [formfetch form_address] - set form_length [formfetch form_length] - set form_type [formfetch form_type] - set form_action [formfetch form_action] - set form_value [formfetch form_value] - - if {[string compare $form_length ""]==0} { - set form_length 0 - } - if {$form_length<=0} { - set form_length 0x80 - } - if {$form_length>0x1000} { - set form_length 0x1000 - } - - if {[string compare $form_type ""]==0} { - set form_type mdw - } - - if {[string compare $form_type "mdw"]==0} { - set wordsize 4 - set modify_cmd mww - } - if {[string compare $form_type "mdh"]==0} { - set wordsize 2 - set modify_cmd mwh - } - if {[string compare $form_type "mdb"]==0} { - set wordsize 1 - set modify_cmd mwb - } - - - - - if {[string compare $form_address ""]!=0} { - if {[string compare $form_action "Previous"]==0} { - # Kludge! Work around problems parsing hex in Jim Tcl expressions - incr form_address ; set form_address [expr $form_address-1] - if {$form_address-$form_length>0} { - set form_address "0x[tohex [expr $form_address-$form_length]]" - } else { - set form_address "0x0" - } - } - if {[string compare $form_action "Next"]==0} { - # Kludge! Work around problems parsing hex in Jim Tcl expressions - incr form_address ; set form_address [expr $form_address-1] - set form_address "0x[tohex [expr $form_address+$form_length]]" - } - if {[string compare $form_action "Modify"]==0} { - append console [capture_catch "$modify_cmd $form_address $form_value"] - } - if {[string compare $form_action "Fill"]==0} { - append console [capture_catch "$modify_cmd $form_address $form_value $form_length"] - } - } - - - -append buffer { - -
- - - - - - - -
Address
Length
Value  
Type - - -
- - - - -
 
 
- - - - - -
  
-
- -
-

-

Memory:

- - } - - if {[string compare $form_address ""]!=0} { - append console [encode [capture_catch halt]] - append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]] - } - -append buffer { - - - - - - -

- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Browse and edit target memory.
- Length is in bytes, maximum 4096 bytes.

-

An error message is shown when trying to browse or edit memory which cases a CPU fault.

-

CPU will be halted if required.

-

Modify - Will modify only one byte, half-word or word starting at Address.

-

Fill - Will fill the specified region with the specified value.

-

Refresh - Display the content of the specified memory area.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/build.sh b/src/server/httpd/build.sh deleted file mode 100755 index 8824debf4..000000000 --- a/src/server/httpd/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -set e -java -classpath ../../../../zy1000/build/xalan.jar\;. Stylizer menu.xsl menu.xml . -find . -regex ".*\.tcl" -type f -exec sh html2tcl.sh {} {} \; -echo "Copy .tcl files to /usr/local/lib/openocd/httpd/" -cp *.tcl /usr/local/lib/openocd/httpd/ \ No newline at end of file diff --git a/src/server/httpd/downloadmem.tcl b/src/server/httpd/downloadmem.tcl deleted file mode 100644 index e6127aeaf..000000000 --- a/src/server/httpd/downloadmem.tcl +++ /dev/null @@ -1,366 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Download Memory Range

-
- } - - set form_address [formfetch form_address] - set form_length [formfetch form_length] - set form_action [formfetch form_action] - -append buffer { -
- - - - -
Address
Length
- - - - - -
 
 
- - - - -
- } - - if {[string compare $form_action "Download"]==0} { - append console [encode [capture_catch "reset init"]] - append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]] - -append buffer { -
- -
- } - - } - - -append buffer { - - - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- - Download memory from target.
- Note that download memory can take - a long time(potentially minutes for megabytes at low JTAG clk speeds). -

- Once the memory is downloaded a link is available on the page to download - the file to your PC. - -

-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/editconfigs.tcl b/src/server/httpd/editconfigs.tcl deleted file mode 100644 index e27bc0535..000000000 --- a/src/server/httpd/editconfigs.tcl +++ /dev/null @@ -1,462 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - -Zylin ZY1000 JTAG debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
-
- - - -
-
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Edit Target Configurations

-
-
- } - - set form_edittext [formfetch form_edittext] - set form_action [formfetch form_action] - set form_filename [formfetch form_filename] - set form_selected [formfetch form_selected] - - if {[string compare $form_action "Load"]==0} { - set form_filename $form_selected - } - - if {[string compare $form_action "Delete"]==0} { - capture_catch "rm /config/settings/$form_selected" - } - - if {[string compare $form_action "Save"]==0} { - save_var $form_filename [from_textarea $form_edittext] - append buffer "Wrote file $form_filename
" - } - - set form_edittext "" - - # load original or script saved on disk. - if {[string compare $form_action "Show default"]==0} { - set form_edittext [load_file "/rom/$form_selected"] - set form_filename $form_selected - } else { - set form_edittext [load_config $form_filename] - } - - set form_edittext_subst [to_textarea $form_edittext] - - - proc prepend { val list } { - set res "" - foreach value $list { - set t $val - append t $value - lappend res $t - } - return $res - } - - set files [prepend target/ [ls /rom/target]] - set files [lunion $files [prepend event/ [ls /config/settings/event]]] - set files [lunion $files [prepend target/ [ls /config/settings/target]]] - set files [lsort $files] - - -append buffer { - - - - - - - - -
   
- - - } - - append buffer {\n" - append buffer {
} "\n" - append buffer {
File 
} "\n" - -append buffer { -
-
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-Quick Start Manual -
-OpenOCD Manual -
-Contact Zylin AS -
-
- -
- - -
-
-
- -

Here you can edit predefined target configurations, restore predefined configurations to - default state and create new target configurations.

-

Typically when creating a new target configuration, you would take an existing - configuration that resembles the most your needs and modify it for your - purposes and save it under a different name.

-

Load - Loads a configuration file into the editor.

-

Show default - Loads the firmware included version of the - configuration file (if any), into the editor.
- Note that the editor content is not saved.

-

Delete - Deletes a custom created configuration file.
- Note that firmware included configuration files can not be deleted.

-

Save - Save the edited file under the a new or the same name.

- -
-   -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/editfile.tcl b/src/server/httpd/editfile.tcl deleted file mode 100644 index 6a393263e..000000000 --- a/src/server/httpd/editfile.tcl +++ /dev/null @@ -1,436 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zylin ZY1000 JTAG debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
-
- - - -
-
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
- -
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- - - -
-
-
-   -
-
-

Edit File

-
-} - - - -#Read a text file, edit it and write it back. Useful for interactive debugging -#of tcl scripts - -set data "" -append buffer {
} "\n" - -set err ""; - -set form_edittext [formfetch form_edittext]; -set form_action [formfetch form_action]; -set form_filename [formfetch form_filename]; - -puts Action $form_action - -if {[string compare $form_action "Load"]==0} { - - set form_edittext "" - catch { - set fp [aio.open $form_filename r]; - set form_edittext [$fp read]; - $fp close; - } err -} -if {[string compare $form_action "Delete"]==0} { - capture "rm $form_filename" -} - -set form_edittext_subst [to_textarea $form_edittext] - - -if {[string compare $form_action "Save"]==0} { - if {[catch { - set fp [aio.open $form_filename w]; - $fp puts [from_textarea $form_edittext] - $fp close - append buffer "Wrote file $form_filename
" - } err]} { - append buffer "Could not write $form_filename
" - } -} - - - - -append buffer {\n" -append buffer {} "\n" -append buffer {
File   
} "\n" -append buffer {
} - -append buffer {
} - -append buffer { } "\n" - - - -append buffer { - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-Quick Start Manual -
-OpenOCD Manual -
-Contact Zylin AS -
-
- -
- - -
-
-
- - Edit any file on the ZY1000 by typing in the - filename and pressing Load. -

- - -
Browse files on /ram
- Browse files on /config
- Browse files on /rom
- -
-   -
-
- - -
- - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/erase.tcl b/src/server/httpd/erase.tcl deleted file mode 100644 index a63ef37b9..000000000 --- a/src/server/httpd/erase.tcl +++ /dev/null @@ -1,387 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
-
-Info -
-
-
-Erase -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Erase Flash

-
- - - - } - - - set form_address [formfetch form_address] - set form_length [formfetch form_length] - set form_action [formfetch form_action] - - if {[string compare $form_length ""]==0} { - set form_length 0x10000 - } - if {[string compare $form_address ""]==0} { - if {[catch {[first_flash_base]} result]==0} { - set form_address "0x[tohex $result]" - } - } - - - if {[string compare $form_address ""]!=0} { - if {[string compare $form_action "Erase"]==0} { - append buffer "" - append console [encode [capture_catch { - reset init - flash erase_address $form_address $form_length}]] - append buffer - } - } - - - -append buffer { - - - - - - -
Address
Length
- - - - -
 
 
- -
- - - - - - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Note that flash programming will erase flash if required.

-

Reset and init CPU, then erase address range.

-

The length field is specified in number of bytes.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/flash.tcl b/src/server/httpd/flash.tcl deleted file mode 100644 index 3ad9772f2..000000000 --- a/src/server/httpd/flash.tcl +++ /dev/null @@ -1,459 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
-
-Info -
-
-
-Erase -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Program / Verify Flash

-
- - } - - - set form_offset [formfetch form_offset] - set form_action [formfetch form_action] - set form_type [formfetch form_type] - - - set post "" - catch {set post $post_data} err - - if {[string compare $form_offset ""]==0} { - set form_offset 0 - } - if {[string compare $form_type ""]==0} { - set form_type "" - } - - -append buffer {} - - - set data "" - append buffer {
} - - set action_reset [expr {[string length $form_action]!=0}] - set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}] - set action_verify [expr {[string compare $form_action "Verify"]==0 || [string compare $form_action "Flash and verify"]==0}] - - if {$action_reset} { - append console [encode [capture_catch "reset init"]] - } - -append buffer { - } - - - append buffer {} - append buffer {} - append buffer "" - - -append buffer { - - - - - -
File
Offset
Type - -
- - - - - -
 
 
- - - - - -
- -

- } - - - if {$action_flash||$action_verify} { - catch {writeform form_filecontent $upload_filename} result - append console [encode $result] - } - append buffer "
" - if {$action_flash} { - append console [encode [capture_catch "halt"]] - append buffer "" - if {[catch {capture_catch {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} { - append buffer "Flash write failed
" - append console [encode $result] - } else { - append buffer [encode $result] - append buffer "Flash write succeed
" - } - append buffer "
" - } - if {$action_verify} { - append console [encode [capture_catch "halt"]] - append buffer "" - if {[catch {capture_catch {eval "verify_image $upload_filename $form_offset $form_type"}} result]} { - append buffer "Verify failed
" - append console [encode $result] - } else { - append buffer [encode $result] - append buffer "Verify succeed
" - } - append buffer "
" - } - -append buffer { - -

- -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Program and/or verify the flash on your target.

-

Flash - Halt CPU, automatically erase flash if required and program flash with image.

-

Flash and verify - Programs the flash and verifies the programmed flash content is correct.

-

Verify - Halt CPU and verify image in flash or RAM.

-

Offset - This value is added to the address of the image.
- Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.
- Typically 0 for elf/ihex and the address to write the image to for binary files.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/flashinfo.tcl b/src/server/httpd/flashinfo.tcl deleted file mode 100644 index 8e9f3e25b..000000000 --- a/src/server/httpd/flashinfo.tcl +++ /dev/null @@ -1,382 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
-
-Info -
-
-
-Erase -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Flash Information

-
- -
Configured flash banks:
-

- - } - - set flash_return [ocd_flash_banks] - if {[llength $flash_return]!=0} { - append buffer [encode [flash banks]] - - set form_action [formfetch form_action] - if {[string compare $form_action "Reset CPU and probe flash"]==0} { - append console [encode [capture_catch "reset init"]] - append buffer [encode [capture_catch "flash probe 0"]] - append buffer [encode [capture_catch "flash info 0"]] - } - } else { - append buffer "No flash bank configured." - } - -append buffer { -

-

- - - } - - foreach a [ocd_flash_banks] { - append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: " - -append buffer { -
- - - - -
-
- } - - } - -append buffer { -
- - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Here you will find information about the flash chips that you have - in your configuration.

-

Reset CPU and probe flash - This will reset the CPU and show - you more detailed information about your flash. This includes information about - the different sectors in the flash, and the flash driver used.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/guiupload.tcl b/src/server/httpd/guiupload.tcl deleted file mode 100644 index 804bfe420..000000000 --- a/src/server/httpd/guiupload.tcl +++ /dev/null @@ -1,336 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Upload File

-
- - } - - set form_filename [formfetch form_filename]; - set form_action [formfetch form_action]; - #set form_filecontent [formfetch form_filecontent]; - - append buffer {
} - append buffer
- if {[string compare $form_action "Upload"]==0} { - if {[catch {writeform form_filecontent $form_filename} result]==0} { - append buffer [encode $result] - } else { - append buffer Wrote $form_filename - } - } - - append buffer {} - append buffer {
Filename on OpenOCD machine
File to upload
} - append buffer {
 
 
} - append buffer {
} - append buffer {
} - - -append buffer { - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
-
-   -
-
- - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/html2tcl.sh b/src/server/httpd/html2tcl.sh deleted file mode 100755 index 3eb5c3939..000000000 --- a/src/server/httpd/html2tcl.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "file2c.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" - -#=============================================================================== -# -# file2c.tcl -# -# Convert a file into a header that can be #included from C. -# -#=============================================================================== -#####ECOSGPLCOPYRIGHTBEGIN#### -## ------------------------------------------- -## This file is part of eCos, the Embedded Configurable Operating System. -## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -## -## eCos is free software; you can redistribute it and/or modify it under -## the terms of the GNU General Public License as published by the Free -## Software Foundation; either version 2 or (at your option) any later version. -## -## eCos is distributed in the hope that it will be useful, but WITHOUT ANY -## WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. -## -## You should have received a copy of the GNU General Public License along -## with eCos; if not, write to the Free Software Foundation, Inc., -## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -## -## As a special exception, if other files instantiate templates or use macros -## or inline functions from this file, or you compile this file and link it -## with other works to produce a work based on this file, this file does not -## by itself cause the resulting work to be covered by the GNU General Public -## License. However the source code for this file must still be made available -## in accordance with section (3) of the GNU General Public License. -## -## This exception does not invalidate any other reasons why a work based on -## this file might be covered by the GNU General Public License. -## -## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. -## at http://sources.redhat.com/ecos/ecos-license/ -## ------------------------------------------- -#####ECOSGPLCOPYRIGHTEND#### -#=============================================================================== -######DESCRIPTIONBEGIN#### -# -# Author(s): jlarmour,bartv -# Contact(s): -# Date: 2001-07-20 -# Purpose: -# Description: -# Usage: file2c.tcl -# -#####DESCRIPTIONEND#### -#=============================================================================== - -if { $argc != 2 } { - puts "Usage: html2tcl.tcl " - exit 1 -} -set infile [lindex $argv 0] -set outfile [lindex $argv 1] - -set infilefd [open $infile "r"] -set data [read $infilefd] -close $infilefd - - - - -if [string match *\.tcl $infile]==0 { - puts "Not .tcl file, skipping $infile" - exit 0 -} - -set outfilefd [ open $outfile "w" ] -if [regexp -start 0 {^\s* $data $pos] - if $start==-1 { - # We're done... - set done 1 - set start [string length $data] - set end $start - } else { - set end [string first $data $start] - if $end==-1 { - # uh-oh, not closed - puts " not closed!" - exit 1 - } - } - #puts "done $done start $start end $end" - # Dump HTML into resulting file. - append result "append buffer {" - append result [string range $data $pos [expr $start-1]] - #puts [string range $data $pos $start] - append result "}\n" - - # Dump TCL into resulting file. - append result "[string range $data [expr $start+5] [expr $end-1]]\n" - - set pos [expr $end+6] -} - -append result "start_chunked \"html\"\n" -append result {write_chunked $buffer} "\n" -append result "end_chunked\n" - -puts $outfilefd $result -close $outfilefd diff --git a/src/server/httpd/httpd.tcl b/src/server/httpd/httpd.tcl deleted file mode 100644 index dfa9e335c..000000000 --- a/src/server/httpd/httpd.tcl +++ /dev/null @@ -1,100 +0,0 @@ -# some dummy proc's to get things going for test purposes - - - -proc ip {} { -return 10.0.0.55 -} - -proc start_chunked {a} { - global httpdata - global httpmime - set httpmime $a - set httpdata "" -} - -proc write_chunked {a} { - global httpdata - append httpdata $a -} - -proc end_chunked {} { -} - - - -#proc formfetch {a} { -# global httppostdata - #catch { -# echo "$a=$httppostdata($a)" - #return $httppostdata($a) - #} -# - #return "" -#} - - - - -proc tohex {a} { - set r "" - while 1 { - - set rem [expr $a%16] - set a [expr $a/16] - set r [string index "0123456789abcdef" $rem]$r - if ($a==0) then break - } - return $r -} - -# encode text -proc encode {a} { - return [string map {\n
{ } { } \t {        } > > < < / /} $a] -} - -#stubs that can be overriden to save between sessions -proc load_var {a} { - global glob_var - catch { - return $glob_var($a) - } - return "" -} -#stubs that can be overriden to save between sessions -proc save_var {a b} { - catch { - set glob_var($a) $b - return "" - } err - set glob_var($a) "" - return "" -} - - - -proc to_textarea {a} { - return [string map {& & > > < < / /} $a] -} - -proc from_textarea {a} { - return [string map {> > < < & & / /} $a] -} - -proc lunion {a b} { - foreach e $a { - set x($e) {} - } - foreach e $b { - if {![info exists x($e)]} { - lappend a $e - } - } - return $a -} - - -proc first_flash_base {} { - set t [lindex 0 [ocd_flash_banks]] - return $t(base) -} diff --git a/src/server/httpd/index.tcl b/src/server/httpd/index.tcl deleted file mode 100644 index 35c5cc79d..000000000 --- a/src/server/httpd/index.tcl +++ /dev/null @@ -1,376 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - -
-
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

OpenOCD debugger

-
- - - - - - -
 
 
- -

Target Status

- - - - - -
- } - - set form_address [formfetch form_address] - set form_action [formfetch form_action] - - if {[string compare $form_action "Halt"]==0} { - append console [encode [capture_catch "halt"]] - } - if {[string compare $form_action "Resume"]==0} { - append console [encode [capture_catch "resume"]] - } - - if {[string compare $form_action "Reset and run"]==0} { - append console [encode [capture_catch "reset run"]] - } - - if {[string compare $form_action "Power on"]==0} { - append console [encode [capture_catch "power on"]] - } - if {[string compare $form_action "Power off"]==0} { - append console [encode [capture_catch "power off"]] - } - -append buffer { - - } -append console [encode [capture_catch poll]] -append buffer { -
- -
- - - - - - -
- -
-
- -

-

-
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Target status shows that status of the connected target.

-

Current target - selected target configuration.
-

Startup - whether or not the target script ran to completion. Note - that even if the target is disconnected, powered down or unresponsive, the - startup script will still run to completion. Startup - OK does not mean - that the target is fully operational, simply that the configuration script - did not contain syntax errors for instance. - See log for details.
-

Target power - Detects power on target.
- If the JTAG cable is not connected, or the target has no power, then no target power will be detected.

-

Type "help power" in telnet for command to control power relay.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/log.tcl b/src/server/httpd/log.tcl deleted file mode 100644 index 703a06d37..000000000 --- a/src/server/httpd/log.tcl +++ /dev/null @@ -1,343 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zylin ZY1000 JTAG debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
-
- - - -
-
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - -
-
- -
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

View Tail of Log

-
- } - - append buffer "" - append buffer [encode [log]] - append buffer {

} - append buffer {Refresh} - append buffer {

} - append buffer ""; - -append buffer { - -

- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-Quick Start Manual -
-OpenOCD Manual -
-Contact Zylin AS -
-
- -
- - -
-
-
-
-   -
-
- - -
- - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/menu.xml b/src/server/httpd/menu.xml deleted file mode 100644 index be1446416..000000000 --- a/src/server/httpd/menu.xml +++ /dev/null @@ -1,973 +0,0 @@ - - - - - - - - index.tcl - Config Target - index.tcl - OpenOCD debugger - index.tcl - - - - - - -   - -   - - -

Target Status

- - - - - -
- - set form_address [formfetch form_address] - set form_action [formfetch form_action] - - if {[string compare $form_action "Halt"]==0} { - append console [encode [capture_catch "halt"]] - } - if {[string compare $form_action "Resume"]==0} { - append console [encode [capture_catch "resume"]] - } - - if {[string compare $form_action "Reset and run"]==0} { - append console [encode [capture_catch "reset run"]] - } - - if {[string compare $form_action "Power on"]==0} { - append console [encode [capture_catch "power on"]] - } - if {[string compare $form_action "Power off"]==0} { - append console [encode [capture_catch "power off"]] - } - - - append console [encode [capture_catch poll]] -
- -
- - - - - - -
- -
-
- -

-

- ]]>
- - Target status shows that status of the connected target.

-

Current target - selected target configuration.
-

Startup - whether or not the target script ran to completion. Note - that even if the target is disconnected, powered down or unresponsive, the - startup script will still run to completion. Startup - OK does not mean - that the target is fully operational, simply that the configuration script - did not contain syntax errors for instance. - See log for details.
-

Target power - Detects power on target.
- If the JTAG cable is not connected, or the target has no power, then no target power will be detected.

-

Type "help power" in telnet for command to control power relay.

- ]]>
-
- -
-
- - - - - - targets.tcl - documentation.tcl - Target config quick start guide - - - The reset init script is crucial. It will set up e.g. MMU, chip - select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls OpenOCD provides. -

- Writing an openocd.cfg from scratch is a non-trivial exercise, but - fortunally it only has to be done once for a target and afterwards it - rarely if ever needs to be changed. - - - ]]> - - - Quick start guide on how to configure a target. - - - - - - - - - - - flashinfo.tcl - Flash - flashinfo.tcl - Flash Information - flashinfo.tcl - - - - - - - - - - - Configured flash banks: -

- - - set flash_return [ocd_flash_banks] - if {[llength $flash_return]!=0} { - append buffer [encode [flash banks]] - - set form_action [formfetch form_action] - if {[string compare $form_action "Reset CPU and probe flash"]==0} { - append console [encode [capture_catch "reset init"]] - append buffer [encode [capture_catch "flash probe 0"]] - append buffer [encode [capture_catch "flash info 0"]] - } - } else { - append buffer "No flash bank configured." - } - -

-

- - - - foreach a [ocd_flash_banks] { - append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: " - -
- "> - "> - - -
-
- - } - -
- - - ]]>
- - Here you will find information about the flash chips that you have - in your configuration.

-

Reset CPU and probe flash - This will reset the CPU and show - you more detailed information about your flash. This includes information about - the different sectors in the flash, and the flash driver used.

- ]]> -
- -
-
- - - flash.tcl - flashinfo.tcl - Program / Verify Flash - - - - set form_offset [formfetch form_offset] - set form_action [formfetch form_action] - set form_type [formfetch form_type] - - - set post "" - catch {set post $post_data} err - - if {[string compare $form_offset ""]==0} { - set form_offset 0 - } - if {[string compare $form_type ""]==0} { - set form_type "" - } - -
- - set data "" - append buffer {
} - - set action_reset [expr {[string length $form_action]!=0}] - set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}] - set action_verify [expr {[string compare $form_action "Verify"]==0 || [string compare $form_action "Flash and verify"]==0}] - - if {$action_reset} { - append console [encode [capture_catch "reset init"]] - } - - - - append buffer {} - append buffer {} - append buffer "" - - - - - - - -
File
Offset
Type - -
- - - - - -
 
 
- - - - - -
- -

- - - if {$action_flash||$action_verify} { - catch {writeform form_filecontent $upload_filename} result - append console [encode $result] - } - append buffer "
" - if {$action_flash} { - append console [encode [capture_catch "halt"]] - append buffer "" - if {[catch {capture_catch {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} { - append buffer "Flash write failed
" - append console [encode $result] - } else { - append buffer [encode $result] - append buffer "Flash write succeed
" - } - append buffer "
" - } - if {$action_verify} { - append console [encode [capture_catch "halt"]] - append buffer "" - if {[catch {capture_catch {eval "verify_image $upload_filename $form_offset $form_type"}} result]} { - append buffer "Verify failed
" - append console [encode $result] - } else { - append buffer [encode $result] - append buffer "Verify succeed
" - } - append buffer "
" - } -
- -

- - ]]> - - - Program and/or verify the flash on your target.

-

Flash - Halt CPU, automatically erase flash if required and program flash with image.

-

Flash and verify - Programs the flash and verifies the programmed flash content is correct.

-

Verify - Halt CPU and verify image in flash or RAM.

-

Offset - This value is added to the address of the image.
- Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.
- Typically 0 for elf/ihex and the address to write the image to for binary files.

- ]]> -
- - - - - - - - - - - production.tcl - flashinfo.tcl - Production - - - set form_action [formfetch form_action] - set form_serialnumber [formfetch form_serialnumber] - append buffer [production_info] -
- -
- - - if {[string compare $form_action "Upload firmware"]==0} { - set wrotedata [catch {writeform form_filecontent $upload_filename} result] - append buffer [encode $result] - if {$wrotedata==0} { - append buffer "
Running production procedure

" - append buffer "
Reset and init:
" - - append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]] - } - } - if {[string compare $form_action "Test"]==0} { - append buffer "
Running production test. Output from first 10 seconds printed below.

" - - append console [encode [capture_catch {catch production_test}]] - } - if {[string compare $form_action "Power on"]==0} { - append console [encode [capture_catch "power on"]] - } - if {[string compare $form_action "Power off"]==0} { - append console [encode [capture_catch "power off"]] - } - - - - append buffer {

Firmware file(raw binary)

} - append buffer {

Serial number

} - - - - - - -
 
 
- - - - - -
    -
-

- - ]]> - - - Upload firmware - Power cycle target, reset target and program raw binary file to flash bank 0, offset 0 and verify flash programming. Leave target powered on.

-

Test - Power up target, run 10 second target test. Output is provided via the DCC output channel.

-

Power on - Power on target.

-

Power off - Power off target.

-

Serial number - A target script can use this string in the production procedure. Type "help production" for more info.

- ]]> -
- - - - - - - - - - erase.tcl - erase.tcl - Erase Flash - flashinfo.tcl - - - - set form_address [formfetch form_address] - set form_length [formfetch form_length] - set form_action [formfetch form_action] - - if {[string compare $form_length ""]==0} { - set form_length 0x10000 - } - if {[string compare $form_address ""]==0} { - if {[catch {[first_flash_base]} result]==0} { - set form_address "0x[tohex $result]" - } - } - - - if {[string compare $form_address ""]!=0} { - if {[string compare $form_action "Erase"]==0} { - append buffer "" - append console [encode [capture_catch { - reset init - flash erase_address $form_address $form_length}]] - append buffer - } - } - - - - -
- - - - -
Address
Length
- - - - -
 
 
- -
- - -
- - - - ]]>
- - Note that flash programming will erase flash if required.

-

Reset and init CPU, then erase address range.

-

The length field is specified in number of bytes.

- ]]> -
- -
-
- - - - run.tcl - run.tcl - Run program - flashinfo.tcl - - - -set form_address [formfetch form_address] -set form_action [formfetch form_action] - -if {[string compare $form_action "Run from address"]==0} { - append console [encode [capture_catch "halt"]] - append console [encode [capture_catch "wait_halt"]] - append console [encode [capture_catch "resume $form_address"]] -} - -if {[string compare $form_action "Halt"]==0} { - append console [encode [capture_catch "halt"]] - append console [encode [capture_catch "wait_halt"]] -} - -if {[string compare $form_action "Reset and run"]==0} { - append console [encode [capture_catch "reset run"]] -} - -if {[string compare $form_action "Reset and init"]==0} { - append console [encode [capture_catch "reset init"]] -} - -append console [encode [capture_catch poll]] - - - -
- - - -
Address
- - - - -
 
 
- -
-
- - - - ]]>
- - Reset and run - reset CPU and let it run.

-

Halt - halt CPU.

-

Run from address - halt CPU and resume from address. Default is resume from current address.

-

Reset and init - reset CPU and run init script.

- ]]> -
- -
-
- - - - browsemem.tcl - Memory - browsemem.tcl - Browse / Edit Memory - browsemem.tcl - - - - - - - - - - - set form_address [formfetch form_address] - set form_length [formfetch form_length] - set form_type [formfetch form_type] - set form_action [formfetch form_action] - set form_value [formfetch form_value] - - if {[string compare $form_length ""]==0} { - set form_length 0 - } - if {$form_length<=0} { - set form_length 0x80 - } - if {$form_length>0x1000} { - set form_length 0x1000 - } - - if {[string compare $form_type ""]==0} { - set form_type mdw - } - - if {[string compare $form_type "mdw"]==0} { - set wordsize 4 - set modify_cmd mww - } - if {[string compare $form_type "mdh"]==0} { - set wordsize 2 - set modify_cmd mwh - } - if {[string compare $form_type "mdb"]==0} { - set wordsize 1 - set modify_cmd mwb - } - - - - - if {[string compare $form_address ""]!=0} { - if {[string compare $form_action "Previous"]==0} { - # Kludge! Work around problems parsing hex in Jim Tcl expressions - incr form_address ; set form_address [expr $form_address-1] - if {$form_address-$form_length>0} { - set form_address "0x[tohex [expr $form_address-$form_length]]" - } else { - set form_address "0x0" - } - } - if {[string compare $form_action "Next"]==0} { - # Kludge! Work around problems parsing hex in Jim Tcl expressions - incr form_address ; set form_address [expr $form_address-1] - set form_address "0x[tohex [expr $form_address+$form_length]]" - } - if {[string compare $form_action "Modify"]==0} { - append console [capture_catch "$modify_cmd $form_address $form_value"] - } - if {[string compare $form_action "Fill"]==0} { - append console [capture_catch "$modify_cmd $form_address $form_value $form_length"] - } - } - - - - -
- - - - - - - -
Address
Length">
Value  
Type - - -
- - - - -
 
 
- - - - - -
  
-
- -
-

-

Memory:

- - - if {[string compare $form_address ""]!=0} { - append console [encode [capture_catch halt]] - append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]] - } - - - - - - - - ]]> - - Browse and edit target memory.
- Length is in bytes, maximum 4096 bytes.

-

An error message is shown when trying to browse or edit memory which cases a CPU fault.

-

CPU will be halted if required.

-

Modify - Will modify only one byte, half-word or word starting at Address.

-

Fill - Will fill the specified region with the specified value.

-

Refresh - Display the content of the specified memory area.

- ]]> - - -
-
- - - - - - downloadmem.tcl - browsemem.tcl - Download Memory Range - - - set form_address [formfetch form_address] - set form_length [formfetch form_length] - set form_action [formfetch form_action] - -
- - - - -
Address
Length
- - - - - -
 
 
- - - - -
- - if {[string compare $form_action "Download"]==0} { - append console [encode [capture_catch "reset init"]] - append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]] - -
- -
- - } - - - - - - ]]>
- - - Note that download memory can take - a long time(potentially minutes for megabytes at low JTAG clk speeds). -

- Once the memory is downloaded a link is available on the page to download - the file to your PC. - ]]> - - - - - - - - - openocd.tcl - OpenOCD - openocd.tcl - Run Command - openocd.tcl - - - - - - - - - set form_command [formfetch form_command] - - set form_edittext "" - if {[string length $form_command]>0} { - set form_edittext [capture_catch {eval $form_command}] - } - - append buffer {

} "\n" - append buffer {Command
} - append buffer {
} - append buffer {
} - append buffer {
} - - append buffer {
} "\n" - - - - ]]> - - - Run tcl statement(s). Add "ocd_" prefix to OpenOCD commands otherwise - there will be no output, e.g. "reset init" use "ocd_reset init". -

-

Click here to download log.

-

To download log you can also use commands like "wget http://append buffer [ip]/ram/log", or - point your web browser to said address.

-

- You can also execute tcl commands using curl from your developer PC: -

- - curl --form form_command=ocd_version append buffer [ip]runtcl.tcl - - - ]]> -
-
-
- - - - - guiupload.tcl - openocd.tcl - Upload File - - - set form_filename [formfetch form_filename]; - set form_action [formfetch form_action]; - #set form_filecontent [formfetch form_filecontent]; - - append buffer {
} - append buffer
- if {[string compare $form_action "Upload"]==0} { - if {[catch {writeform form_filecontent $form_filename} result]==0} { - append buffer [encode $result] - } else { - append buffer Wrote $form_filename - } - } - - append buffer {} - append buffer {
Filename on OpenOCD machine
File to upload
} - append buffer {
 
 
} - append buffer {
} - append buffer {
} - - - - ]]>
-
- -
- - - - - targets.tcl - documentation.tcl - Target config quick start guide - - - The reset init script is crucial. It will set up e.g. MMU, chip - select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls OpenOCD provides. -

- Writing an openocd.cfg from scratch is a non-trivial exercise, but - fortunally it only has to be done once for a target and afterwards it - rarely if ever needs to be changed. - - - ]]> - - - Quick start guide on how to configure a target. - - - - - - - - - - - - index.tcl - index.tcl - terminal.tcl - UART forwarding - - - set form_baudrate [formfetch form_baudrate] - if {[string length $form_baudrate]==0} { - set form_baudrate [ocd_uart] - set form_baudrate [string range $form_baudrate 0 [expr [string length $form_baudrate]-2]] - } - set form_action [formfetch form_action] - -

- Target baudrate: - - -

- -

- - if {[string compare $form_action "Set baudrate"]==0} { - append console [encode [ocd_uart $form_baudrate]] - } - - -

Simple UART

- This terminal window is purely for illustrative purposes. Use telnet or a terminal program - to talk to the target over TCP/IP for anything but trivial case of reading/writing a few - lines of texts in simple tests. -

- ]]> - - telnet append buffer [ip] 5555 - or connect via TCP/IP from e.g. HyperTerminal. -

- Type "help uart" in telnet for information on how to set uart speed for target. Normally - the uart speed is set from the target configuration script by adding an "uart N", where - N is the baudrate. - ]]> - - - - - - - - - - diff --git a/src/server/httpd/menu.xsl b/src/server/httpd/menu.xsl deleted file mode 100644 index b54f16c78..000000000 --- a/src/server/httpd/menu.xsl +++ /dev/null @@ -1,298 +0,0 @@ - -]> - - - - - - - - - - - - - - OpenOCD debugger - - - - - - - - set console "" - set upload_filename /ram/upload - - - -

- -
-
- append buffer [capture version] -
-
-
- - - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - -
- - - width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat; - - - width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat; - - - -
- -
- -
- -
-
- - - - - - - - - - - - - - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - - - - - - } - - - - -
- - - - - - - - -
- - - width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat; - - - width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat; - - - -
-
-
-   -
-
-

-
- -
- - - - if {$show_details==1} { - append buffer - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer ]]> - } else { - append buffer - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer ]]> - } - - - ?toggle_details=1 - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } -
-
- - if {$show_details==1} { - append buffer $console - } - - /td]]> - - if {$show_details!=1} { - append buffer {} - } - - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
- OpenOCD Manual
-
- - - - -
-
- - - - - - - - -
-   -
- -
- - - - - diff --git a/src/server/httpd/menu_cuts/center_bottom.png b/src/server/httpd/menu_cuts/center_bottom.png deleted file mode 100644 index cfa583959033059f57619b2e4cea4abcece7c471..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmeAS@N?(olHy`uVBq!ia0y~yU=n9wV36ZrV_;yI?`gA=fq_A?#5JNMI6tkVJh3R1 z!7(L2DOJHUH!(dmC^a#qvhZZ84Fdzibx#+^kcwMxZf)c|lpxZ2(M9Ii))*&&IR|am ztcg*YaP8VD-Ze}@`2vn_7Onp*vqQjX)&5@|m-;R;Fo;B2Fflm9Ffcq~Vh|9AQ4Kp7 zKs*q2gq1--kAVS76*7W(g^Uax+zbp53Z(o0D>Xfa2Cwi!Muw1AM_CyHUS8>YD8tae zG(G3(SyqOC)Y-g`m>5=UIL~*vbq51OongxEoX@*9mZ&itn7%7#?%ezNUEB-_efui^ m?Xaw6vP}Dao?VWKhvCqEaYJUFoNo*a3=E#GelF{r5}E)YMr3sW diff --git a/src/server/httpd/menu_cuts/center_top.png b/src/server/httpd/menu_cuts/center_top.png deleted file mode 100644 index 6e5a2130ae303475323fafa3790cd9799479d4e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 307 zcmeAS@N?(olHy`uVBq!ia0y~yU=n9wV36ZrV_;yI?`gA=fq_A?#5JNMI6tkVJh3R1 z!7(L2DOJHUH!(dmC^a#qvhZZ84FdziRZkbkkcwMxZf)c|6d=(W_}J=Y>>*YbMdyee zEt5G`$|(14YkDBp^g_33h8IV@@*L*vl}}gO$*r$E%Ea(sdwSW)b&>Pu9^2gM7Q?_` z%o}Nb?AY;3dl?vv*KR7__S^1D5hFv0MM`xcBSXlo6n7A{Gj;6_1_rI%+7~PgT5I>l zFfdGg_lSvM#TNl_1_#Z0JqCtCMurY<28S3181;w=%zMPdARx}ru!8|c9bpCYj<7N) k=rJ%rsD}NY#1a^;#Tp5obbg<~z`(%Z>FVdQ&MBb@0PzcB{r~^~ diff --git a/src/server/httpd/menu_cuts/h_tab1.png b/src/server/httpd/menu_cuts/h_tab1.png deleted file mode 100644 index b6983bf8183ac1e4f307f57d160233811ee4ee2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 364 zcmeAS@N?(olHy`uVBq!ia0y~yU`SzLV36ftV_;y2Ie#*ifq_A?#5JNMI6tkVJh3R1 z!7(L2DOJHUH!(dmC^a#qvhZZ84FdxspQnpsNX4x;v-W2l3XpN@_0^5_Qk&~iINj-` zvd1;9N8CRW_BB3;`Nh+eA5ic~@YDBScZ=9tUnpGp(^mXIM{>V&o|DIuIj>DFOnv{! zneT}~O!M!RPaWl+`n@~6m3vW}g53eHzMCK7e@=ZZ@FHu%%sHpizg2Ox-Z?dYnF9CB zO@Z1qr+uHl+4;eCFkHj*ZHzkMnG6+GEfx>&L{ya8bc| W-J$P4GZ`2d7(8A5T-G@yGywqA;+-}C diff --git a/src/server/httpd/menu_cuts/h_tab1_selected.png b/src/server/httpd/menu_cuts/h_tab1_selected.png deleted file mode 100644 index 0485a2b294c15a77c62ccd15f96beb7236961912..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmeAS@N?(olHy`uVBq!ia0y~yU`SzLV36ftV_;y2Ie#*ifq_A?#5JNMI6tkVJh3R1 z!7(L2DOJHUH!(dmC^a#qvhZZ84Fdzi4Nn)xkcwMxu5ILMN)Ty#Xd*Btiuw8iQ;wE( zju~9Hc5xiE&Jfzw`D~fq;-%O0)ZSPZatK8?eUZN>zVGSrmp0vjmrWM;9lI5EJEJ)F zVg8qD{=DxIyb@B9~{iQ#7mt5nEI<>Y+ z`|IrMxf9lg70y4n>dph!NjrpiZ{O2N`ak*9j^hu`o;l>el_%)a+NiVB*0< zP2&liN;}xPg)3ZmFdE>_xkJ85kHCJYD@<);T3K0RS5l Bc>DkW diff --git a/src/server/httpd/menu_cuts/h_tab2.png b/src/server/httpd/menu_cuts/h_tab2.png deleted file mode 100644 index c0fb6dfb2d5a34bc22bb27cc44df4015aa188aab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 349 zcmeAS@N?(olHy`uVBq!ia0y~yU`SzLV36ftV_;y2Ie#*ifq_A?#5JNMI6tkVJh3R1 z!7(L2DOJHUH!(dmC^a#qvhZZ84Fdzie@_?3kcwMxW?FL{au9KytdW_^8h!AP8wbZa z#RS!ir%EibE$vItT2;b zryMdhWtToWs4nqzfy~t2O}&dwi17b(Rh*Q_sxwtjwr=WNqiItf|2@1wA$ie8_hbGW zWZ$o!YoFH%Y<7C}Xe|L@$u%V@@; z_@Qfp&gqOsFuP$wy+BgWLe>@rCjqAS1%e3->%_wYm%dP&$iTqB;OXk;vd$@?2>>*q BhWP*h diff --git a/src/server/httpd/menu_cuts/h_tab2_selected.png b/src/server/httpd/menu_cuts/h_tab2_selected.png deleted file mode 100644 index 4a26124d2c03d34e0314372e23792d6ee030e3cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 330 zcmeAS@N?(olHy`uVBq!ia0y~yU`SzLV36ftV_;y2Ie#*ifq_A?#5JNMI6tkVJh3R1 z!7(L2DOJHUH!(dmC^a#qvhZZ84Fdzi8&4O*vo4`A2WOIMH#D^H||E zi~su+t2SQWcyzKT-!9GFH=O_8Tlh?D_^gi-n6A z7#Q6=T^vI)?!BG0(d%%4gqwfVi&t7DqE+=VEDIkPi_BrN`YFIRw}$Dnn4fNn&@Y}Q zg;H;>qiY|$3egaWQR?_Ijr-C)>zZ_)lSOW5$uYL*cn7mtK z%DFdn=}VTaTi>uT#`Wo~nZ8E;3*N`7Abb2Am2uIkoNJyZ=kd zfi&r1xYbn8eEf~iLV3QXoeT^N44$rjF6*2U FngC4}ugd@c diff --git a/src/server/httpd/menu_cuts/logo_bottom.png b/src/server/httpd/menu_cuts/logo_bottom.png deleted file mode 100644 index 8e0bf3e5c1088d7155af667e4550096178df8a65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 960 zcmeAS@N?(olHy`uVBq!ia0y~yVCZ3BU{K~@V_;x#>w3h>z`!6`;u=vBoS#-wo>-L1 z;Fyx1l&avFo0y&&l$w}QS$HzlhJk@O$EP3%jS)J*wT~4O3=MSH+KwLBAR!^fd^pL_V9lystBXH=tXNZAsgR?nBl=B6C#`(S zj-NPUy<@${EgJ`De zo1lwKTRwKZ4QZj@n@i@#LvfzKQ#9newxkp zY+a+7Kda&`*X4_Z-X2vwfBj|uvKRBFd#Ktq+N%VrxE+a95DJZzbo1&BUA3R7ufChN z!8kwKYuB{|ruL;_)lU+XZfHC+-(C8`7T*v>QoW9W4@Aa zi)xUQ)10Y?WO|cR1+ykUx~BA7=uUKu(y5zb`|B=B7-$BayQWpAw9}NuO{~PQFv_K& z!0>nMfn7(kR1ZG4eZ?*QJ4xte8B4_R!O$Ffe$!`njxgN@xNAz)H8% diff --git a/src/server/httpd/menu_cuts/logo_top.png b/src/server/httpd/menu_cuts/logo_top.png deleted file mode 100644 index 6c3a6db25646e70aca6f36c9c5d57928acc0cf59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3082 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 diff --git a/src/server/httpd/menu_cuts/right_top_small.png b/src/server/httpd/menu_cuts/right_top_small.png deleted file mode 100644 index 095ddf87d8ed2a23b5322124616ec2f31eaab7ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265 zcmeAS@N?(olHy`uVBq!ia0y~yVED?wz`(`9#=yXkQ!25Nfq{XsILO_JVcj{ImkbOH zY)RhkE)4%caKYZ?lNlHoI14-?iy0WWg+Z8+Vb&Z81_lQ95>H=O_8ZJX+y+|h3lBbG zU|{IcEnIoy zAm9Ji!*0y;6L-&e&Oa$?1B3noCi4gPrf>RV|Eeb{>l(Ag_oY|vKRmV9WZZ?dZv$_%#S+tl$R$iOS50Mz$8m^dUK%n&NsbLr&2$&y1U7*<=t4d Rg@J*A!PC{xWt~$(6953aV@Lo1 diff --git a/src/server/httpd/menu_cuts/top_right.png b/src/server/httpd/menu_cuts/top_right.png deleted file mode 100644 index d1ed656b6c035c51678634005f75515443a56db8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmeAS@N?(olHy`uVBq!ia0y~yU=(9uV36WqV_;w?`cd4#z`(#*9OUlAuH%~e- zFfcsuba4!+xb^m?p;w9{gX_g;c}GcM-m_`^@9Oo{jFPWN-MFC~C49rFyQ#@u@EoUh z&B3KBq>9g-W(eCdgF!&dA%Y>15hv9!UwWFlF@tth+$wi#2JK(lL!zx2v~THMoh#cQ zdRO=AvRgNqA`Y&*rIXwf8GD;K;^0?_WWCVj9^cYr;Rn)r-*jKT*kH1^#x_3Wu-gIg zv#w3h>z`!6`;u=vBoS#-wo>-L1 z;Fyx1l&avFo0y&&l$w}QS$HzlhJk_MvZsq*Fx%FxoBaBD`k$HGawjj#y!1k0 z<*KY(>({+L{>W0hOG*Eu@Pttnm9Hj#mWfx*+&&t;ucLK6VP_j!*1 diff --git a/src/server/httpd/menu_cuts/v_2_tile.png b/src/server/httpd/menu_cuts/v_2_tile.png deleted file mode 100644 index 3f3645370d06cef5c5c2ea4ece04a1536a6238d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmeAS@N?(olHy`uVBq!ia0y~yVCZ3BU|{87V_;yIUeBV(z`!6`;u=vBoS#-wo>-L1 z;Fyx1l&avFo0y&&l$w}QS$HzlhJk^>+tbA{q~g|_OWs@!20X5Tm!-bjm#+M2UdDco z<$mJ<>2~kXQuz;~BENJ`Bz`(%Z>FVdQ&MBb@0IkA0Hvj+t diff --git a/src/server/httpd/menu_cuts/v_3.png b/src/server/httpd/menu_cuts/v_3.png deleted file mode 100644 index cf8fa37bff864c19e64635931af015371b2789f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2289 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 diff --git a/src/server/httpd/menu_cuts/v_tab.png b/src/server/httpd/menu_cuts/v_tab.png deleted file mode 100644 index ad39319e97c1964265ac353bd72c9348f60e8b15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 390 zcmeAS@N?(olHy`uVBq!ia0y~yVCZ3BU{K~@V_;x#>w3h>z`!6`;u=vBoS#-wo>-L1 z;Fyx1l&avFo0y&&l$w}QS$HzlhJk@m!_&nvq~g|_IfhwGjuLLMrOalN+=4oHHfS7E zW_j&!g4L#LZu`a!o>P@Odc`jUoi^FDd-Lv}YHNCRPX6g_-NVk$#@*e2d{b~n$h6eO zZOdd%cGgV#`^tESao3`bPd53hnl(;uns(jt`|5LVRXiV=_$JRyo-2RL^!`KUnWxjA zwPderuAG{0lqU5o{nM_X2l19uCO_B!8 z5lt^atd|DN5$mrqurR}*g8>49g}3uQJHwN}`E0i20iiREAfgXMgw315w3h>z`!6`;u=vBoS#-wo>-L1 z;Fyx1l&avFo0y&&l$w}QS$HzlhJk^R-P6S}q~g|_JBD7&fg-IBRoJczY~a1Y#+0X| zz`^)k&_gSH!Xeismsof3c&5(2b@O(aX`2179k7;*I&aP-* zeWEr+c4x27E#p7M%WTtKCpbUxvwdOoa!MRnWb}rV{;I*(IK6y4Lt_NrV5+Cm}NPn9b#xN$F{ZP$HM#)4wkn;Cg4sJ8dO&3hNU+pPBai>*)apJj&>Y)msBmYWOhOuY0YQDMU zSscdQRyO0^%>RcKRDBly$$gbrva>vPTH - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Run Command

-
- - } - - set form_command [formfetch form_command] - - set form_edittext "" - if {[string length $form_command]>0} { - set form_edittext [capture_catch {eval $form_command}] - } - - append buffer {
} "\n" - append buffer {Command
} - append buffer {
} - append buffer {
} - append buffer {
} - - append buffer {
} "\n" - - -append buffer { - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Run tcl statement(s). Add "ocd_" prefix to OpenOCD commands otherwise - there will be no output, e.g. "reset init" use "ocd_reset init". -

-

Click here to download log.

-

To download log you can also use commands like "wget http://} -append buffer [ip] -append buffer {/ram/log", or - point your web browser to said address.

-

- You can also execute tcl commands using curl from your developer PC: -

- - curl --form form_command=ocd_version } -append buffer [ip] -append buffer {runtcl.tcl - - - -
-   -
-
- - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/preconfig.tcl b/src/server/httpd/preconfig.tcl deleted file mode 100644 index 8308deb41..000000000 --- a/src/server/httpd/preconfig.tcl +++ /dev/null @@ -1,429 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - -Zylin ZY1000 JTAG debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
-
- - - -
-
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Select Preconfigured Target

-
- - } - - - set form_target [formfetch form_target] - set form_action [formfetch form_action] - - append buffer {
} - if {[string compare $form_action "Select and reload"]==0} { - capture_catch "trunc /config/settings/openocd.cfg" - capture_catch "append_file /config/settings/openocd.cfg script target/$form_target" - reboot - } - - set form_target [load_target] - - set files [ls /rom/target] - set files [lunion $files [ls /config/settings/target]] - set files [lsort $files] - - if {[string compare $form_action "Select and reload"]!=0} { - -append buffer { - - - - -
- -   - - -      - Edit target configuration -
- } - - } else { - append buffer "Reloading setting(ca. 30 seconds)..." - } - -append buffer { - -
- -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-Quick Start Manual -
-OpenOCD Manual -
-Contact Zylin AS -
-
- -
- - -
-
-
- -

ZY1000 comes with complete configurations for various targets.

-

These predefined configurations include reset init scripts and flash configuration.

-

Select and reload - Select configuration and reboot ZY1000 unit.

- -
-   -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/production.tcl b/src/server/httpd/production.tcl deleted file mode 100644 index 7c5ba6357..000000000 --- a/src/server/httpd/production.tcl +++ /dev/null @@ -1,392 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
-
-Info -
-
-
-Erase -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Production

-
- } - - set form_action [formfetch form_action] - set form_serialnumber [formfetch form_serialnumber] - append buffer [production_info] - -append buffer { - -
- - } - - if {[string compare $form_action "Upload firmware"]==0} { - set wrotedata [catch {writeform form_filecontent $upload_filename} result] - append buffer [encode $result] - if {$wrotedata==0} { - append buffer "
Running production procedure

" - append buffer "
Reset and init:
" - - append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]] - } - } - if {[string compare $form_action "Test"]==0} { - append buffer "
Running production test. Output from first 10 seconds printed below.

" - - append console [encode [capture_catch {catch production_test}]] - } - if {[string compare $form_action "Power on"]==0} { - append console [encode [capture_catch "power on"]] - } - if {[string compare $form_action "Power off"]==0} { - append console [encode [capture_catch "power off"]] - } - -append buffer { - - } - - append buffer {

Firmware file(raw binary)

} - append buffer {

Serial number

} - -append buffer { - - - - - -
 
 
- - - - - -
    -
-

- -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- - The target script can implement the "production", "production_info" and "production_test" tcl proc's. These procedures - are used on this page. There are default implementations that do nothing. - -

Upload firmware - Power cycle target, reset target and program raw binary file to flash bank 0, offset 0 and verify flash programming. Leave target powered on.

-

Test - Power up target, run 10 second target test. Output is provided via the DCC output channel.

-

Power on - Power on target.

-

Power off - Power off target.

-

Serial number - A target script can use this string in the production procedure. Type "help production" for more info.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/readme.txt b/src/server/httpd/readme.txt deleted file mode 100644 index 7bc80e66b..000000000 --- a/src/server/httpd/readme.txt +++ /dev/null @@ -1,24 +0,0 @@ -work in progress... stay tuned.... - - -1. To build .tcl pages. This will convert menu.xml and menu.xsl into -lots of .html pages w/embedded tcl, which are then inverted into -tcl with embedded html. - -sh build.sh - -xalan.jar can be gotten from apache.org. - - -2. libmicrohttpd is a bit tricky to build under Cygwin: - -https://gnunet.org/mantis/view.php?id=1440 - -3. To test: - -../openocd/configure --enable-httpd --enable-dummy --enable-ioutil -make -make install -openocd -f httpd/httpd.tcl -c "interface dummy" -f target/at91eb40a.cfg - -4. Point browser to: http://localhost:8888 diff --git a/src/server/httpd/reload.tcl b/src/server/httpd/reload.tcl deleted file mode 100644 index 5d68ce325..000000000 --- a/src/server/httpd/reload.tcl +++ /dev/null @@ -1,322 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - -
-
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Reload Config Scripts

-
- - } - - set form_action [formfetch form_action] - - if {[string compare $form_action "Reload"]==0} { - append buffer "Reloading Config Scripts...

" - reboot - } - -append buffer { -

- -
- -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- Restart ZY1000 to reload selected target config script. -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/run.tcl b/src/server/httpd/run.tcl deleted file mode 100644 index 689b1608e..000000000 --- a/src/server/httpd/run.tcl +++ /dev/null @@ -1,382 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - -
-
-
-Info -
-
-
-Erase -
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Run program

-
- - - -} - - -set form_address [formfetch form_address] -set form_action [formfetch form_action] - -if {[string compare $form_action "Run from address"]==0} { - append console [encode [capture_catch "halt"]] - append console [encode [capture_catch "wait_halt"]] - append console [encode [capture_catch "resume $form_address"]] -} - -if {[string compare $form_action "Halt"]==0} { - append console [encode [capture_catch "halt"]] - append console [encode [capture_catch "wait_halt"]] -} - -if {[string compare $form_action "Reset and run"]==0} { - append console [encode [capture_catch "reset run"]] -} - -if {[string compare $form_action "Reset and init"]==0} { - append console [encode [capture_catch "reset init"]] -} - -append console [encode [capture_catch poll]] - - -append buffer { - -
- - - -
Address
- - - - -
 
 
- -
-
- - - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- -

Reset and run - reset CPU and let it run.

-

Halt - halt CPU.

-

Run from address - halt CPU and resume from address. Default is resume from current address.

-

Reset and init - reset CPU and run init script.

- -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/support.tcl b/src/server/httpd/support.tcl deleted file mode 100644 index 31502197a..000000000 --- a/src/server/httpd/support.tcl +++ /dev/null @@ -1,431 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zylin ZY1000 JTAG debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
-
- - - -
-
-
-} -append buffer [capture zy1000_version] -append buffer { -
-
-
- - - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
- -
- -
- -
-
-
-
-
- - - - - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- - - -
-
-
-   -
-
-

Submit Support Request

-
- Before contacting Zylin, please submit a support request with relevant information. - } - - - set form_config [load_config "target/[load_target]"] - set support_id [string range [rand] 0 7] - set form_log "" - append form_log "Version: [capture "zy1000_version zy1000"]" - append form_log "OpenOCD version: [capture "zy1000_version openocd"]" - append form_log "Version date: [capture "zy1000_version date"]" - append form_log [log] - -append buffer { - -
- - - - - - - - - - -
Support ID} -append buffer $support_id -append buffer {
Contact person
Phone
email
MAC address
-

- Summary: -

- -

- Description: -

- - -

- Log:

- -

- Config:

- -

-

-

-

- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('/rom/menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-Quick Start Manual -
-OpenOCD Manual -
-Contact Zylin AS -
-
- -
- - -
-
-
- - Before contacting Zylin with questions, please fill in and submit this form - and allow us time to review the information and answer by email if possible. -

- Note that you can see precisely what information is submitted to Zylin in the - form: the log and your config files. - -

-   -
-
- - - - Zylin AS, Auglendsdalen 78, N-4017 Stavanger, Norway - www.zylin.com -
- - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/targets.tcl b/src/server/httpd/targets.tcl deleted file mode 100644 index 4a12dde54..000000000 --- a/src/server/httpd/targets.tcl +++ /dev/null @@ -1,560 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - -
-
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Target config quick start guide

-
- - A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either OpenOCD ships with an - openocd.cfg file for your target or you need to take an existing - config file and modify it for your needs. -

- The reset init script is crucial. It will set up e.g. MMU, chip - select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls OpenOCD provides. -

- Writing an openocd.cfg from scratch is a non-trivial exercise, but - fortunally it only has to be done once for a target and afterwards it - rarely if ever needs to be changed. - - -

- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- - Quick start guide on how to configure a target. -
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - -
-
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

Target config quick start guide

-
- - A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either OpenOCD ships with an - openocd.cfg file for your target or you need to take an existing - config file and modify it for your needs. -

- The reset init script is crucial. It will set up e.g. MMU, chip - select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls OpenOCD provides. -

- Writing an openocd.cfg from scratch is a non-trivial exercise, but - fortunally it only has to be done once for a target and afterwards it - rarely if ever needs to be changed. - - -

- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- - Quick start guide on how to configure a target. -
-   -
-
- - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/terminal.tcl b/src/server/httpd/terminal.tcl deleted file mode 100644 index c6cc05f62..000000000 --- a/src/server/httpd/terminal.tcl +++ /dev/null @@ -1,364 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -OpenOCD debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
- -
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - -
-
-   -
-
- - - - - - - - - - - - -
-
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- -
-
-
-   -
-
-

UART forwarding

-
- } - - set form_baudrate [formfetch form_baudrate] - if {[string length $form_baudrate]==0} { - set form_baudrate [ocd_uart] - set form_baudrate [string range $form_baudrate 0 [expr [string length $form_baudrate]-2]] - } - set form_action [formfetch form_action] - -append buffer { -
- Target baudrate: - - -

- -

- } - - if {[string compare $form_action "Set baudrate"]==0} { - append console [encode [ocd_uart $form_baudrate]] - } - -append buffer { - -

Simple UART

- This terminal window is purely for illustrative purposes. Use telnet or a terminal program - to talk to the target over TCP/IP for anything but trivial case of reading/writing a few - lines of texts in simple tests. -

-

- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-OpenOCD Manual -
-
-
- -
- - -
-
-
- - Serial port data to target is forwarded(both directions) in the simple terminal window - to the left. Alternatively you can telnet } -append buffer [ip] -append buffer { 5555 - or connect via TCP/IP from e.g. HyperTerminal. -

- Type "help uart" in telnet for information on how to set uart speed for target. Normally - the uart speed is set from the target configuration script by adding an "uart N", where - N is the baudrate. - -

-   -
-
- - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd/upgrade.tcl b/src/server/httpd/upgrade.tcl deleted file mode 100644 index 11a73d3ef..000000000 --- a/src/server/httpd/upgrade.tcl +++ /dev/null @@ -1,418 +0,0 @@ -# converted to .tcl by html2tcl.tcl -set buffer "" -append buffer { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zylin ZY1000 JTAG debugger - - - -} - - set console "" - set upload_filename /ram/upload - -append buffer { - -
-
- - - -
-
-
-} -append buffer [capture version] -append buffer { -
-
-
- - - - - - - - - - -
-
-   -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- -
- -
- -
- -
-
-
-
-
- - - - - - - - - - - - - -} - - - set toggle_details [formfetch toggle_details] - if {[string length $toggle_details]==0} { - set toggle_details 0 - } - set show_details [load_var show_details] - if {[string length $show_details]==0} { - set show_details 0 - } - if {$toggle_details==1} { - set show_details [expr 1-$show_details] - save_var show_details $show_details - } - - if {[string length $console]!=0} { - -append buffer { - - - -} - - } - -append buffer { - - - -
- - - - - - - - -
- - -
-Flash -
-
-
-Memory -
-
- - - -
-
-
-   -
-
-

Upgrade ZY1000 Firmware

-
- - } - - set form_action [formfetch form_action]; - set form_filecontent [formfetch form_filecontent]; - - append buffer {
} - if {[string compare $form_action "Upload"]==0} { - - if [string match ZylinPhiFirmware* $form_filecontent]==1 { - set form_filename /config/firmware.phi - puts "Writing firmware to $form_filename" - set fp [aio.open $form_filename w]; - $fp puts -nonewline $form_filecontent - $fp close - puts "Done writing firmware to $form_filename" - append buffer "
Upgraded Zylin JTAG, rebooting (wait ca. 30 seconds)...

" - reboot - } else { - append buffer "
Not a valid Zylin JTAG firmware file.
" - } - } elseif {[string compare $form_action "Restore factory settings"]==0} { - proc rmdir { dir } { - set entries {} - catch {set entries [ls $dir]} err - foreach { entry } $entries { - rmdir $dir/$entry - rm $dir/$entry - } - } - rmdir /config/settings - reboot - append buffer "Restoring factory settings (wait ca. 30 seconds)...
" - } else { - append buffer {
Upgrade Zylin JTAG firmware + reboot.

} - append buffer {
} - append buffer {
 
 
} - append buffer {
} - append buffer {
} - append buffer {

} - } - -append buffer { - -
- - -} - - if {$show_details==1} { - append buffer < - append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} - append buffer > - } else { - append buffer < - append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} - append buffer > - } - -append buffer { - -} - - if {$show_details==1} { - append buffer "Hide details" - append buffer
- } else { - append buffer {
} - append buffer "Show details" - append buffer {
} - } - -append buffer { -
-} - - if {$show_details==1} { - append buffer $console - } - -append buffer {} - - if {$show_details!=1} { - append buffer {} - } - -append buffer { - -
   
-
-
-   -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- Documentation -
-
-   - -
-
-Quick Start Manual -
-OpenOCD Manual -
-Contact Zylin AS -
-
- -
- - -
-
-
- - Upload new firmware file to ZY1000, verify that it is a valid ZY1000 firmware - file, and upgrade flash. -

- Restore factory settings restores all factory settings except the TCP/IP settings. -

- The current version of the firmware is visible at the top of the web page. -

- ZY1000 firmware can also be upgraded using serial port YModem upload. -

- Check for new firmware at http://www.zylin.com/zy1000.html - -

-   -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - -} - -start_chunked "html" -write_chunked $buffer -end_chunked - diff --git a/src/server/httpd_stubs.c b/src/server/httpd_stubs.c deleted file mode 100644 index 0360fe61b..000000000 --- a/src/server/httpd_stubs.c +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 Zachary T Welch * - * * - * 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 * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "httpd.h" -#include - -int httpd_start(struct command_context *cmd_ctx) -{ - LOG_DEBUG("libocdserver was built without HTTPD support"); - return ERROR_OK; -} -void httpd_stop(void) -{ -} diff --git a/src/server/server.h b/src/server/server.h index face13867..2afd7125e 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -89,11 +89,11 @@ int connection_write(struct connection *connection, const void *data, int len); int connection_read(struct connection *connection, void *data, int len); /** - * Used by server_loop(), defined in server_stubs.c, httpd.c, or ecosboard.c + * Used by server_loop(), defined in server_stubs.c or ecosboard.c */ void openocd_sleep_prelude(void); /** - * Used by server_loop(), defined in server_stubs.c, httpd.c, or ecosboard.c + * Used by server_loop(), defined in server_stubs.c or ecosboard.c */ void openocd_sleep_postlude(void);