Add comments and tiny improvements to STM32 flash loader algorithm
[openocd.git] / src / server / httpd / terminal.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
50
51
52
53
54
55
56
57 <html xmlns="http://www.w3.org/TR/REC-html40">
58 <head>
59 <title>OpenOCD debugger</title>
60 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
61 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
62 </head>
63 }
64
65 set console ""
66 set upload_filename /ram/upload
67
68 append buffer {
69 <body style="margin:0px;">
70 <div style="width:974px;height:85px;">
71 <div style="float:left;position:relative;left:32px;width:478px;">
72 <a href="/">
73 OpenOCD
74 </a>
75 </div>
76 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
77 <div style="position:relative;left:15px;top:4px;" class="textlight">
78 }
79 append buffer [capture version]
80 append buffer {
81 </div>
82 </div>
83 </div>
84 <table style="padding:0px;border-collapse:collapse;">
85 <tr>
86 <td style="width:33px;">
87 <div style="width:20px;height:510px;">
88 &nbsp;
89 </div>
90 </td>
91 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
92 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
93 <tr style="height:59px;">
94 <td/>
95 </tr>
96 <tr>
97 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
98 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
99 <a href="index.tcl" style="">Target Status</a>
100 </div>
101 </td>
102 </tr>
103 <tr>
104 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
105 </tr>
106 <tr>
107 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
108 </tr>
109 <tr>
110 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
111 </tr>
112 </table>
113 </td>
114 <td style="vertical-align:top;padding:0px;height:100%">
115 <table style="padding:0px;border-collapse:collapse;height:100%;">
116 <tr>
117 <td>
118 <table style="padding:0px;border-collapse:collapse;">
119 <tr>
120 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
121 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
122 <a href="index.tcl" style="font-weight: bold;">Config Target</a>
123 </div>
124 </td>
125 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
126 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
127 <a href="flashinfo.tcl">Flash</a>
128 </div>
129 </td>
130 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
131 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
132 <a href="browsemem.tcl">Memory</a>
133 </div>
134 </td>
135 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
136 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
137 <a href="openocd.tcl">OpenOCD</a>
138 </div>
139 </td>
140 </tr>
141 </table>
142 </td>
143 </tr>
144 <tr>
145 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
146 <div style="width:500px;background-color:#ffffff;height:100%;">
147 &nbsp;
148 </div>
149 </td>
150 </tr>
151 <tr>
152 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
153 <H1>UART forwarding</H1>
154 </td>
155 </tr>
156 <tr style="height:100%;">
157 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
158 }
159
160 set form_baudrate [formfetch form_baudrate]
161 if {[string length $form_baudrate]==0} {
162 set form_baudrate [ocd_uart]
163 set form_baudrate [string range $form_baudrate 0 [expr [string length $form_baudrate]-2]]
164 }
165 set form_action [formfetch form_action]
166
167 append buffer {
168 <form action="terminal.tcl" method="post">
169 Target baudrate:
170 <select name="form_baudrate">
171 }
172
173 foreach i {9600 19200 38400 57600 115200} {
174
175 append buffer {
176 <option }
177 if {[string compare $form_baudrate $i]==0} { append buffer {selected="selected"} }
178 append buffer {
179 value ="}
180 append buffer $i
181 append buffer {">}
182 append buffer $i
183 append buffer {</option>
184 }
185
186 }
187
188 append buffer {
189 </select>
190
191 <p>
192 <input type="submit" name="form_action" value="Set baudrate" >
193 </form>
194 }
195
196 if {[string compare $form_action "Set baudrate"]==0} {
197 append console [encode [ocd_uart $form_baudrate]]
198 }
199
200 append buffer {
201
202 <h2>Simple UART</h2>
203 This terminal window is purely for illustrative purposes. Use telnet or a terminal program
204 to talk to the target over TCP/IP for anything but trivial case of reading/writing a few
205 lines of texts in simple tests.
206 <p>
207 </td>
208 </tr>
209 }
210
211
212 set toggle_details [formfetch toggle_details]
213 if {[string length $toggle_details]==0} {
214 set toggle_details 0
215 }
216 set show_details [load_var show_details]
217 if {[string length $show_details]==0} {
218 set show_details 0
219 }
220 if {$toggle_details==1} {
221 set show_details [expr 1-$show_details]
222 save_var show_details $show_details
223 }
224
225 if {[string length $console]!=0} {
226
227 append buffer {
228 <tr style="height:100%;">
229 <td style="height:100%;background-color:red;" colspan="6">
230 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
231 <td style="width:25px;">&nbsp;</td>
232 }
233
234 if {$show_details==1} {
235 append buffer <
236 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
237 append buffer >
238 } else {
239 append buffer <
240 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;"}
241 append buffer >
242 }
243
244 append buffer {
245 <a class="openocd" href="terminal.tcl?toggle_details=1">
246 }
247
248 if {$show_details==1} {
249 append buffer "Hide details"
250 append buffer <br/>
251 } else {
252 append buffer {<div style="position:relative;top:7px;text-align:center;">}
253 append buffer "Show details"
254 append buffer {</div>}
255 }
256
257 append buffer {
258 </a>
259 }
260
261 if {$show_details==1} {
262 append buffer $console
263 }
264
265 append buffer {</td>}
266
267 if {$show_details!=1} {
268 append buffer {<td>&nbsp;</td>}
269 }
270
271 append buffer {
272 <td style="width:25px;">&nbsp;</td>
273 </table>
274 </td>
275 </tr>
276 }
277
278 }
279
280 append buffer {
281 <tr>
282 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
283 <div style="width:500px;background-color:#ffffff;height:100%;">
284 &nbsp;
285 </div>
286 </td>
287 </tr>
288 </table>
289 </td>
290 <td style="width:6px;"/>
291 <td style="width:245px;height:100%">
292 <table style="padding:0px;border-collapse:collapse;height:100%;">
293 <tr>
294 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
295 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
296 Documentation
297 </div>
298 </td>
299 <td width="40px">
300 &nbsp;
301 </td>
302 <td/>
303 </tr>
304 <tr>
305 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
306 </tr>
307 <tr>
308 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
309 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
310 <br/>
311 </td>
312 </tr>
313 <tr>
314 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
315 </tr>
316 <tr>
317 <td colspan="3">
318 <table style="padding:0px;border-collapse:collapse;">
319 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
320 <td style="background-color:#999999;width:225px; height:1px;"/>
321 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
322 </table>
323 </td>
324 </tr>
325 <tr>
326 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
327 </tr>
328 <tr style="height:100%;">
329 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
330
331 Serial port data to target is forwarded(both directions) in the simple terminal window
332 to the left. Alternatively you can <b>telnet }
333 append buffer [ip]
334 append buffer { 5555</b>
335 or connect via TCP/IP from e.g. HyperTerminal.
336 <p>
337 Type "help uart" in telnet for information on how to set uart speed for target. Normally
338 the uart speed is set from the target configuration script by adding an "uart N", where
339 N is the baudrate.
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 start_chunked "html"
362 write_chunked $buffer
363 end_chunked
364

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)