e27bc0535c7e3fd3c023e30afa815cbf2cc2af52
[openocd.git] / src / server / httpd / editconfigs.tcl
1 # converted to .tcl by html2tcl.tcl
2 set buffer ""
3 append buffer {
4
5
6
7
8
9
10
11
12
13 <html xmlns="http://www.w3.org/TR/REC-html40">
14 <head>
15 <title>Zylin ZY1000 JTAG debugger</title>
16 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
17 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
18 </head>
19 }
20
21 set console ""
22 set upload_filename /ram/upload
23
24 append buffer {
25 <body style="margin:0px;">
26 <div style="width:974px;height:85px;">
27 <div style="float:left;position:relative;left:32px;width:478px;">
28 <a href="/">
29 <img src="menu_cuts/logo_top.png" style="border:0px;"/>
30 </a>
31 </div>
32 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
33 <div style="position:relative;left:15px;top:4px;" class="textlight">
34 }
35 append buffer [capture version]
36 append buffer {
37 </div>
38 </div>
39 </div>
40 <table style="padding:0px;border-collapse:collapse;">
41 <tr>
42 <td style="width:33px;">
43 <div style="width:20px;height:510px;">
44 &nbsp;
45 </div>
46 </td>
47 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
48 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
49 <tr style="height:59px;">
50 <td/>
51 </tr>
52 <tr>
53 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
54 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
55 <a href="index.tcl" style="">Target Status</a>
56 </div>
57 </td>
58 </tr>
59 <tr>
60 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
61 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
62 <a href="preconfig.tcl" style="">Select Target Config</a>
63 </div>
64 </td>
65 </tr>
66 <tr>
67 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
68 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
69 <a href="editconfigs.tcl" style="font-weight: bold;">Edit Configurations</a>
70 </div>
71 </td>
72 </tr>
73 <tr>
74 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
75 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
76 <a href="reload.tcl" style="">Reload Config Scripts</a>
77 </div>
78 </td>
79 </tr>
80 <tr>
81 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
82 </tr>
83 <tr>
84 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
85 </tr>
86 <tr>
87 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
88 </tr>
89 </table>
90 </td>
91 <td style="vertical-align:top;padding:0px;height:100%">
92 <table style="padding:0px;border-collapse:collapse;height:100%;">
93 <tr>
94 <td>
95 <table style="padding:0px;border-collapse:collapse;">
96 <tr>
97 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
98 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
99 <a href="index.tcl" style="font-weight: bold;">Config Target</a>
100 </div>
101 </td>
102 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
103 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
104 <a href="flashinfo.tcl">Flash</a>
105 </div>
106 </td>
107 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
108 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
109 <a href="browsemem.tcl">Memory</a>
110 </div>
111 </td>
112 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
113 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
114 <a href="openocd.tcl">OpenOCD</a>
115 </div>
116 </td>
117 </tr>
118 </table>
119 </td>
120 </tr>
121 <tr>
122 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
123 <div style="width:500px;background-color:#ffffff;height:100%;">
124 &nbsp;
125 </div>
126 </td>
127 </tr>
128 <tr>
129 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
130 <H1>Edit Target Configurations</H1>
131 </td>
132 </tr>
133 <tr style="height:100%;">
134 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
135 <form action="editconfigs.tcl" method="post">
136 }
137
138 set form_edittext [formfetch form_edittext]
139 set form_action [formfetch form_action]
140 set form_filename [formfetch form_filename]
141 set form_selected [formfetch form_selected]
142
143 if {[string compare $form_action "Load"]==0} {
144 set form_filename $form_selected
145 }
146
147 if {[string compare $form_action "Delete"]==0} {
148 capture_catch "rm /config/settings/$form_selected"
149 }
150
151 if {[string compare $form_action "Save"]==0} {
152 save_var $form_filename [from_textarea $form_edittext]
153 append buffer "Wrote file $form_filename<br>"
154 }
155
156 set form_edittext ""
157
158 # load original or script saved on disk.
159 if {[string compare $form_action "Show default"]==0} {
160 set form_edittext [load_file "/rom/$form_selected"]
161 set form_filename $form_selected
162 } else {
163 set form_edittext [load_config $form_filename]
164 }
165
166 set form_edittext_subst [to_textarea $form_edittext]
167
168
169 proc prepend { val list } {
170 set res ""
171 foreach value $list {
172 set t $val
173 append t $value
174 lappend res $t
175 }
176 return $res
177 }
178
179 set files [prepend target/ [ls /rom/target]]
180 set files [lunion $files [prepend event/ [ls /config/settings/event]]]
181 set files [lunion $files [prepend target/ [ls /config/settings/target]]]
182 set files [lsort $files]
183
184
185 append buffer {
186 <table style="padding:0px;border-collapse:collapse;"><tr>
187 <td style="padding-top:1px;"><select name="form_selected">
188 }
189
190 set foundTarget 0
191 foreach i $files {
192
193 append buffer {
194 <option
195 }
196
197 if {[string compare $form_filename $i]==0} {
198 set foundTarget 1
199 append buffer {selected="selected"}
200 }
201
202 append buffer {
203 value="}
204 append buffer $i
205 append buffer {">}
206 append buffer $i
207 append buffer {</option>
208 }
209
210 }
211 if {$foundTarget==0} {
212
213 append buffer {
214 <option selected="selected" value="">Select target config</option>
215 }
216
217 }
218
219 append buffer {
220 </select></td>
221 <td class="buttonspacesmall">&nbsp</td>
222 <td><input type="submit" value="Load" name="form_action"></td>
223 <td class="buttonspacesmall">&nbsp</td>
224 <td><input type="submit" value="Show default" name="form_action"></td>
225 <td class="buttonspacesmall">&nbsp</td>
226 <td><input type="submit" value="Delete" name="form_action"></td>
227 </tr></table>
228 <textarea style="overflow:auto;" rows="21" cols="65" name="form_edittext" wrap="off">}
229 append buffer $form_edittext_subst
230 append buffer {</textarea>
231 <table style="padding:0px;border-collapse:collapse;"><tr>
232 }
233
234 append buffer {<td class="formtext">File</td><td><input type="text" name="form_filename" } "\n"
235 append buffer "value=\"$form_filename\" ></td>\n"
236 append buffer {<td class="buttonspacesmall">&nbsp</td><td><input type="submit" value="Save" name="form_action"></td><br>} "\n"
237 append buffer {</tr></table>} "\n"
238
239 append buffer {
240 </form>
241 </td>
242 </tr>
243 }
244
245
246 set toggle_details [formfetch toggle_details]
247 if {[string length $toggle_details]==0} {
248 set toggle_details 0
249 }
250 set show_details [load_var show_details]
251 if {[string length $show_details]==0} {
252 set show_details 0
253 }
254 if {$toggle_details==1} {
255 set show_details [expr 1-$show_details]
256 save_var show_details $show_details
257 }
258
259 if {[string length $console]!=0} {
260
261 append buffer {
262 <tr style="height:100%;">
263 <td style="height:100%;background-color:red;" colspan="6">
264 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
265 <td style="width:25px;">&nbsp;</td>
266 }
267
268 if {$show_details==1} {
269 append buffer <
270 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
271 append buffer >
272 } else {
273 append buffer <
274 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;"}
275 append buffer >
276 }
277
278 append buffer {
279 <a class="openocd" href="editconfigs.tcl?toggle_details=1">
280 }
281
282 if {$show_details==1} {
283 append buffer "Hide details"
284 append buffer <br/>
285 } else {
286 append buffer {<div style="position:relative;top:7px;text-align:center;">}
287 append buffer "Show details"
288 append buffer {</div>}
289 }
290
291 append buffer {
292 </a>
293 }
294
295 if {$show_details==1} {
296 append buffer $console
297 }
298
299 append buffer {</td>}
300
301 if {$show_details!=1} {
302 append buffer {<td>&nbsp;</td>}
303 }
304
305 append buffer {
306 <td style="width:25px;">&nbsp;</td>
307 </table>
308 </td>
309 </tr>
310 }
311
312 }
313
314 append buffer {
315 <tr>
316 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
317 <div style="width:500px;background-color:#ffffff;height:100%;">
318 &nbsp;
319 </div>
320 </td>
321 </tr>
322 </table>
323 </td>
324 <td style="width:6px;"/>
325 <td style="width:245px;height:100%">
326 <table style="padding:0px;border-collapse:collapse;height:100%;">
327 <tr>
328 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
329 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
330 Documentation
331 </div>
332 </td>
333 <td width="40px">
334 &nbsp;
335 </td>
336 <td/>
337 </tr>
338 <tr>
339 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
340 </tr>
341 <tr>
342 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
343 <a target="_blank" href="http://www.zylin.com/zy1000/ZY1000_Quick_Start_Guide.pdf">Quick Start Manual</a>
344 <br/>
345 <a target="_blank" href="http://www.zylin.com/zy1000/openocd.pdf">OpenOCD Manual</a>
346 <br/>
347 <a target="_blank" href="http://www.zylin.com/zy1000_contact.html">Contact Zylin AS</a>
348 </td>
349 </tr>
350 <tr>
351 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
352 </tr>
353 <tr>
354 <td colspan="3">
355 <table style="padding:0px;border-collapse:collapse;">
356 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
357 <td style="background-color:#999999;width:225px; height:1px;"/>
358 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
359 </table>
360 </td>
361 </tr>
362 <tr>
363 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
364 </tr>
365 <tr style="height:100%;">
366 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
367
368 <p>Here you can edit predefined target configurations, restore predefined configurations to
369 default state and create new target configurations.<p/>
370 <p>Typically when creating a new target configuration, you would take an existing
371 configuration that resembles the most your needs and modify it for your
372 purposes and save it under a different name.</p>
373 <p><b>Load</b> - Loads a configuration file into the editor.</p>
374 <p><b>Show default</b> - Loads the firmware included version of the
375 configuration file (if any), into the editor.<br>
376 <b>Note</b> that the editor content is not saved.</p>
377 <p><b>Delete</b> - Deletes a custom created configuration file.<br>
378 <b>Note</b> that firmware included configuration files can not be deleted.</p>
379 <p><b>Save</b> - Save the edited file under the a new or the same name.</p>
380
381 </td>
382 </tr>
383 <tr>
384 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
385 &nbsp;
386 </td>
387 </tr>
388 </table>
389 </td>
390 </tr>
391 <tr>
392 <td/>
393 <td>
394 <img border="0" src="menu_cuts/logo_bottom.png"/>
395 </td>
396 </tr>
397 </table>
398 </body>
399 </html>
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457 }
458
459 start_chunked "html"
460 write_chunked $buffer
461 end_chunked
462

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)