mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
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 <oyvind.harboe@zylin.com>
This commit is contained in:
2
README
2
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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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/
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
#include <server/server.h>
|
||||
#include <server/gdb_server.h>
|
||||
#include <server/httpd.h>
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,28 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
|
||||
* *
|
||||
* 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
|
||||
Binary file not shown.
@@ -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<list.getLength(); i++)
|
||||
{
|
||||
Node node=list.item(i);
|
||||
|
||||
// Use a Transformer for output
|
||||
TransformerFactory tFactory = TransformerFactory.newInstance();
|
||||
StreamSource stylesource = new StreamSource(stylesheet);
|
||||
Transformer transformer = tFactory.newTransformer(stylesource);
|
||||
|
||||
Node fileName = XPathAPI.selectSingleNode(node, "outfile/text()");
|
||||
|
||||
System.err.println("Converting " + fileName.getNodeValue());
|
||||
DOMSource source = new DOMSource(document);
|
||||
|
||||
OutputStream output=new FileOutputStream(new File(argv[2], fileName.getNodeValue()));
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
StreamResult result = new StreamResult(output);
|
||||
|
||||
transformer.setParameter("pagetogenerate", fileName.getNodeValue());
|
||||
transformer.transform(source, result);
|
||||
}
|
||||
finally
|
||||
{
|
||||
output.close();
|
||||
}
|
||||
}
|
||||
} catch (TransformerConfigurationException tce)
|
||||
{
|
||||
// Error generated by the parser
|
||||
System.out.println("\n** Transformer Factory error");
|
||||
System.out.println(" " + tce.getMessage());
|
||||
// Use the contained exception, if any
|
||||
Throwable x = tce;
|
||||
if (tce.getException() != null)
|
||||
x = tce.getException();
|
||||
x.printStackTrace();
|
||||
} catch (TransformerException te)
|
||||
{
|
||||
// Error generated by the parser
|
||||
System.out.println("\n** Transformation error");
|
||||
System.out.println(" " + te.getMessage());
|
||||
// Use the contained exception, if any
|
||||
Throwable x = te;
|
||||
if (te.getException() != null)
|
||||
x = te.getException();
|
||||
x.printStackTrace();
|
||||
} catch (SAXException sxe)
|
||||
{
|
||||
// Error generated by this application
|
||||
// (or a parser-initialization error)
|
||||
Exception x = sxe;
|
||||
if (sxe.getException() != null)
|
||||
x = sxe.getException();
|
||||
x.printStackTrace();
|
||||
} catch (ParserConfigurationException pce)
|
||||
{
|
||||
// Parser with specified options can't be built
|
||||
pce.printStackTrace();
|
||||
} catch (IOException ioe)
|
||||
{
|
||||
// I/O error
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
} // main
|
||||
}
|
||||
@@ -1,454 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>OpenOCD debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
OpenOCD
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="browsemem.tcl" style="font-weight: bold;">Browse / Edit</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="downloadmem.tcl" style="">Download</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Browse / Edit Memory</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
|
||||
<form action="browsemem.tcl" method="post">
|
||||
<table>
|
||||
<tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
|
||||
append buffer $form_address
|
||||
append buffer {"></td></tr>
|
||||
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
|
||||
append buffer "0x[tohex $form_length]"
|
||||
append buffer {"></td></tr>
|
||||
<tr><td class="formtext">Value</td><td><input type="text" name="form_value" value="}
|
||||
append buffer $form_value
|
||||
append buffer {"></td>
|
||||
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Modify"></td>
|
||||
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Fill"></td></tr>
|
||||
<tr><td class="formtext">Type</td><td style="padding-top:1px;">
|
||||
<select name="form_type">
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} }
|
||||
append buffer { value ="mdb">8 bit
|
||||
</option>
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} }
|
||||
append buffer { value ="mdh">16 bit
|
||||
</option>
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} }
|
||||
append buffer {value ="mdw">32 bit
|
||||
</option>
|
||||
</select>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
</table>
|
||||
|
||||
<table><tr>
|
||||
<td><input type="submit" name="form_action" value="Refresh"></td>
|
||||
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Previous" ></td>
|
||||
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Next" ></td>
|
||||
</tr></table>
|
||||
<br>
|
||||
|
||||
</form>
|
||||
<p>
|
||||
<div class="fontbigger">Memory:</div><p>
|
||||
<code style="white-space: nowrap; font-size:11px;font:courier new;">
|
||||
}
|
||||
|
||||
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 {
|
||||
</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="browsemem.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
<p>Browse and edit target memory.<br>
|
||||
Length is in bytes, maximum 4096 bytes.</p>
|
||||
<p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
|
||||
<p>CPU will be halted if required.</p>
|
||||
<p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
|
||||
<p><b>Fill</b> - Will fill the specified region with the specified value.</p>
|
||||
<p><b>Refresh</b> - Display the content of the specified memory area.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -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/
|
||||
@@ -1,366 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>OpenOCD debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
OpenOCD
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="browsemem.tcl" style="">Browse / Edit</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="downloadmem.tcl" style="font-weight: bold;">Download</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Download Memory Range</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
}
|
||||
|
||||
set form_address [formfetch form_address]
|
||||
set form_length [formfetch form_length]
|
||||
set form_action [formfetch form_action]
|
||||
|
||||
append buffer {
|
||||
<form action="downloadmem.tcl" method="post">
|
||||
<table>
|
||||
<tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
|
||||
append buffer $form_address
|
||||
append buffer {"></td></tr>
|
||||
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
|
||||
append buffer $form_length
|
||||
append buffer {"></td></tr>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
</table>
|
||||
|
||||
<input type="submit" value="Download" name="form_action">
|
||||
|
||||
|
||||
</form>
|
||||
}
|
||||
|
||||
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 {
|
||||
<form action="../dump.bin" target="_blank">
|
||||
<input type="submit" name="form_action" value="Save downloaded memory">
|
||||
</form>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="downloadmem.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
Download memory from target. <br>
|
||||
<b>Note</b> that download memory can take
|
||||
a long time(potentially minutes for megabytes at low JTAG clk speeds).
|
||||
<p/>
|
||||
Once the memory is downloaded a link is available on the page to download
|
||||
the file to your PC.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -1,462 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>Zylin ZY1000 JTAG debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
<img src="menu_cuts/logo_top.png" style="border:0px;"/>
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="index.tcl" style="">Target Status</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="preconfig.tcl" style="">Select Target Config</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="editconfigs.tcl" style="font-weight: bold;">Edit Configurations</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="reload.tcl" style="">Reload Config Scripts</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl" style="font-weight: bold;">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Edit Target Configurations</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
<form action="editconfigs.tcl" method="post">
|
||||
}
|
||||
|
||||
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<br>"
|
||||
}
|
||||
|
||||
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 {
|
||||
<table style="padding:0px;border-collapse:collapse;"><tr>
|
||||
<td style="padding-top:1px;"><select name="form_selected">
|
||||
}
|
||||
|
||||
set foundTarget 0
|
||||
foreach i $files {
|
||||
|
||||
append buffer {
|
||||
<option
|
||||
}
|
||||
|
||||
if {[string compare $form_filename $i]==0} {
|
||||
set foundTarget 1
|
||||
append buffer {selected="selected"}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
value="}
|
||||
append buffer $i
|
||||
append buffer {">}
|
||||
append buffer $i
|
||||
append buffer {</option>
|
||||
}
|
||||
|
||||
}
|
||||
if {$foundTarget==0} {
|
||||
|
||||
append buffer {
|
||||
<option selected="selected" value="">Select target config</option>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</select></td>
|
||||
<td class="buttonspacesmall"> </td>
|
||||
<td><input type="submit" value="Load" name="form_action"></td>
|
||||
<td class="buttonspacesmall"> </td>
|
||||
<td><input type="submit" value="Show default" name="form_action"></td>
|
||||
<td class="buttonspacesmall"> </td>
|
||||
<td><input type="submit" value="Delete" name="form_action"></td>
|
||||
</tr></table>
|
||||
<textarea style="overflow:auto;" rows="21" cols="65" name="form_edittext" wrap="off">}
|
||||
append buffer $form_edittext_subst
|
||||
append buffer {</textarea>
|
||||
<table style="padding:0px;border-collapse:collapse;"><tr>
|
||||
}
|
||||
|
||||
append buffer {<td class="formtext">File</td><td><input type="text" name="form_filename" } "\n"
|
||||
append buffer "value=\"$form_filename\" ></td>\n"
|
||||
append buffer {<td class="buttonspacesmall"> </td><td><input type="submit" value="Save" name="form_action"></td><br>} "\n"
|
||||
append buffer {</tr></table>} "\n"
|
||||
|
||||
append buffer {
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="editconfigs.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://www.zylin.com/zy1000/ZY1000_Quick_Start_Guide.pdf">Quick Start Manual</a>
|
||||
<br/>
|
||||
<a target="_blank" href="http://www.zylin.com/zy1000/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
<a target="_blank" href="http://www.zylin.com/zy1000_contact.html">Contact Zylin AS</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
<p>Here you can edit predefined target configurations, restore predefined configurations to
|
||||
default state and create new target configurations.<p/>
|
||||
<p>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.</p>
|
||||
<p><b>Load</b> - Loads a configuration file into the editor.</p>
|
||||
<p><b>Show default</b> - Loads the firmware included version of the
|
||||
configuration file (if any), into the editor.<br>
|
||||
<b>Note</b> that the editor content is not saved.</p>
|
||||
<p><b>Delete</b> - Deletes a custom created configuration file.<br>
|
||||
<b>Note</b> that firmware included configuration files can not be deleted.</p>
|
||||
<p><b>Save</b> - Save the edited file under the a new or the same name.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td/>
|
||||
<td>
|
||||
<img border="0" src="menu_cuts/logo_bottom.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -1,436 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>Zylin ZY1000 JTAG debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
<img src="menu_cuts/logo_top.png" style="border:0px;"/>
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="zy1000.tcl" style="">Set IP Address</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="upgrade.tcl" style="">ZY1000 Firmware</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="editfile.tcl" style="font-weight: bold;">Edit File</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="support.tcl" style="">Support Request</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="log.tcl#tail" style="">View Tail of Log</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="/ram/cgi/index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="/ram/cgi/flashinfo.tcl">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="/ram/cgi/browsemem.tcl">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="/ram/cgi/openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="/ram/cgi/zy1000.tcl" style="font-weight: bold;">Setup ZY1000</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Edit File</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
}
|
||||
|
||||
|
||||
|
||||
#Read a text file, edit it and write it back. Useful for interactive debugging
|
||||
#of tcl scripts
|
||||
|
||||
set data ""
|
||||
append buffer {<form action="editfile.tcl" method="post">} "\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<br>"
|
||||
} err]} {
|
||||
append buffer "Could not write $form_filename<br>"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
append buffer {<table><tr><td class="formtext">File</td><td style="padding-top:1px;"><input type="text" name="form_filename" } "\n"
|
||||
append buffer "value=\"$form_filename\" ></td>\n"
|
||||
append buffer {<td class="buttonspacesmall"> </td><td><input type="submit" value="Load" name="form_action" ></td><td class="buttonspacesmall"> </td><td><input type="submit" value="Save" name="form_action"></td><td class="buttonspacesmall"> </td><td><input type="submit" value="Delete" name="form_action"></td>} "\n"
|
||||
append buffer {</tr></table>} "\n"
|
||||
append buffer {<br>}
|
||||
|
||||
append buffer {<textarea style="overflow:auto;" rows="18" cols="65" name="form_edittext" wrap="off">}
|
||||
append buffer $form_edittext_subst
|
||||
append buffer {</textarea><br>}
|
||||
|
||||
append buffer {</html> } "\n"
|
||||
|
||||
|
||||
|
||||
append buffer {
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="/ram/cgi/editfile.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://www.zylin.com/zy1000/ZY1000_Quick_Start_Guide.pdf">Quick Start Manual</a>
|
||||
<br/>
|
||||
<a target="_blank" href="http://www.zylin.com/zy1000/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
<a target="_blank" href="http://www.zylin.com/zy1000_contact.html">Contact Zylin AS</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
Edit any file on the ZY1000 by typing in the
|
||||
filename and pressing Load.
|
||||
</p>
|
||||
<table style="line-height:17px;"><tr>
|
||||
<td><a href="/ram" target="_blank">Browse files on /ram</a><br>
|
||||
<a href="/config" target="_blank">Browse files on /config</a><br>
|
||||
<a href="/rom" target="_blank">Browse files on /rom</a></td>
|
||||
</tr></table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td/>
|
||||
<td>
|
||||
<img border="0" src="menu_cuts/logo_bottom.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -1,387 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>OpenOCD debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
OpenOCD
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="flashinfo.tcl" style="">Info</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="erase.tcl" style="font-weight: bold;">Erase</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="flash.tcl" style="">Program / Verify</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="production.tcl" style="">Production</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl" style="font-weight: bold;">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Erase Flash</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 "<code style=\"white-space: nowrap;\">"
|
||||
append console [encode [capture_catch {
|
||||
reset init
|
||||
flash erase_address $form_address $form_length}]]
|
||||
append buffer </code>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
append buffer {
|
||||
|
||||
<form action="erase.tcl" method="post">
|
||||
<table>
|
||||
<tr><td class="formtext" style="padding-right:10px;">Address</td><td><input type="text" name="form_address" value="}
|
||||
append buffer $form_address
|
||||
append buffer {"></td></tr>
|
||||
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
|
||||
append buffer $form_length
|
||||
append buffer {"></td></tr>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
</table>
|
||||
|
||||
<input type="submit" name="form_action" value="Erase"><br>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="erase.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
<p>Note that flash programming will erase flash if required.<p/>
|
||||
<p>Reset and init CPU, then erase address range.</p>
|
||||
<p>The length field is specified in number of bytes.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -1,459 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>OpenOCD debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
OpenOCD
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="flashinfo.tcl" style="">Info</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="erase.tcl" style="">Erase</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="flash.tcl" style="font-weight: bold;">Program / Verify</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="production.tcl" style="">Production</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl" style="font-weight: bold;">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Program / Verify Flash</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 {<code style="white-space: nowrap;">}
|
||||
|
||||
|
||||
set data ""
|
||||
append buffer {<form enctype="multipart/form-data" action="flash.tcl" method="post">}
|
||||
|
||||
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 {
|
||||
</code>}
|
||||
|
||||
|
||||
append buffer {<table>}
|
||||
append buffer {<tr><td class="formtext">File</td><td><input type="file" name="form_filecontent"></td></tr>}
|
||||
append buffer "<tr><td class=\"formtext\" >Offset</td><td><input type=\"text\" name=\"form_offset\" value=\"$form_offset\"></td></tr>"
|
||||
|
||||
|
||||
append buffer {
|
||||
<tr><td class="formtext" style="padding-top:1px;">Type</td><td>
|
||||
<select name="form_type">
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type ""]==0} { append buffer {selected="selected"} }
|
||||
append buffer {
|
||||
value ="">auto</option>
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type "elf"]==0} { append buffer {selected="selected"} }
|
||||
append buffer {
|
||||
value ="elf">elf</option>
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type "bin"]==0} { append buffer {selected="selected"} }
|
||||
append buffer {
|
||||
value ="bin">binary</option>
|
||||
<option
|
||||
}
|
||||
if {[string compare $form_type "ihex"]==0} { append buffer {selected="selected"} }
|
||||
append buffer {
|
||||
value ="ihex">ihex</option>
|
||||
<!-- broken <option value ="s19">s19</option> -->
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
|
||||
<tr><td style="height:15px;width:535px;"> </td></tr>
|
||||
</table>
|
||||
|
||||
<table><tr>
|
||||
<td><input type="submit" name="form_action" value="Flash" ></td>
|
||||
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Flash and verify" ></td>
|
||||
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Verify" ></td>
|
||||
</tr></table>
|
||||
|
||||
<p>
|
||||
}
|
||||
|
||||
|
||||
if {$action_flash||$action_verify} {
|
||||
catch {writeform form_filecontent $upload_filename} result
|
||||
append console [encode $result]
|
||||
}
|
||||
append buffer "<br>"
|
||||
if {$action_flash} {
|
||||
append console [encode [capture_catch "halt"]]
|
||||
append buffer "<b>"
|
||||
if {[catch {capture_catch {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} {
|
||||
append buffer "Flash write failed<br>"
|
||||
append console [encode $result]
|
||||
} else {
|
||||
append buffer [encode $result]
|
||||
append buffer "Flash write succeed<br>"
|
||||
}
|
||||
append buffer "</b>"
|
||||
}
|
||||
if {$action_verify} {
|
||||
append console [encode [capture_catch "halt"]]
|
||||
append buffer "<b>"
|
||||
if {[catch {capture_catch {eval "verify_image $upload_filename $form_offset $form_type"}} result]} {
|
||||
append buffer "Verify failed<br>"
|
||||
append console [encode $result]
|
||||
} else {
|
||||
append buffer [encode $result]
|
||||
append buffer "Verify succeed<br>"
|
||||
}
|
||||
append buffer "</b>"
|
||||
}
|
||||
|
||||
append buffer {
|
||||
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="flash.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
<p>Program and/or verify the flash on your target.</p>
|
||||
<p><b>Flash</b> - Halt CPU, automatically erase flash if required and program flash with image.</p>
|
||||
<p><b>Flash and verify</b> - Programs the flash and verifies the programmed flash content is correct.</p>
|
||||
<p><b>Verify</b> - Halt CPU and verify image in flash or RAM.</p>
|
||||
<p><b>Offset</b> - This value is added to the address of the image.<br>
|
||||
Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.<br>
|
||||
Typically 0 for elf/ihex and the address to write the image to for binary files.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -1,382 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>OpenOCD debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
OpenOCD
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="flashinfo.tcl" style="font-weight: bold;">Info</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="erase.tcl" style="">Erase</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="flash.tcl" style="">Program / Verify</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="production.tcl" style="">Production</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl" style="font-weight: bold;">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Flash Information</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
|
||||
<div style="font-size:14px;">Configured flash banks:</div>
|
||||
<p>
|
||||
<code style="white-space: nowrap;">
|
||||
}
|
||||
|
||||
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 {
|
||||
<p>
|
||||
<form action="flashinfo.tcl" method="post">
|
||||
<input type="submit" name="form_action" value="Reset CPU and probe flash">
|
||||
</form>
|
||||
}
|
||||
|
||||
foreach a [ocd_flash_banks] {
|
||||
append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: "
|
||||
|
||||
append buffer {
|
||||
<form action="downloadmem.tcl" method="post">
|
||||
<input type="hidden" name="form_address" value="}
|
||||
append buffer [format "0x%08x" $a(base)]
|
||||
append buffer {">
|
||||
<input type="hidden" name="form_length" value="}
|
||||
append buffer [format "0x%08x" $a(size)]
|
||||
append buffer {">
|
||||
|
||||
<input type="submit" value="Download" name="form_action">
|
||||
<br>
|
||||
</form>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</code>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="flashinfo.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
|
||||
|
||||
<p>Here you will find information about the flash chips that you have
|
||||
in your configuration.<p/>
|
||||
<p><b>Reset CPU and probe flash</b> - 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.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -1,336 +0,0 @@
|
||||
# converted to .tcl by html2tcl.tcl
|
||||
set buffer ""
|
||||
append buffer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<title>OpenOCD debugger</title>
|
||||
<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
|
||||
<link type="text/css" rel="stylesheet" href="menuweb.css"/>
|
||||
</head>
|
||||
}
|
||||
|
||||
set console ""
|
||||
set upload_filename /ram/upload
|
||||
|
||||
append buffer {
|
||||
<body style="margin:0px;">
|
||||
<div style="width:974px;height:85px;">
|
||||
<div style="float:left;position:relative;left:32px;width:478px;">
|
||||
<a href="/">
|
||||
OpenOCD
|
||||
</a>
|
||||
</div>
|
||||
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
|
||||
<div style="position:relative;left:15px;top:4px;" class="textlight">
|
||||
}
|
||||
append buffer [capture version]
|
||||
append buffer {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:33px;">
|
||||
<div style="width:20px;height:510px;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
|
||||
<tr style="height:59px;">
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="openocd.tcl" style="">Run Command</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;left:10px;top:10px;font-weight:bold;">
|
||||
<a href="guiupload.tcl" style="font-weight: bold;">Upload File</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align:top;padding:0px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="index.tcl">Config Target</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="flashinfo.tcl">Flash</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="browsemem.tcl">Memory</a>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
|
||||
<a href="openocd.tcl" style="font-weight: bold;">OpenOCD</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
|
||||
<H1>Upload File</H1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
|
||||
|
||||
}
|
||||
|
||||
set form_filename [formfetch form_filename];
|
||||
set form_action [formfetch form_action];
|
||||
#set form_filecontent [formfetch form_filecontent];
|
||||
|
||||
append buffer {<form enctype="multipart/form-data" action="guiupload.tcl" method="post">}
|
||||
append buffer <br>
|
||||
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 {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on OpenOCD machine</td><td><input type="text" name="form_filename"></td></tr>}
|
||||
append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}
|
||||
append buffer {<table><tr><td style="height:15px;width:535px;"> </td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;"> </td></tr></table>}
|
||||
append buffer {<input type="submit" name="form_action" value="Upload" ><br> }
|
||||
append buffer {</form>}
|
||||
|
||||
|
||||
append buffer {
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:red;" colspan="6">
|
||||
<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
|
||||
<td style="width:25px;"> </td>
|
||||
}
|
||||
|
||||
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 {
|
||||
<a class="openocd" href="guiupload.tcl?toggle_details=1">
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer "Hide details"
|
||||
append buffer <br/>
|
||||
} else {
|
||||
append buffer {<div style="position:relative;top:7px;text-align:center;">}
|
||||
append buffer "Show details"
|
||||
append buffer {</div>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
</a>
|
||||
}
|
||||
|
||||
if {$show_details==1} {
|
||||
append buffer $console
|
||||
}
|
||||
|
||||
append buffer {</td>}
|
||||
|
||||
if {$show_details!=1} {
|
||||
append buffer {<td> </td>}
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<td style="width:25px;"> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
append buffer {
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
|
||||
<div style="width:500px;background-color:#ffffff;height:100%;">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width:6px;"/>
|
||||
<td style="width:245px;height:100%">
|
||||
<table style="padding:0px;border-collapse:collapse;height:100%;">
|
||||
<tr>
|
||||
<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
|
||||
<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
|
||||
Documentation
|
||||
</div>
|
||||
</td>
|
||||
<td width="40px">
|
||||
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
|
||||
<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding:0px;border-collapse:collapse;">
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
<td style="background-color:#999999;width:225px; height:1px;"/>
|
||||
<td style="background-color:#d8d7d7;width:10px;height:1px"/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
|
||||
</tr>
|
||||
<tr style="height:100%;">
|
||||
<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
start_chunked "html"
|
||||
write_chunked $buffer
|
||||
end_chunked
|
||||
|
||||
@@ -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 <file to encode> <output C header file>
|
||||
#
|
||||
#####DESCRIPTIONEND####
|
||||
#===============================================================================
|
||||
|
||||
if { $argc != 2 } {
|
||||
puts "Usage: html2tcl.tcl <infile> <outfile>"
|
||||
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*<html.*} $data]==0 {
|
||||
puts "copy $infile"
|
||||
puts -nonewline $outfilefd $data
|
||||
close $outfilefd
|
||||
exit 0
|
||||
}
|
||||
|
||||
puts "converting $infile"
|
||||
|
||||
set result ""
|
||||
append result "# converted to .tcl by html2tcl.tcl\n"
|
||||
append result "set buffer \"\"\n"
|
||||
|
||||
set pos 0
|
||||
set done 0
|
||||
while {$done==0} {
|
||||
set start [string first <tcl> $data $pos]
|
||||
if $start==-1 {
|
||||
# We're done...
|
||||
set done 1
|
||||
set start [string length $data]
|
||||
set end $start
|
||||
} else {
|
||||
set end [string first </tcl> $data $start]
|
||||
if $end==-1 {
|
||||
# uh-oh, not closed
|
||||
puts "<tcl> 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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user