9b02c2aceb8746bec02f38e0884784b9125cd57e
[openocd.git] / src / server / httpd / guiupload.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
42
43
44
45
46
47
48
49 <html xmlns="http://www.w3.org/TR/REC-html40">
50 <head>
51 <title>OpenOCD debugger</title>
52 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
53 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
54 </head>
55 }
56
57 set console ""
58 set upload_filename /ram/upload
59
60 append buffer {
61 <body style="margin:0px;">
62 <div style="width:974px;height:85px;">
63 <div style="float:left;position:relative;left:32px;width:478px;">
64 <a href="/">
65 OpenOCD
66 </a>
67 </div>
68 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
69 <div style="position:relative;left:15px;top:4px;" class="textlight">
70 }
71 append buffer [capture version]
72 append buffer {
73 </div>
74 </div>
75 </div>
76 <table style="padding:0px;border-collapse:collapse;">
77 <tr>
78 <td style="width:33px;">
79 <div style="width:20px;height:510px;">
80 &nbsp;
81 </div>
82 </td>
83 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
84 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
85 <tr style="height:59px;">
86 <td/>
87 </tr>
88 <tr>
89 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
90 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
91 <a href="openocd.tcl" style="">Run Command</a>
92 </div>
93 </td>
94 </tr>
95 <tr>
96 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
97 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
98 <a href="guiupload.tcl" style="font-weight: bold;">Upload File to ZY1000</a>
99 </div>
100 </td>
101 </tr>
102 <tr>
103 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
104 </tr>
105 <tr>
106 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
107 </tr>
108 <tr>
109 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
110 </tr>
111 </table>
112 </td>
113 <td style="vertical-align:top;padding:0px;height:100%">
114 <table style="padding:0px;border-collapse:collapse;height:100%;">
115 <tr>
116 <td>
117 <table style="padding:0px;border-collapse:collapse;">
118 <tr>
119 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
120 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
121 <a href="index.tcl">Config Target</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="flashinfo.tcl">Flash</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="browsemem.tcl">Memory</a>
132 </div>
133 </td>
134 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
135 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
136 <a href="openocd.tcl" style="font-weight: bold;">OpenOCD</a>
137 </div>
138 </td>
139 </tr>
140 </table>
141 </td>
142 </tr>
143 <tr>
144 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
145 <div style="width:500px;background-color:#ffffff;height:100%;">
146 &nbsp;
147 </div>
148 </td>
149 </tr>
150 <tr>
151 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
152 <H1>Upload File to ZY1000</H1>
153 </td>
154 </tr>
155 <tr style="height:100%;">
156 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
157
158 }
159
160 set form_filename [formfetch form_filename];
161 set form_action [formfetch form_action];
162 #set form_filecontent [formfetch form_filecontent];
163
164 append buffer {<form enctype="multipart/form-data" action="guiupload.tcl" method="post">}
165 append buffer <br>
166 if {[string compare $form_action "Upload"]==0} {
167 if {[catch {writeform form_filecontent $form_filename} result]==0} {
168 append buffer [encode $result]
169 } else {
170 append buffer Wrote $form_filename
171 }
172 }
173
174 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>}
175 append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}
176 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>}
177 append buffer {<input type="submit" name="form_action" value="Upload" ><br> }
178 append buffer {</form>}
179
180
181 append buffer {
182
183 </td>
184 </tr>
185 }
186
187
188 set toggle_details [formfetch toggle_details]
189 if {[string length $toggle_details]==0} {
190 set toggle_details 0
191 }
192 set show_details [load_var show_details]
193 if {[string length $show_details]==0} {
194 set show_details 0
195 }
196 if {$toggle_details==1} {
197 set show_details [expr 1-$show_details]
198 save_var show_details $show_details
199 }
200
201 if {[string length $console]!=0} {
202
203 append buffer {
204 <tr style="height:100%;">
205 <td style="height:100%;background-color:red;" colspan="6">
206 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
207 <td style="width:25px;">&nbsp;</td>
208 }
209
210 if {$show_details==1} {
211 append buffer <
212 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
213 append buffer >
214 } else {
215 append buffer <
216 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;"}
217 append buffer >
218 }
219
220 append buffer {
221 <a class="openocd" href="guiupload.tcl?toggle_details=1">
222 }
223
224 if {$show_details==1} {
225 append buffer "Hide details"
226 append buffer <br/>
227 } else {
228 append buffer {<div style="position:relative;top:7px;text-align:center;">}
229 append buffer "Show details"
230 append buffer {</div>}
231 }
232
233 append buffer {
234 </a>
235 }
236
237 if {$show_details==1} {
238 append buffer $console
239 }
240
241 append buffer {</td>}
242
243 if {$show_details!=1} {
244 append buffer {<td>&nbsp;</td>}
245 }
246
247 append buffer {
248 <td style="width:25px;">&nbsp;</td>
249 </table>
250 </td>
251 </tr>
252 }
253
254 }
255
256 append buffer {
257 <tr>
258 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
259 <div style="width:500px;background-color:#ffffff;height:100%;">
260 &nbsp;
261 </div>
262 </td>
263 </tr>
264 </table>
265 </td>
266 <td style="width:6px;"/>
267 <td style="width:245px;height:100%">
268 <table style="padding:0px;border-collapse:collapse;height:100%;">
269 <tr>
270 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
271 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
272 Documentation
273 </div>
274 </td>
275 <td width="40px">
276 &nbsp;
277 </td>
278 <td/>
279 </tr>
280 <tr>
281 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
282 </tr>
283 <tr>
284 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
285 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
286 <br/>
287 </td>
288 </tr>
289 <tr>
290 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
291 </tr>
292 <tr>
293 <td colspan="3">
294 <table style="padding:0px;border-collapse:collapse;">
295 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
296 <td style="background-color:#999999;width:225px; height:1px;"/>
297 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
298 </table>
299 </td>
300 </tr>
301 <tr>
302 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
303 </tr>
304 <tr style="height:100%;">
305 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
306
307 <p>The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing
308 embedded into the firmware.</p>
309
310 <p>Use "/ram" to store temporary files.<p/>
311
312 <p>
313 You can browse filing systems and download files by pointing your web browser to:
314 <ul>
315 <li><a href="/ram" target="_blank">/ram</a>
316 <li><a href="/rom" target="_blank">/rom</a>
317 <li><a href="/config" target="_blank">/config</a>
318 </ul>
319 </p>
320
321 <p>
322 You can also upload files using e.g. curl from the command line. Example:
323 </p>
324 <code>
325 curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf }
326 append buffer [ip]
327 append buffer {upload.tcl
328 </code>
329 <p>
330 If you have a tftp server installed on your development PC, you can access
331 files on your developer PC using a /tftp/ip/ prefix to the file to be accessed
332 on your developer PC. Note that if you do not increase the default packet
333 size for your tftp server, then the performance will be very poor. Normal
334 performance is about 500-600kBytes/s.
335 </p>
336 <code>
337 cp /tftp/10.0.0.106/build/src/openocd /ram/test
338 </code>
339
340
341 </td>
342 </tr>
343 <tr>
344 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
345 &nbsp;
346 </td>
347 </tr>
348 </table>
349 </td>
350 </tr>
351 </table>
352 </body>
353 </html>
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369 }
370
371 start_chunked "html"
372 write_chunked $buffer
373 end_chunked
374

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)