]> git.sur5r.net Git - openocd/commitdiff
httpd wip
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 22 Dec 2008 15:24:35 +0000 (15:24 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 22 Dec 2008 15:24:35 +0000 (15:24 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1271 b42882b7-edfa-0310-969c-e2dbd0fdcd60

14 files changed:
src/server/httpd/browsemem.tcl
src/server/httpd/downloadmem.tcl
src/server/httpd/erase.tcl
src/server/httpd/flash.tcl
src/server/httpd/flashinfo.tcl
src/server/httpd/guiupload.tcl
src/server/httpd/httpd.tcl
src/server/httpd/index.tcl
src/server/httpd/menu.xml
src/server/httpd/openocd.tcl
src/server/httpd/production.tcl
src/server/httpd/run.tcl
src/server/httpd/targets.tcl
src/server/httpd/terminal.tcl

index b34ff692bb40068113e79f00b9b2d589303a9efe..566643aafd88fddbb3ded6766c468d7491bc99b0 100644 (file)
@@ -12,8 +12,6 @@ append buffer {
                \r
 \r
 \r
-\r
-               \r
 \r
                \r
                \r
index 035ff3d95ee993eb77dec4243104451fa802eefd..6e9d00fb8700ecbf3f7eb7953c54993726d3a632 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
@@ -317,12 +315,12 @@ append buffer {
 <tr style="height:100%;">\r
 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">\r
                                        \r
-                               Download memory to ZY1000 from target. <br>\r
+                               Download memory from target. <br>\r
                                <b>Note</b> that download memory can take\r
                                a long time(potentially minutes for megabytes at low JTAG clk speeds).\r
                                <p/>\r
                                Once the memory is downloaded a link is available on the page to download\r
-                               the file from ZY1000 to your PC.\r
+                               the file to your PC.\r
                                \r
                        </td>\r
 </tr>\r
index b48197f150e5507c86e4befcf84d36e39e83702c..3c29840d3a6784c0745e8da2b12358af4ee67119 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
index f7c8547b81576e695f70a3afe56effe7d7ff02f3..6fd1cb16c2564691c834264d5cd9f46740693f6b 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                <html xmlns="http://www.w3.org/TR/REC-html40">\r
index 595c449d41182337fdbf1e184dc0b1d0e0d18190..7a208636c968f2fdcaec82d517cd7acc2191135c 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                <html xmlns="http://www.w3.org/TR/REC-html40">\r
 <head>\r
 <title>OpenOCD debugger</title>\r
index 9b02c2aceb8746bec02f38e0884784b9125cd57e..1911510cc94e12922a2b5c9bc01d3f8fc6e13bc7 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
@@ -95,7 +93,7 @@ append buffer {
 <tr>\r
 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">\r
 <div style="position:relative;left:10px;top:10px;font-weight:bold;">\r
-<a href="guiupload.tcl" style="font-weight: bold;">Upload File to ZY1000</a>\r
+<a href="guiupload.tcl" style="font-weight: bold;">Upload File</a>\r
 </div>\r
 </td>\r
 </tr>\r
@@ -149,7 +147,7 @@ append buffer {
 </tr>\r
 <tr>\r
 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">\r
-<H1>Upload File to ZY1000</H1>\r
+<H1>Upload File</H1>\r
 </td>\r
 </tr>\r
 <tr style="height:100%;">\r
@@ -171,7 +169,7 @@ append buffer {
                                        }\r
                                }\r
                                \r
-                               append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on ZY1000</td><td><input type="text" name="form_filename"></td></tr>}\r
+                               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>}\r
                                append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}\r
                                append buffer {<table><tr><td style="height:15px;width:535px;">&nbsp</td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;">&nbsp</td></tr></table>}\r
                                append buffer {<input type="submit" name="form_action" value="Upload" ><br> }\r
@@ -302,43 +300,7 @@ append buffer {
 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>\r
 </tr>\r
 <tr style="height:100%;">\r
-<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">   \r
-                               \r
-                                 <p>The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing\r
-                                 embedded into the firmware.</p>\r
-\r
-                                 <p>Use "/ram" to store temporary files.<p/>\r
-                                 \r
-                                 <p>\r
-                                 You can browse filing systems and download files by pointing your web browser to:\r
-                                 <ul> \r
-                                 <li><a href="/ram" target="_blank">/ram</a>\r
-                                 <li><a href="/rom" target="_blank">/rom</a>\r
-                                 <li><a href="/config" target="_blank">/config</a>\r
-                                 </ul>\r
-                                 </p> \r
-                                 \r
-                                 <p>\r
-                                 You can also upload files using e.g. curl from the command line. Example:\r
-                                 </p>\r
-                                 <code>\r
-                                 curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf }\r
-append buffer [ip]\r
-append buffer {upload.tcl\r
-                                 </code>\r
-                                 <p> \r
-                                 If you have a tftp server installed on your development PC, you can access\r
-                                 files on your developer PC using a /tftp/ip/ prefix to the file to be accessed\r
-                                 on your developer PC. Note that if you do not increase the default packet\r
-                                 size for your tftp server, then the performance will be very poor. Normal\r
-                                 performance is about 500-600kBytes/s.\r
-                                 </p>\r
-                                 <code> \r
-                                 cp /tftp/10.0.0.106/build/src/openocd /ram/test\r
-                                 </code>\r
-                                 \r
-                                 \r
-                       </td>\r
+<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray"/>\r
 </tr>\r
 <tr>\r
 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">\r
index b579411456d44655f71f397d11b75dc87ebd914f..607660cc82e0afbb45e120f52c0fc42e24a4b7d4 100644 (file)
@@ -106,3 +106,8 @@ proc capture_catch {a} {
        } result\r
        return $result\r
 }\r
+\r
+proc zy1000_flash {} {\r
+       set t [lindex 0 [ocd_flash_banks]]\r
+       return $t(base)\r
+}\r
index 91e7e3fb96b8a673f2060f359d6bdbd6c1309383..f450ce0f63782710791898cf493eab56d9b8c329 100644 (file)
@@ -298,10 +298,7 @@ append buffer {
                                        See log for details. <br>\r
                                        <p><b>Target power</b> - Detects power on target. <br>\r
                                        If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p>\r
-                                       <p><b>Power on</b> - Turn on ZY1000 target power relay.</p>\r
-                                       <p><b>Power off</b> - Turn off ZY1000  target power relay.</p>\r
                                        <p>Type "help power" in telnet for command to control power relay.</p>\r
-                                       <p><b>Reboot ZY1000</b> - Reboots ZY1000 unit. Type "help reboot" in telnet.</p>\r
                                \r
                        </td>\r
 </tr>\r
@@ -325,8 +322,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
index cf286e235b6a72a5b6126bfbf073591e016512fe..11daef94f3a7bbf5468f522fa03015f25a3d0ca7 100644 (file)
                                        See log for details. <br>\r
                                        <p><b>Target power</b> - Detects power on target. <br>\r
                                        If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p>\r
-                                       <p><b>Power on</b> - Turn on ZY1000 target power relay.</p>\r
-                                       <p><b>Power off</b> - Turn off ZY1000  target power relay.</p>\r
                                        <p>Type "help power" in telnet for command to control power relay.</p>\r
-                                       <p><b>Reboot ZY1000</b> - Reboots ZY1000 unit. Type "help reboot" in telnet.</p>\r
                                ]]></markup_code>\r
                        </right_column>\r
                        \r
                                <markup_code><![CDATA[\r
                                \r
                                A target needs an openocd.cfg file. This config file sets up\r
-                               the CPU, flash and reset init script. Either ZY1000 ships with an\r
+                               the CPU, flash and reset init script. Either OpenOCD ships with an\r
                                openocd.cfg file for your target or you need to take an existing\r
                                config file and modify it for your needs.\r
                                <p> \r
                                The reset init script is crucial. It will set up e.g. MMU, chip\r
                                select registers, etc. after a reset. The init.cfg (reset init script)\r
-                               is embedded into the openocd.cfg file in the sampls Zylin provides.\r
+                               is embedded into the openocd.cfg file in the sampls OpenOCD provides.\r
                                <p>\r
                                Writing an openocd.cfg from scratch is a non-trivial exercise, but\r
                                fortunally it only has to be done once for a target and afterwards it\r
 \r
 \r
 \r
-               <page lang="eng">\r
-                       <outfile>reload.tcl</outfile>\r
-                       <level2parent>index.tcl</level2parent>\r
-                       <pageheading>Reload Config Scripts</pageheading>\r
-                       <pagetext>\r
-                       <markup_code><![CDATA[\r
-                       \r
-                       <tcl>\r
-                               set form_action [formfetch form_action]\r
-       \r
-                               if {[string compare $form_action "Reload"]==0} {\r
-                                       append buffer "Reloading Config Scripts...<p>"\r
-                                       reboot\r
-                               }\r
-                       </tcl>\r
-                       <form enctype="multipart/form-data" action="reload.tcl" method="post">\r
-                               <input type="submit" name="form_action" value="Reload">\r
-                       </form>\r
-                       \r
-                       ]]></markup_code>\r
-                       <right_column>\r
-                               Restart ZY1000 to reload selected target config script.                         \r
-                       </right_column>\r
-                       </pagetext>\r
-                       \r
-               </page>\r
-\r
                \r
                <page lang="eng">\r
                        <outfile>flashinfo.tcl</outfile>\r
@@ -789,12 +759,12 @@ append console [encode [capture_catch poll]]
                        ]]></markup_code>\r
                        <right_column>\r
                                <![CDATA[       \r
-                               Download memory to ZY1000 from target. <br>\r
+                               Download memory from target. <br>\r
                                <b>Note</b> that download memory can take\r
                                a long time(potentially minutes for megabytes at low JTAG clk speeds).\r
                                <p/>\r
                                Once the memory is downloaded a link is available on the page to download\r
-                               the file from ZY1000 to your PC.\r
+                               the file to your PC.\r
                                ]]>\r
                        </right_column>\r
                        </pagetext>\r
@@ -811,9 +781,9 @@ append console [encode [capture_catch poll]]
                        <level2parent>openocd.tcl</level2parent>\r
                        <level2menu href="openocd.tcl" title="Run Command" titlestyle="color:#4e6627;">\r
                        </level2menu>\r
-                       <level2menu href="guiupload.tcl" title="Upload File to ZY1000" titlestyle="color:#4e6627;">\r
+                       <level2menu href="guiupload.tcl" title="Upload File" titlestyle="color:#4e6627;">\r
                        <![CDATA[\r
-                           Upload file to ZY1000\r
+                           Upload file\r
                        ]]>\r
                        </level2menu>\r
                        \r
@@ -869,7 +839,7 @@ append console [encode [capture_catch poll]]
                <page lang="eng">\r
                        <outfile>guiupload.tcl</outfile>\r
                        <level2parent>openocd.tcl</level2parent>\r
-                       <pageheading>Upload File to ZY1000</pageheading>\r
+                       <pageheading>Upload File</pageheading>\r
                        <pagetext>\r
                        <markup_code><![CDATA[\r
                        \r
@@ -888,7 +858,7 @@ append console [encode [capture_catch poll]]
                                        }\r
                                }\r
                                \r
-                               append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on ZY1000</td><td><input type="text" name="form_filename"></td></tr>}\r
+                               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>}\r
                                append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}\r
                                append buffer {<table><tr><td style="height:15px;width:535px;">&nbsp</td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;">&nbsp</td></tr></table>}\r
                                append buffer {<input type="submit" name="form_action" value="Upload" ><br> }\r
@@ -897,41 +867,6 @@ append console [encode [capture_catch poll]]
                        </tcl>\r
                        \r
                        ]]></markup_code>\r
-                       <right_column>  \r
-                               <![CDATA[\r
-                                 <p>The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing\r
-                                 embedded into the firmware.</p>\r
-\r
-                                 <p>Use "/ram" to store temporary files.<p/>\r
-                                 \r
-                                 <p>\r
-                                 You can browse filing systems and download files by pointing your web browser to:\r
-                                 <ul> \r
-                                 <li><a href="/ram" target="_blank">/ram</a>\r
-                                 <li><a href="/rom" target="_blank">/rom</a>\r
-                                 <li><a href="/config" target="_blank">/config</a>\r
-                                 </ul>\r
-                                 </p> \r
-                                 \r
-                                 <p>\r
-                                 You can also upload files using e.g. curl from the command line. Example:\r
-                                 </p>\r
-                                 <code>\r
-                                 curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf <tcl>append buffer [ip]</tcl>upload.tcl\r
-                                 </code>\r
-                                 <p> \r
-                                 If you have a tftp server installed on your development PC, you can access\r
-                                 files on your developer PC using a /tftp/ip/ prefix to the file to be accessed\r
-                                 on your developer PC. Note that if you do not increase the default packet\r
-                                 size for your tftp server, then the performance will be very poor. Normal\r
-                                 performance is about 500-600kBytes/s.\r
-                                 </p>\r
-                                 <code> \r
-                                 cp /tftp/10.0.0.106/build/src/openocd /ram/test\r
-                                 </code>\r
-                                 \r
-                                 ]]>\r
-                       </right_column>\r
                        </pagetext>\r
                        \r
                </page>\r
@@ -946,13 +881,13 @@ append console [encode [capture_catch poll]]
                                <markup_code><![CDATA[\r
                                \r
                                A target needs an openocd.cfg file. This config file sets up\r
-                               the CPU, flash and reset init script. Either ZY1000 ships with an\r
+                               the CPU, flash and reset init script. Either OpenOCD ships with an\r
                                openocd.cfg file for your target or you need to take an existing\r
                                config file and modify it for your needs.\r
                                <p> \r
                                The reset init script is crucial. It will set up e.g. MMU, chip\r
                                select registers, etc. after a reset. The init.cfg (reset init script)\r
-                               is embedded into the openocd.cfg file in the sampls Zylin provides.\r
+                               is embedded into the openocd.cfg file in the sampls OpenOCD provides.\r
                                <p>\r
                                Writing an openocd.cfg from scratch is a non-trivial exercise, but\r
                                fortunally it only has to be done once for a target and afterwards it\r
index fe1d195dd18a738662e0635302acba67e65169a8..cb28026e8dcd352ca464b3e0ce5b7d604543ffdd 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
@@ -91,7 +89,7 @@ append buffer {
 <tr>\r
 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">\r
 <div style="position:relative;left:10px;top:10px;font-weight:bold;">\r
-<a href="guiupload.tcl" style="">Upload File to ZY1000</a>\r
+<a href="guiupload.tcl" style="">Upload File</a>\r
 </div>\r
 </td>\r
 </tr>\r
index 654c6311a3acc1040d0f8342b97bf5d8051c0aac..8172800b3a82fab7b3b1cc80096f8adbef6c1bcf 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
index 1a00eb974a0534d3035ac117a72bf6bb63f993d2..1ce781321d8beb964a0a9c2ecdfe39f710010293 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
index 3df16367f2c84445877ec43cf25a33c2dcb09171..f56746f8ef0634f4ab92ad7cae2c02b2990aadd0 100644 (file)
@@ -105,13 +105,13 @@ append buffer {
 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">\r
                                \r
                                A target needs an openocd.cfg file. This config file sets up\r
-                               the CPU, flash and reset init script. Either ZY1000 ships with an\r
+                               the CPU, flash and reset init script. Either OpenOCD ships with an\r
                                openocd.cfg file for your target or you need to take an existing\r
                                config file and modify it for your needs.\r
                                <p> \r
                                The reset init script is crucial. It will set up e.g. MMU, chip\r
                                select registers, etc. after a reset. The init.cfg (reset init script)\r
-                               is embedded into the openocd.cfg file in the sampls Zylin provides.\r
+                               is embedded into the openocd.cfg file in the sampls OpenOCD provides.\r
                                <p>\r
                                Writing an openocd.cfg from scratch is a non-trivial exercise, but\r
                                fortunally it only has to be done once for a target and afterwards it\r
@@ -260,8 +260,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r
@@ -392,13 +390,13 @@ append buffer {
 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">\r
                                \r
                                A target needs an openocd.cfg file. This config file sets up\r
-                               the CPU, flash and reset init script. Either ZY1000 ships with an\r
+                               the CPU, flash and reset init script. Either OpenOCD ships with an\r
                                openocd.cfg file for your target or you need to take an existing\r
                                config file and modify it for your needs.\r
                                <p> \r
                                The reset init script is crucial. It will set up e.g. MMU, chip\r
                                select registers, etc. after a reset. The init.cfg (reset init script)\r
-                               is embedded into the openocd.cfg file in the sampls Zylin provides.\r
+                               is embedded into the openocd.cfg file in the sampls OpenOCD provides.\r
                                <p>\r
                                Writing an openocd.cfg from scratch is a non-trivial exercise, but\r
                                fortunally it only has to be done once for a target and afterwards it\r
index 707ddd0fffcc69c7ca854ed069212a397e7bf499..5032e124fe6e3f630c38134570ffcdbc05928aad 100644 (file)
@@ -14,8 +14,6 @@ append buffer {
 \r
 \r
                \r
-\r
-               \r
                \r
 \r
                \r