httpd wip
[openocd.git] / src / server / httpd / downloadmem.tcl
1 # converted to .tcl by html2tcl.tcl
2 set buffer ""
3 append buffer {
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 <html xmlns="http://www.w3.org/TR/REC-html40">
42 <head>
43 <title>OpenOCD debugger</title>
44 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
45 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
46 </head>
47 }
48
49 set console ""
50 set upload_filename /ram/upload
51
52 append buffer {
53 <body style="margin:0px;">
54 <div style="width:974px;height:85px;">
55 <div style="float:left;position:relative;left:32px;width:478px;">
56 <a href="/">
57 OpenOCD
58 </a>
59 </div>
60 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
61 <div style="position:relative;left:15px;top:4px;" class="textlight">
62 }
63 append buffer [capture version]
64 append buffer {
65 </div>
66 </div>
67 </div>
68 <table style="padding:0px;border-collapse:collapse;">
69 <tr>
70 <td style="width:33px;">
71 <div style="width:20px;height:510px;">
72 &nbsp;
73 </div>
74 </td>
75 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
76 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
77 <tr style="height:59px;">
78 <td/>
79 </tr>
80 <tr>
81 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
82 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
83 <a href="browsemem.tcl" style="">Browse / Edit</a>
84 </div>
85 </td>
86 </tr>
87 <tr>
88 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
89 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
90 <a href="downloadmem.tcl" style="font-weight: bold;">Download</a>
91 </div>
92 </td>
93 </tr>
94 <tr>
95 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
96 </tr>
97 <tr>
98 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
99 </tr>
100 <tr>
101 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
102 </tr>
103 </table>
104 </td>
105 <td style="vertical-align:top;padding:0px;height:100%">
106 <table style="padding:0px;border-collapse:collapse;height:100%;">
107 <tr>
108 <td>
109 <table style="padding:0px;border-collapse:collapse;">
110 <tr>
111 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
112 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
113 <a href="index.tcl">Config Target</a>
114 </div>
115 </td>
116 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
117 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
118 <a href="flashinfo.tcl">Flash</a>
119 </div>
120 </td>
121 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
122 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
123 <a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
124 </div>
125 </td>
126 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
127 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
128 <a href="openocd.tcl">OpenOCD</a>
129 </div>
130 </td>
131 </tr>
132 </table>
133 </td>
134 </tr>
135 <tr>
136 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
137 <div style="width:500px;background-color:#ffffff;height:100%;">
138 &nbsp;
139 </div>
140 </td>
141 </tr>
142 <tr>
143 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
144 <H1>Download Memory Range</H1>
145 </td>
146 </tr>
147 <tr style="height:100%;">
148 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
149 }
150
151 set form_address [formfetch form_address]
152 set form_length [formfetch form_length]
153 set form_action [formfetch form_action]
154
155 append buffer {
156 <form action="downloadmem.tcl" method="post">
157 <table>
158 <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
159 append buffer $form_address
160 append buffer {"></td></tr>
161 <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
162 append buffer $form_length
163 append buffer {"></td></tr>
164 </td></tr>
165 </table>
166
167 <table>
168 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
169 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
170 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
171 </table>
172
173 <input type="submit" value="Download" name="form_action">
174
175
176 </form>
177 }
178
179 if {[string compare $form_action "Download"]==0} {
180 append console [encode [capture_catch "reset init"]]
181 append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]]
182
183 append buffer {
184 <form action="../dump.bin" target="_blank">
185 <input type="submit" name="form_action" value="Save downloaded memory">
186 </form>
187 }
188
189 }
190
191
192 append buffer {
193
194
195
196 </td>
197 </tr>
198 }
199
200
201 set toggle_details [formfetch toggle_details]
202 if {[string length $toggle_details]==0} {
203 set toggle_details 0
204 }
205 set show_details [load_var show_details]
206 if {[string length $show_details]==0} {
207 set show_details 0
208 }
209 if {$toggle_details==1} {
210 set show_details [expr 1-$show_details]
211 save_var show_details $show_details
212 }
213
214 if {[string length $console]!=0} {
215
216 append buffer {
217 <tr style="height:100%;">
218 <td style="height:100%;background-color:red;" colspan="6">
219 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
220 <td style="width:25px;">&nbsp;</td>
221 }
222
223 if {$show_details==1} {
224 append buffer <
225 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
226 append buffer >
227 } else {
228 append buffer <
229 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;"}
230 append buffer >
231 }
232
233 append buffer {
234 <a class="openocd" href="downloadmem.tcl?toggle_details=1">
235 }
236
237 if {$show_details==1} {
238 append buffer "Hide details"
239 append buffer <br/>
240 } else {
241 append buffer {<div style="position:relative;top:7px;text-align:center;">}
242 append buffer "Show details"
243 append buffer {</div>}
244 }
245
246 append buffer {
247 </a>
248 }
249
250 if {$show_details==1} {
251 append buffer $console
252 }
253
254 append buffer {</td>}
255
256 if {$show_details!=1} {
257 append buffer {<td>&nbsp;</td>}
258 }
259
260 append buffer {
261 <td style="width:25px;">&nbsp;</td>
262 </table>
263 </td>
264 </tr>
265 }
266
267 }
268
269 append buffer {
270 <tr>
271 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
272 <div style="width:500px;background-color:#ffffff;height:100%;">
273 &nbsp;
274 </div>
275 </td>
276 </tr>
277 </table>
278 </td>
279 <td style="width:6px;"/>
280 <td style="width:245px;height:100%">
281 <table style="padding:0px;border-collapse:collapse;height:100%;">
282 <tr>
283 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
284 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
285 Documentation
286 </div>
287 </td>
288 <td width="40px">
289 &nbsp;
290 </td>
291 <td/>
292 </tr>
293 <tr>
294 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
295 </tr>
296 <tr>
297 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
298 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
299 <br/>
300 </td>
301 </tr>
302 <tr>
303 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
304 </tr>
305 <tr>
306 <td colspan="3">
307 <table style="padding:0px;border-collapse:collapse;">
308 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
309 <td style="background-color:#999999;width:225px; height:1px;"/>
310 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
311 </table>
312 </td>
313 </tr>
314 <tr>
315 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
316 </tr>
317 <tr style="height:100%;">
318 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
319
320 Download memory to ZY1000 from target. <br>
321 <b>Note</b> that download memory can take
322 a long time(potentially minutes for megabytes at low JTAG clk speeds).
323 <p/>
324 Once the memory is downloaded a link is available on the page to download
325 the file from ZY1000 to your PC.
326
327 </td>
328 </tr>
329 <tr>
330 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
331 &nbsp;
332 </td>
333 </tr>
334 </table>
335 </td>
336 </tr>
337 </table>
338 </body>
339 </html>
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363 }
364
365 start_chunked "html"
366 write_chunked $buffer
367 end_chunked
368

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)