From: Øyvind Harboe Date: Thu, 11 Nov 2010 07:15:49 +0000 (+0100) Subject: httpd: retire this server X-Git-Tag: v0.5.0-rc1~343 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=fdae51287cf55a039f3401ed92151dbf518e4e7f httpd: retire this server 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 --- diff --git a/README b/README index a683476c46..fd0bd33d57 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 a15b80a606..70dddb95e4 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 f75f1d1d3d..f6a06700bf 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 b54161c822..19a0ba96c3 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 7347cad8e5..5ce01e82bd 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 c6c946f0b0..ac24ebb559 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 af8c3c8bb5..0000000000 --- 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 0502deb1db..0000000000 --- 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 ffa08ce7e2..0000000000 Binary files a/src/server/httpd/Stylizer.class and /dev/null differ diff --git a/src/server/httpd/Stylizer.java b/src/server/httpd/Stylizer.java deleted file mode 100755 index 721e84cad6..0000000000 --- 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 8824debf46..0000000000 --- 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 e6127aeafd..0000000000 --- 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 e27bc0535c..0000000000 --- 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 6a393263e9..0000000000 --- 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 a63ef37b9f..0000000000 --- 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 3ad9772f27..0000000000 --- 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 8e9f3e25b5..0000000000 --- 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 804bfe4205..0000000000 --- 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 3eb5c3939d..0000000000 --- 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 dfa9e335cb..0000000000 --- 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 35c5cc79d5..0000000000 --- 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 703a06d373..0000000000 --- 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 be1446416b..0000000000 --- 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 b54f16c787..0000000000 --- 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 cfa5839590..0000000000 Binary files a/src/server/httpd/menu_cuts/center_bottom.png and /dev/null differ 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 6e5a2130ae..0000000000 Binary files a/src/server/httpd/menu_cuts/center_top.png and /dev/null differ 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 b6983bf818..0000000000 Binary files a/src/server/httpd/menu_cuts/h_tab1.png and /dev/null differ 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 0485a2b294..0000000000 Binary files a/src/server/httpd/menu_cuts/h_tab1_selected.png and /dev/null differ 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 c0fb6dfb2d..0000000000 Binary files a/src/server/httpd/menu_cuts/h_tab2.png and /dev/null differ 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 4a26124d2c..0000000000 Binary files a/src/server/httpd/menu_cuts/h_tab2_selected.png and /dev/null differ diff --git a/src/server/httpd/menu_cuts/h_tab_free.png b/src/server/httpd/menu_cuts/h_tab_free.png deleted file mode 100644 index 18682b5e29..0000000000 Binary files a/src/server/httpd/menu_cuts/h_tab_free.png and /dev/null differ 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 8e0bf3e5c1..0000000000 Binary files a/src/server/httpd/menu_cuts/logo_bottom.png and /dev/null differ 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 6c3a6db256..0000000000 Binary files a/src/server/httpd/menu_cuts/logo_top.png and /dev/null differ diff --git a/src/server/httpd/menu_cuts/right_bottom.png b/src/server/httpd/menu_cuts/right_bottom.png deleted file mode 100644 index c6011ef6aa..0000000000 Binary files a/src/server/httpd/menu_cuts/right_bottom.png and /dev/null differ diff --git a/src/server/httpd/menu_cuts/right_top.png b/src/server/httpd/menu_cuts/right_top.png deleted file mode 100644 index aaeed10c0e..0000000000 Binary files a/src/server/httpd/menu_cuts/right_top.png and /dev/null differ 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 095ddf87d8..0000000000 Binary files a/src/server/httpd/menu_cuts/right_top_small.png and /dev/null differ 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 d1ed656b6c..0000000000 Binary files a/src/server/httpd/menu_cuts/top_right.png and /dev/null differ diff --git a/src/server/httpd/menu_cuts/v_1.png b/src/server/httpd/menu_cuts/v_1.png deleted file mode 100644 index 2f23cfc0e8..0000000000 Binary files a/src/server/httpd/menu_cuts/v_1.png and /dev/null differ 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 3f3645370d..0000000000 Binary files a/src/server/httpd/menu_cuts/v_2_tile.png and /dev/null differ 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 cf8fa37bff..0000000000 Binary files a/src/server/httpd/menu_cuts/v_3.png and /dev/null differ 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 ad39319e97..0000000000 Binary files a/src/server/httpd/menu_cuts/v_tab.png and /dev/null differ diff --git a/src/server/httpd/menu_cuts/v_tab_selected.png b/src/server/httpd/menu_cuts/v_tab_selected.png deleted file mode 100644 index fc7397aaaa..0000000000 Binary files a/src/server/httpd/menu_cuts/v_tab_selected.png and /dev/null differ diff --git a/src/server/httpd/menuweb.css b/src/server/httpd/menuweb.css deleted file mode 100644 index 60c62393ea..0000000000 --- a/src/server/httpd/menuweb.css +++ /dev/null @@ -1,132 +0,0 @@ -a:link -{ - font-size: 12px; - color : #024d67; - font-weight:bold; - text-decoration : none; -} - -a:visited -{ - font-size: 12px; - color : #024d67; - font-weight:bold; - text-decoration : none; -} - -a:active -{ - font-size: 12px; - color : #024d67; - font-weight:bold; - text-decoration : none; -} - -a:hover -{ - font-size: 12px; - color : #555555; - font-weight:bold; - text-decoration : none; -} - -a.openocd:link -{ - font-size: 12px; - color : #555555; - font-weight:bold; - text-decoration : none; -} - -a.openocd:visited -{ - font-size: 12px; - color : #555555; - font-weight:bold; - text-decoration : none; -} - -a.openocd:active -{ - font-size: 12px; - color : #555555; - font-weight:bold; - text-decoration : none; -} - -a.openocd:hover -{ - font-size: 12px; - color : #024d67; - font-weight:bold; - text-decoration : none; -} - -body -{ - background-color : green; - background-color : #176e8c; - font-family : Arial; - font-size: 12px; - line-height: 15px; - color : #024d67; - -} - -h1 -{ - padding: 0px; - font-size: 18px; - font-weight:bold; - text-decoration : none; - margin-bottom: 8px; -} - -td -{ - padding: 0px; - font-size: 12px; - vertical-align:top; - -} - -.textlight -{ - color: #cccccc; - padding: 0px; - font-size: 12px; - vertical-align:top; - -} - -.fontbigger -{ - font-size:14px; -} - -.textgray -{ - color: #555555; -} - -.formtext -{ - padding-top: 4px; - font-size: 14px; - padding-right:10px; -} - -input -{ - font-size: 14px; -} - -.buttonspacelarge -{ - width:20px; -} - -.buttonspacesmall -{ - width:8px; -} diff --git a/src/server/httpd/openocd.tcl b/src/server/httpd/openocd.tcl deleted file mode 100644 index 8607f18560..0000000000 --- a/src/server/httpd/openocd.tcl +++ /dev/null @@ -1,355 +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 -
-
- -
-
-
-   -
-
-

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 8308deb411..0000000000 --- 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 7c5ba6357a..0000000000 --- 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 7bc80e66b2..0000000000 --- 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 5d68ce325e..0000000000 --- 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 689b1608ef..0000000000 --- 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 31502197ae..0000000000 --- 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 4a12dde549..0000000000 --- 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 c6cc05f62a..0000000000 --- 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 11a73d3ef4..0000000000 --- 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 0360fe61bf..0000000000 --- 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 face13867f..2afd7125e3 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);