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

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)