ARM9TDMI: Fix segfault.
[openocd.git] / src / server / httpd / index.tcl
blob35c5cc79d51ef93bc7fdc434bb8e86058b3af0ed
1 # converted to .tcl by html2tcl.tcl
2 set buffer ""
3 append buffer {
7 <html xmlns="http://www.w3.org/TR/REC-html40">
8 <head>
9 <title>OpenOCD debugger</title>
10 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
11 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
12 </head>
15 set console ""
16 set upload_filename /ram/upload
18 append buffer {
19 <body style="margin:0px;">
20 <div style="width:974px;height:85px;">
21 <div style="float:left;position:relative;left:32px;width:478px;">
22 <a href="/">
23 OpenOCD
24 </a>
25 </div>
26 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
27 <div style="position:relative;left:15px;top:4px;" class="textlight">
29 append buffer [capture version]
30 append buffer {
31 </div>
32 </div>
33 </div>
34 <table style="padding:0px;border-collapse:collapse;">
35 <tr>
36 <td style="width:33px;">
37 <div style="width:20px;height:510px;">
38 &nbsp;
39 </div>
40 </td>
41 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
42 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
43 <tr style="height:59px;">
44 <td/>
45 </tr>
46 <tr>
47 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
48 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
49 <a href="index.tcl" style="font-weight: bold;">Target Status</a>
50 </div>
51 </td>
52 </tr>
53 <tr>
54 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
55 </tr>
56 <tr>
57 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
58 </tr>
59 <tr>
60 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
61 </tr>
62 </table>
63 </td>
64 <td style="vertical-align:top;padding:0px;height:100%">
65 <table style="padding:0px;border-collapse:collapse;height:100%;">
66 <tr>
67 <td>
68 <table style="padding:0px;border-collapse:collapse;">
69 <tr>
70 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
71 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
72 <a href="index.tcl" style="font-weight: bold;">Config Target</a>
73 </div>
74 </td>
75 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
76 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
77 <a href="flashinfo.tcl">Flash</a>
78 </div>
79 </td>
80 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
81 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
82 <a href="browsemem.tcl">Memory</a>
83 </div>
84 </td>
85 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
86 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
87 <a href="openocd.tcl">OpenOCD</a>
88 </div>
89 </td>
90 </tr>
91 </table>
92 </td>
93 </tr>
94 <tr>
95 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
96 <div style="width:500px;background-color:#ffffff;height:100%;">
97 &nbsp;
98 </div>
99 </td>
100 </tr>
101 <tr>
102 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
103 <H1>OpenOCD debugger</H1>
104 </td>
105 </tr>
106 <tr style="height:100%;">
107 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
110 <table>
111 <tr><td style="height:10px;width:535px;">&nbsp</td></tr>
112 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
113 <tr><td style="height:5px;width:535px;">&nbsp</td></tr>
114 </table>
116 <H1>Target Status</H1>
118 <table>
119 <tr>
120 <td class="fontbigger">
123 set form_address [formfetch form_address]
124 set form_action [formfetch form_action]
126 if {[string compare $form_action "Halt"]==0} {
127 append console [encode [capture_catch "halt"]]
129 if {[string compare $form_action "Resume"]==0} {
130 append console [encode [capture_catch "resume"]]
133 if {[string compare $form_action "Reset and run"]==0} {
134 append console [encode [capture_catch "reset run"]]
137 if {[string compare $form_action "Power on"]==0} {
138 append console [encode [capture_catch "power on"]]
140 if {[string compare $form_action "Power off"]==0} {
141 append console [encode [capture_catch "power off"]]
144 append buffer {
147 append console [encode [capture_catch poll]]
148 append buffer {
149 </td>
150 </tr>
151 </table>
153 <form action="index.tcl" method="post">
154 <table><tr>
155 <td><input type="submit" name="form_action" value="Reset and run"></td>
156 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Halt"></td>
157 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Resume"></td>
158 <td style="width:50px;"></td><td><input type="submit" name="form_action" value="Power on"></td>
159 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Power off"></td>
160 </tr></table>
162 <br>
163 <br>
166 </form>
167 </td>
168 </tr>
172 set toggle_details [formfetch toggle_details]
173 if {[string length $toggle_details]==0} {
174 set toggle_details 0
176 set show_details [load_var show_details]
177 if {[string length $show_details]==0} {
178 set show_details 0
180 if {$toggle_details==1} {
181 set show_details [expr 1-$show_details]
182 save_var show_details $show_details
185 if {[string length $console]!=0} {
187 append buffer {
188 <tr style="height:100%;">
189 <td style="height:100%;background-color:red;" colspan="6">
190 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
191 <td style="width:25px;">&nbsp;</td>
194 if {$show_details==1} {
195 append buffer <
196 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
197 append buffer >
198 } else {
199 append buffer <
200 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;"}
201 append buffer >
204 append buffer {
205 <a class="openocd" href="index.tcl?toggle_details=1">
208 if {$show_details==1} {
209 append buffer "Hide details"
210 append buffer <br/>
211 } else {
212 append buffer {<div style="position:relative;top:7px;text-align:center;">}
213 append buffer "Show details"
214 append buffer {</div>}
217 append buffer {
218 </a>
221 if {$show_details==1} {
222 append buffer $console
225 append buffer {</td>}
227 if {$show_details!=1} {
228 append buffer {<td>&nbsp;</td>}
231 append buffer {
232 <td style="width:25px;">&nbsp;</td>
233 </table>
234 </td>
235 </tr>
240 append buffer {
241 <tr>
242 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
243 <div style="width:500px;background-color:#ffffff;height:100%;">
244 &nbsp;
245 </div>
246 </td>
247 </tr>
248 </table>
249 </td>
250 <td style="width:6px;"/>
251 <td style="width:245px;height:100%">
252 <table style="padding:0px;border-collapse:collapse;height:100%;">
253 <tr>
254 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
255 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
256 Documentation
257 </div>
258 </td>
259 <td width="40px">
260 &nbsp;
261 </td>
262 <td/>
263 </tr>
264 <tr>
265 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
266 </tr>
267 <tr>
268 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
269 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
270 <br/>
271 </td>
272 </tr>
273 <tr>
274 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
275 </tr>
276 <tr>
277 <td colspan="3">
278 <table style="padding:0px;border-collapse:collapse;">
279 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
280 <td style="background-color:#999999;width:225px; height:1px;"/>
281 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
282 </table>
283 </td>
284 </tr>
285 <tr>
286 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
287 </tr>
288 <tr style="height:100%;">
289 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
291 <p>Target status shows that status of the connected target. </p>
292 <p><b>Current target</b> - selected target configuration. <br>
293 <p><b>Startup</b> - whether or not the target script ran to completion. Note
294 that even if the target is disconnected, powered down or unresponsive, the
295 startup script will still run to completion. Startup - OK does not mean
296 that the target is fully operational, simply that the configuration script
297 did not contain syntax errors for instance.
298 See log for details. <br>
299 <p><b>Target power</b> - Detects power on target. <br>
300 If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p>
301 <p>Type "help power" in telnet for command to control power relay.</p>
303 </td>
304 </tr>
305 <tr>
306 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
307 &nbsp;
308 </td>
309 </tr>
310 </table>
311 </td>
312 </tr>
313 </table>
314 </body>
315 </html>
373 start_chunked "html"
374 write_chunked $buffer
375 end_chunked