cf286e235b6a72a5b6126bfbf073591e016512fe
[openocd.git] / src / server / httpd / menu.xml
1 <?xml version = "1.0" encoding="iso-8859-1" standalone="yes"?>
2 <?xml-stylesheet type="text/xsl" href="plaintext.xsl"?>
3 <website>
4
5 <language lang="Norsk">
6
7 <page lang="eng">
8 <outfile>index.tcl</outfile>
9 <menutext>Config Target</menutext>
10 <menulink>index.tcl</menulink>
11 <pageheading>OpenOCD debugger</pageheading>
12 <level2parent>index.tcl</level2parent>
13 <level2menu href="index.tcl" title="Target Status" titlestyle="color:#4e6627;">
14 </level2menu>
15 <!--
16 <level2menu href="terminal.tcl" title="UART forwarding" titlestyle="color:#4e6627;">
17 </level2menu>
18 -->
19
20 <pagetext>
21 <markup_code><![CDATA[
22
23
24 <table>
25 <tr><td style="height:10px;width:535px;">&nbsp</td></tr>
26 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
27 <tr><td style="height:5px;width:535px;">&nbsp</td></tr>
28 </table>
29
30 <H1>Target Status</H1>
31
32 <table>
33 <tr>
34 <td class="fontbigger">
35 <tcl>
36 set form_address [formfetch form_address]
37 set form_action [formfetch form_action]
38
39 if {[string compare $form_action "Halt"]==0} {
40 append console [encode [capture_catch "halt"]]
41 }
42 if {[string compare $form_action "Resume"]==0} {
43 append console [encode [capture_catch "resume"]]
44 }
45
46 if {[string compare $form_action "Reset and run"]==0} {
47 append console [encode [capture_catch "reset run"]]
48 }
49
50 if {[string compare $form_action "Power on"]==0} {
51 append console [encode [capture_catch "power on"]]
52 }
53 if {[string compare $form_action "Power off"]==0} {
54 append console [encode [capture_catch "power off"]]
55 }
56 </tcl>
57
58 <tcl>append console [encode [capture_catch poll]]</tcl>
59 </td>
60 </tr>
61 </table>
62
63 <form action="index.tcl" method="post">
64 <table><tr>
65 <td><input type="submit" name="form_action" value="Reset and run"></td>
66 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Halt"></td>
67 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Resume"></td>
68 <td style="width:50px;"></td><td><input type="submit" name="form_action" value="Power on"></td>
69 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Power off"></td>
70 </tr></table>
71
72 <br>
73 <br>
74
75 <p>
76 </form>
77 ]]></markup_code>
78 <right_column>
79 <markup_code><![CDATA[
80 <p>Target status shows that status of the connected target. </p>
81 <p><b>Current target</b> - selected target configuration. <br>
82 <p><b>Startup</b> - whether or not the target script ran to completion. Note
83 that even if the target is disconnected, powered down or unresponsive, the
84 startup script will still run to completion. Startup - OK does not mean
85 that the target is fully operational, simply that the configuration script
86 did not contain syntax errors for instance.
87 See log for details. <br>
88 <p><b>Target power</b> - Detects power on target. <br>
89 If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p>
90 <p><b>Power on</b> - Turn on ZY1000 target power relay.</p>
91 <p><b>Power off</b> - Turn off ZY1000 target power relay.</p>
92 <p>Type "help power" in telnet for command to control power relay.</p>
93 <p><b>Reboot ZY1000</b> - Reboots ZY1000 unit. Type "help reboot" in telnet.</p>
94 ]]></markup_code>
95 </right_column>
96
97 </pagetext>
98 </page>
99
100
101
102
103 <page lang="eng">
104 <outfile>targets.tcl</outfile>
105 <level2parent>documentation.tcl</level2parent>
106 <pageheading>Target config quick start guide</pageheading>
107 <pagetext>
108 <markup_code><![CDATA[
109
110 A target needs an openocd.cfg file. This config file sets up
111 the CPU, flash and reset init script. Either ZY1000 ships with an
112 openocd.cfg file for your target or you need to take an existing
113 config file and modify it for your needs.
114 <p>
115 The reset init script is crucial. It will set up e.g. MMU, chip
116 select registers, etc. after a reset. The init.cfg (reset init script)
117 is embedded into the openocd.cfg file in the sampls Zylin provides.
118 <p>
119 Writing an openocd.cfg from scratch is a non-trivial exercise, but
120 fortunally it only has to be done once for a target and afterwards it
121 rarely if ever needs to be changed.
122
123
124 ]]></markup_code>
125 <right_column>
126
127 Quick start guide on how to configure a target.
128 </right_column>
129 </pagetext>
130
131
132 </page>
133
134
135
136 <page lang="eng">
137 <outfile>reload.tcl</outfile>
138 <level2parent>index.tcl</level2parent>
139 <pageheading>Reload Config Scripts</pageheading>
140 <pagetext>
141 <markup_code><![CDATA[
142
143 <tcl>
144 set form_action [formfetch form_action]
145
146 if {[string compare $form_action "Reload"]==0} {
147 append buffer "Reloading Config Scripts...<p>"
148 reboot
149 }
150 </tcl>
151 <form enctype="multipart/form-data" action="reload.tcl" method="post">
152 <input type="submit" name="form_action" value="Reload">
153 </form>
154
155 ]]></markup_code>
156 <right_column>
157 Restart ZY1000 to reload selected target config script.
158 </right_column>
159 </pagetext>
160
161 </page>
162
163
164 <page lang="eng">
165 <outfile>flashinfo.tcl</outfile>
166 <menutext>Flash</menutext>
167 <menulink>flashinfo.tcl</menulink>
168 <pageheading>Flash Information</pageheading>
169 <level2parent>flashinfo.tcl</level2parent>
170 <level2menu href="flashinfo.tcl" title="Info" titlestyle="color:#4e6627;">
171 </level2menu>
172 <level2menu href="erase.tcl" title="Erase" titlestyle="color:#4e6627;">
173 </level2menu>
174 <level2menu href="flash.tcl" title="Program / Verify" titlestyle="color:#4e6627;">
175 </level2menu>
176 <level2menu href="production.tcl" title="Production" titlestyle="color:#4e6627;">
177 </level2menu>
178
179 <pagetext>
180 <markup_code><![CDATA[
181
182 <div style="font-size:14px;">Configured flash banks:</div>
183 <p>
184 <code style="white-space: nowrap;">
185 <tcl>
186 set flash_return [ocd_flash_banks]
187 if {[llength $flash_return]!=0} {
188 append buffer [encode [flash banks]]
189
190 set form_action [formfetch form_action]
191 if {[string compare $form_action "Reset CPU and probe flash"]==0} {
192 append console [encode [capture_catch "reset init"]]
193 append buffer [encode [capture_catch "flash probe 0"]]
194 append buffer [encode [capture_catch "flash info 0"]]
195 }
196 } else {
197 append buffer "No flash bank configured."
198 }
199 </tcl>
200 <p>
201 <form action="flashinfo.tcl" method="post">
202 <input type="submit" name="form_action" value="Reset CPU and probe flash">
203 </form>
204 <tcl>
205 foreach a [ocd_flash_banks] {
206 append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: "
207 </tcl>
208 <form action="downloadmem.tcl" method="post">
209 <input type="hidden" name="form_address" value="<tcl>append buffer [format "0x%08x" $a(base)]</tcl>">
210 <input type="hidden" name="form_length" value="<tcl>append buffer [format "0x%08x" $a(size)]</tcl>">
211
212 <input type="submit" value="Download" name="form_action">
213 <br>
214 </form>
215 <tcl>
216 }
217 </tcl>
218 </code>
219
220
221 ]]></markup_code>
222 <right_column>
223 <![CDATA[
224 <p>Here you will find information about the flash chips that you have
225 in your configuration.<p/>
226 <p><b>Reset CPU and probe flash</b> - This will reset the CPU and show
227 you more detailed information about your flash. This includes information about
228 the different sectors in the flash, and the flash driver used.</p>
229 ]]>
230 </right_column>
231
232 </pagetext>
233 </page>
234
235 <page lang="eng">
236 <outfile>flash.tcl</outfile>
237 <level2parent>flashinfo.tcl</level2parent>
238 <pageheading>Program / Verify Flash</pageheading>
239 <pagetext>
240 <markup_code><![CDATA[
241
242 <tcl>
243
244 set form_offset [formfetch form_offset]
245 set form_action [formfetch form_action]
246 set form_type [formfetch form_type]
247
248
249 set post ""
250 catch {set post $post_data} err
251
252 if {[string compare $form_offset ""]==0} {
253 set form_offset 0
254 }
255 if {[string compare $form_type ""]==0} {
256 set form_type ""
257 }
258
259 </tcl><code style="white-space: nowrap;"><tcl>
260
261 set data ""
262 append buffer {<form enctype="multipart/form-data" action="flash.tcl" method="post">}
263
264 set action_reset [expr {[string length $form_action]!=0}]
265 set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}]
266 set action_verify [expr {[string compare $form_action "Verify"]==0 || [string compare $form_action "Flash and verify"]==0}]
267
268 if {$action_reset} {
269 append console [encode [capture_catch "reset init"]]
270 }
271 </tcl>
272 </code><tcl>
273
274 append buffer {<table>}
275 append buffer {<tr><td class="formtext">File</td><td><input type="file" name="form_filecontent"></td></tr>}
276 append buffer "<tr><td class=\"formtext\" >Offset</td><td><input type=\"text\" name=\"form_offset\" value=\"$form_offset\"></td></tr>"
277
278 </tcl>
279 <tr><td class="formtext" style="padding-top:1px;">Type</td><td>
280 <select name="form_type">
281 <option
282 <tcl>if {[string compare $form_type ""]==0} { append buffer {selected="selected"} } </tcl>
283 value ="">auto</option>
284 <option
285 <tcl>if {[string compare $form_type "elf"]==0} { append buffer {selected="selected"} } </tcl>
286 value ="elf">elf</option>
287 <option
288 <tcl>if {[string compare $form_type "bin"]==0} { append buffer {selected="selected"} } </tcl>
289 value ="bin">binary</option>
290 <option
291 <tcl>if {[string compare $form_type "ihex"]==0} { append buffer {selected="selected"} } </tcl>
292 value ="ihex">ihex</option>
293 <!-- broken <option value ="s19">s19</option> -->
294 </select>
295 </td>
296
297 </tr>
298
299
300 </table>
301
302 <table>
303 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
304 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
305 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
306 </table>
307
308 <table><tr>
309 <td><input type="submit" name="form_action" value="Flash" ></td>
310 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Flash and verify" ></td>
311 <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Verify" ></td>
312 </tr></table>
313
314 <p>
315 <tcl>
316
317 if {$action_flash||$action_verify} {
318 catch {writeform form_filecontent $upload_filename} result
319 append console [encode $result]
320 }
321 append buffer "<br>"
322 if {$action_flash} {
323 append console [encode [capture_catch "halt"]]
324 append buffer "<b>"
325 if {[catch {capture_catch {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} {
326 append buffer "Flash write failed<br>"
327 append console [encode $result]
328 } else {
329 append buffer [encode $result]
330 append buffer "Flash write succeed<br>"
331 }
332 append buffer "</b>"
333 }
334 if {$action_verify} {
335 append console [encode [capture_catch "halt"]]
336 append buffer "<b>"
337 if {[catch {capture_catch {eval "verify_image $upload_filename $form_offset $form_type"}} result]} {
338 append buffer "Verify failed<br>"
339 append console [encode $result]
340 } else {
341 append buffer [encode $result]
342 append buffer "Verify succeed<br>"
343 }
344 append buffer "</b>"
345 }
346 </tcl>
347
348 </form>
349
350 ]]></markup_code>
351
352 <right_column>
353 <![CDATA[
354 <p>Program and/or verify the flash on your target.</p>
355 <p><b>Flash</b> - Halt CPU, automatically erase flash if required and program flash with image.</p>
356 <p><b>Flash and verify</b> - Programs the flash and verifies the programmed flash content is correct.</p>
357 <p><b>Verify</b> - Halt CPU and verify image in flash or RAM.</p>
358 <p><b>Offset</b> - This value is added to the address of the image.<br>
359 Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.<br>
360 Typically 0 for elf/ihex and the address to write the image to for binary files.</p>
361 ]]>
362 </right_column>
363
364
365 </pagetext>
366
367 </page>
368
369
370
371
372 <page lang="eng">
373 <outfile>production.tcl</outfile>
374 <level2parent>flashinfo.tcl</level2parent>
375 <pageheading>Production</pageheading>
376 <pagetext>
377 <markup_code><![CDATA[
378 <tcl>
379 set form_action [formfetch form_action]
380 set form_serialnumber [formfetch form_serialnumber]
381 append buffer [production_info]
382 </tcl>
383
384 <form enctype="multipart/form-data" action="production.tcl" method="post">
385 <code style="white-space: nowrap;">
386 <tcl>
387 if {[string compare $form_action "Upload firmware"]==0} {
388 set wrotedata [catch {writeform form_filecontent $upload_filename} result]
389 append buffer [encode $result]
390 if {$wrotedata==0} {
391 append buffer "<br>Running production procedure<p>"
392 append buffer "<br>Reset and init: <br>"
393
394 append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]]
395 }
396 }
397 if {[string compare $form_action "Test"]==0} {
398 append buffer "<br>Running production test. Output from first 10 seconds printed below. <p>"
399
400 append console [encode [capture_catch {catch production_test}]]
401 }
402 if {[string compare $form_action "Power on"]==0} {
403 append console [encode [capture_catch "power on"]]
404 }
405 if {[string compare $form_action "Power off"]==0} {
406 append console [encode [capture_catch "power off"]]
407 }
408 </tcl>
409 </code>
410 <tcl>
411 append buffer {<p class="formtext">Firmware file(raw binary) <input type="file" name="form_filecontent"><p>}
412 append buffer {<p class="formtext">Serial number <input type="text" name="form_serialnumber"><p>}
413 </tcl>
414
415 <table>
416 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
417 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
418 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
419 </table>
420
421 <table><tr>
422 <td><input type="submit" name="form_action" value="Upload firmware" ></td>
423 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Test"></td>
424 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Power on"></td>
425 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Power off">
426 </tr></table>
427 </form>
428
429 ]]></markup_code>
430
431 <right_column>
432 <![CDATA[
433 The target script can implement the "production", "production_info" and "production_test" tcl proc's. These procedures
434 are used on this page. There are default implementations that do nothing.
435
436 <p><b>Upload firmware</b> - Power cycle target, reset target and program raw binary file to flash bank 0, offset 0 and verify flash programming. Leave target powered on.</p>
437 <p><b>Test</b> - Power up target, run 10 second target test. Output is provided via the DCC output channel. </p>
438 <p><b>Power on</b> - Power on target.</p>
439 <p><b>Power off</b> - Power off target.</p>
440 <p><b>Serial number</b> - A target script can use this string in the production procedure. Type "help production" for more info.</p>
441 ]]>
442 </right_column>
443
444
445 </pagetext>
446
447 </page>
448
449
450
451 <page lang="eng">
452 <outfile>erase.tcl</outfile>
453 <menulink>erase.tcl</menulink>
454 <pageheading>Erase Flash</pageheading>
455 <level2parent>flashinfo.tcl</level2parent>
456 <pagetext>
457 <markup_code><![CDATA[
458
459
460
461 <tcl>
462
463 set form_address [formfetch form_address]
464 set form_length [formfetch form_length]
465 set form_action [formfetch form_action]
466
467 if {[string compare $form_length ""]==0} {
468 set form_length 0x10000
469 }
470 if {[string compare $form_address ""]==0} {
471 if {[catch {[zy1000_flash]} result]==0} {
472 set form_address "0x[tohex $result]"
473 }
474 }
475
476
477 if {[string compare $form_address ""]!=0} {
478 if {[string compare $form_action "Erase"]==0} {
479 append buffer "<code style=\"white-space: nowrap;\">"
480 append console [encode [capture_catch {
481 reset init
482 flash erase_address $form_address $form_length}]]
483 append buffer </code>
484 }
485 }
486
487
488 </tcl>
489
490 <form action="erase.tcl" method="post">
491 <table>
492 <tr><td class="formtext" style="padding-right:10px;">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
493 <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer $form_length</tcl>"></td></tr>
494 </td></tr>
495 </table>
496 <table>
497 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
498 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
499 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
500 </table>
501
502 <input type="submit" name="form_action" value="Erase"><br>
503
504
505 </form>
506
507
508
509 ]]></markup_code>
510 <right_column>
511 <![CDATA[
512 <p>Note that flash programming will erase flash if required.<p/>
513 <p>Reset and init CPU, then erase address range.</p>
514 <p>The length field is specified in number of bytes.</p>
515 ]]>
516 </right_column>
517
518 </pagetext>
519 </page>
520
521
522 <page lang="eng">
523 <outfile>run.tcl</outfile>
524 <menulink>run.tcl</menulink>
525 <pageheading>Run program</pageheading>
526 <level2parent>flashinfo.tcl</level2parent>
527 <pagetext>
528 <markup_code><![CDATA[
529
530
531
532 <tcl>
533
534 set form_address [formfetch form_address]
535 set form_action [formfetch form_action]
536
537 if {[string compare $form_action "Run from address"]==0} {
538 append console [encode [capture_catch "halt"]]
539 append console [encode [capture_catch "wait_halt"]]
540 append console [encode [capture_catch "resume $form_address"]]
541 }
542
543 if {[string compare $form_action "Halt"]==0} {
544 append console [encode [capture_catch "halt"]]
545 append console [encode [capture_catch "wait_halt"]]
546 }
547
548 if {[string compare $form_action "Reset and run"]==0} {
549 append console [encode [capture_catch "reset run"]]
550 }
551
552 if {[string compare $form_action "Reset and init"]==0} {
553 append console [encode [capture_catch "reset init"]]
554 }
555
556 append console [encode [capture_catch poll]]
557
558 </tcl>
559
560 <form action="run.tcl" method="post">
561 <table>
562 <tr><td class="formtext" style="padding-right:10px;">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
563 </td></tr>
564 </table>
565 <table>
566 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
567 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
568 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
569 </table>
570
571 <input type="submit" name="form_action" value="Reset and run"> <input type="submit" name="form_action" value="Run from address"> <input type="submit" name="form_action" value="Halt"><input type="submit" name="form_action" value="Reset and init"><br>
572 </form>
573
574
575
576 ]]></markup_code>
577 <right_column>
578 <![CDATA[
579 <p>Reset and run - reset CPU and let it run.</p>
580 <p>Halt - halt CPU.</p>
581 <p>Run from address - halt CPU and resume from address. Default is resume from current address.</p>
582 <p>Reset and init - reset CPU and run init script.</p>
583 ]]>
584 </right_column>
585
586 </pagetext>
587 </page>
588
589
590 <page lang="eng">
591 <outfile>browsemem.tcl</outfile>
592 <menutext>Memory</menutext>
593 <menulink>browsemem.tcl</menulink>
594 <pageheading>Browse / Edit Memory</pageheading>
595 <level2parent>browsemem.tcl</level2parent>
596 <level2menu href="browsemem.tcl" title="Browse / Edit" titlestyle="color:#4e6627;">
597 <![CDATA[
598 Browse and edit memory.
599 ]]>
600 </level2menu>
601 <level2menu href="downloadmem.tcl" title="Download" titlestyle="color:#4e6627;">
602 <![CDATA[
603 Copy memory range to developer machine
604 ]]>
605 </level2menu>
606
607 <pagetext>
608 <markup_code><![CDATA[
609
610
611
612 <tcl>
613
614 set form_address [formfetch form_address]
615 set form_length [formfetch form_length]
616 set form_type [formfetch form_type]
617 set form_action [formfetch form_action]
618 set form_value [formfetch form_value]
619
620 if {[string compare $form_length ""]==0} {
621 set form_length 0
622 }
623 if {$form_length<=0} {
624 set form_length 0x80
625 }
626 if {$form_length>0x1000} {
627 set form_length 0x1000
628 }
629
630 if {[string compare $form_type ""]==0} {
631 set form_type mdw
632 }
633
634 if {[string compare $form_type "mdw"]==0} {
635 set wordsize 4
636 set modify_cmd mww
637 }
638 if {[string compare $form_type "mdh"]==0} {
639 set wordsize 2
640 set modify_cmd mwh
641 }
642 if {[string compare $form_type "mdb"]==0} {
643 set wordsize 1
644 set modify_cmd mwb
645 }
646
647
648
649
650 if {[string compare $form_address ""]!=0} {
651 if {[string compare $form_action "Previous"]==0} {
652 # Kludge! Work around problems parsing hex in Jim Tcl expressions
653 incr form_address ; set form_address [expr $form_address-1]
654 if {$form_address-$form_length>0} {
655 set form_address "0x[tohex [expr $form_address-$form_length]]"
656 } else {
657 set form_address "0x0"
658 }
659 }
660 if {[string compare $form_action "Next"]==0} {
661 # Kludge! Work around problems parsing hex in Jim Tcl expressions
662 incr form_address ; set form_address [expr $form_address-1]
663 set form_address "0x[tohex [expr $form_address+$form_length]]"
664 }
665 if {[string compare $form_action "Modify"]==0} {
666 append console [capture_catch "$modify_cmd $form_address $form_value"]
667 }
668 if {[string compare $form_action "Fill"]==0} {
669 append console [capture_catch "$modify_cmd $form_address $form_value $form_length"]
670 }
671 }
672
673
674 </tcl>
675
676 <form action="browsemem.tcl" method="post">
677 <table>
678 <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
679 <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer "0x[tohex $form_length]"</tcl>"></td></tr>
680 <tr><td class="formtext">Value</td><td><input type="text" name="form_value" value="<tcl>append buffer $form_value</tcl>"></td>
681 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Modify"></td>
682 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Fill"></td></tr>
683 <tr><td class="formtext">Type</td><td style="padding-top:1px;">
684 <select name="form_type">
685 <option
686 <tcl>if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} } </tcl> value ="mdb">8 bit
687 </option>
688 <option
689 <tcl>if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} } </tcl> value ="mdh">16 bit
690 </option>
691 <option
692 <tcl>if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} } </tcl>value ="mdw">32 bit
693 </option>
694 </select>
695
696 </td></tr>
697 </table>
698 <table>
699 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
700 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
701 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
702 </table>
703
704 <table><tr>
705 <td><input type="submit" name="form_action" value="Refresh"></td>
706 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Previous" ></td>
707 <td class="buttonspacesmall">&nbsp</td><td><input type="submit" name="form_action" value="Next" ></td>
708 </tr></table>
709 <br>
710
711 </form>
712 <p>
713 <div class="fontbigger">Memory:</div><p>
714 <code style="white-space: nowrap; font-size:11px;font:courier new;">
715 <tcl>
716 if {[string compare $form_address ""]!=0} {
717 append console [encode [capture_catch halt]]
718 append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]]
719 }
720 </tcl>
721 </code>
722
723
724
725
726
727 ]]></markup_code>
728 <right_column>
729 <![CDATA[
730 <p>Browse and edit target memory.<br>
731 Length is in bytes, maximum 4096 bytes.</p>
732 <p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
733 <p>CPU will be halted if required.</p>
734 <p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
735 <p><b>Fill</b> - Will fill the specified region with the specified value.</p>
736 <p><b>Refresh</b> - Display the content of the specified memory area.</p>
737 ]]>
738 </right_column>
739
740 </pagetext>
741 </page>
742
743
744
745
746 <page lang="eng">
747 <outfile>downloadmem.tcl</outfile>
748 <level2parent>browsemem.tcl</level2parent>
749 <pageheading>Download Memory Range</pageheading>
750 <pagetext>
751 <markup_code><![CDATA[
752 <tcl>
753 set form_address [formfetch form_address]
754 set form_length [formfetch form_length]
755 set form_action [formfetch form_action]
756 </tcl>
757 <form action="downloadmem.tcl" method="post">
758 <table>
759 <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
760 <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer $form_length</tcl>"></td></tr>
761 </td></tr>
762 </table>
763
764 <table>
765 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
766 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
767 <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
768 </table>
769
770 <input type="submit" value="Download" name="form_action">
771
772
773 </form>
774 <tcl>
775 if {[string compare $form_action "Download"]==0} {
776 append console [encode [capture_catch "reset init"]]
777 append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]]
778 </tcl>
779 <form action="../dump.bin" target="_blank">
780 <input type="submit" name="form_action" value="Save downloaded memory">
781 </form>
782 <tcl>
783 }
784
785 </tcl>
786
787
788
789 ]]></markup_code>
790 <right_column>
791 <![CDATA[
792 Download memory to ZY1000 from target. <br>
793 <b>Note</b> that download memory can take
794 a long time(potentially minutes for megabytes at low JTAG clk speeds).
795 <p/>
796 Once the memory is downloaded a link is available on the page to download
797 the file from ZY1000 to your PC.
798 ]]>
799 </right_column>
800 </pagetext>
801
802 </page>
803
804
805
806 <page lang="eng">
807 <outfile>openocd.tcl</outfile>
808 <menutext>OpenOCD</menutext>
809 <menulink>openocd.tcl</menulink>
810 <pageheading>Run Command</pageheading>
811 <level2parent>openocd.tcl</level2parent>
812 <level2menu href="openocd.tcl" title="Run Command" titlestyle="color:#4e6627;">
813 </level2menu>
814 <level2menu href="guiupload.tcl" title="Upload File to ZY1000" titlestyle="color:#4e6627;">
815 <![CDATA[
816 Upload file to ZY1000
817 ]]>
818 </level2menu>
819
820 <pagetext>
821 <markup_code><![CDATA[
822
823 <tcl>
824 set form_command [formfetch form_command]
825
826 set form_edittext ""
827 if {[string length $form_command]>0} {
828 catch {capture_catch {eval "$form_command"}} form_edittext
829 }
830
831 append buffer {<form action="openocd.tcl" method="post">} "\n"
832 append buffer {Command<br>}
833 append buffer {<textarea style="overflow:auto;" rows="5" cols="65" name="form_command" wrap="off">}
834 append buffer [to_textarea $form_command]
835 append buffer {</textarea><br>}
836 append buffer {<input type="submit" value="Run" name="form_action" ><br>}
837 append buffer {<textarea style="overflow:auto;" rows="21" cols="65" name="form_edittext" readonly=1 wrap="off">}
838 append buffer [to_textarea $form_edittext]
839 append buffer {</textarea><br>}
840
841 append buffer {</form>} "\n"
842
843 </tcl>
844
845 ]]></markup_code>
846
847 <right_column>
848 <![CDATA[
849 <p>Run tcl statement(s). Add "ocd_" prefix to OpenOCD commands otherwise
850 there will be no output, e.g. "reset init" use "ocd_reset init".
851 <p/>
852 <p><a href="/ram/log">Click here to download log</a>.</p>
853 <p>To download log you can also use commands like "wget http://<tcl>append buffer [ip]</tcl>/ram/log", or
854 point your web browser to said address.</p>
855 <p>
856 You can also execute tcl commands using curl from your developer PC:
857 </p>
858 <code>
859 curl --form form_command=ocd_version <tcl>append buffer [ip]</tcl>runtcl.tcl
860 </code>
861
862 ]]>
863 </right_column>
864 </pagetext>
865 </page>
866
867
868
869 <page lang="eng">
870 <outfile>guiupload.tcl</outfile>
871 <level2parent>openocd.tcl</level2parent>
872 <pageheading>Upload File to ZY1000</pageheading>
873 <pagetext>
874 <markup_code><![CDATA[
875
876 <tcl>
877 set form_filename [formfetch form_filename];
878 set form_action [formfetch form_action];
879 #set form_filecontent [formfetch form_filecontent];
880
881 append buffer {<form enctype="multipart/form-data" action="guiupload.tcl" method="post">}
882 append buffer <br>
883 if {[string compare $form_action "Upload"]==0} {
884 if {[catch {writeform form_filecontent $form_filename} result]==0} {
885 append buffer [encode $result]
886 } else {
887 append buffer Wrote $form_filename
888 }
889 }
890
891 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>}
892 append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}
893 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>}
894 append buffer {<input type="submit" name="form_action" value="Upload" ><br> }
895 append buffer {</form>}
896
897 </tcl>
898
899 ]]></markup_code>
900 <right_column>
901 <![CDATA[
902 <p>The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing
903 embedded into the firmware.</p>
904
905 <p>Use "/ram" to store temporary files.<p/>
906
907 <p>
908 You can browse filing systems and download files by pointing your web browser to:
909 <ul>
910 <li><a href="/ram" target="_blank">/ram</a>
911 <li><a href="/rom" target="_blank">/rom</a>
912 <li><a href="/config" target="_blank">/config</a>
913 </ul>
914 </p>
915
916 <p>
917 You can also upload files using e.g. curl from the command line. Example:
918 </p>
919 <code>
920 curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf <tcl>append buffer [ip]</tcl>upload.tcl
921 </code>
922 <p>
923 If you have a tftp server installed on your development PC, you can access
924 files on your developer PC using a /tftp/ip/ prefix to the file to be accessed
925 on your developer PC. Note that if you do not increase the default packet
926 size for your tftp server, then the performance will be very poor. Normal
927 performance is about 500-600kBytes/s.
928 </p>
929 <code>
930 cp /tftp/10.0.0.106/build/src/openocd /ram/test
931 </code>
932
933 ]]>
934 </right_column>
935 </pagetext>
936
937 </page>
938
939
940
941 <page lang="eng">
942 <outfile>targets.tcl</outfile>
943 <level2parent>documentation.tcl</level2parent>
944 <pageheading>Target config quick start guide</pageheading>
945 <pagetext>
946 <markup_code><![CDATA[
947
948 A target needs an openocd.cfg file. This config file sets up
949 the CPU, flash and reset init script. Either ZY1000 ships with an
950 openocd.cfg file for your target or you need to take an existing
951 config file and modify it for your needs.
952 <p>
953 The reset init script is crucial. It will set up e.g. MMU, chip
954 select registers, etc. after a reset. The init.cfg (reset init script)
955 is embedded into the openocd.cfg file in the sampls Zylin provides.
956 <p>
957 Writing an openocd.cfg from scratch is a non-trivial exercise, but
958 fortunally it only has to be done once for a target and afterwards it
959 rarely if ever needs to be changed.
960
961
962 ]]></markup_code>
963 <right_column>
964
965 Quick start guide on how to configure a target.
966 </right_column>
967 </pagetext>
968
969
970 </page>
971
972
973
974
975
976 <page lang="eng">
977 <menulink>index.tcl</menulink>
978 <level2parent>index.tcl</level2parent>
979 <outfile>terminal.tcl</outfile>
980 <pageheading>UART forwarding</pageheading>
981 <pagetext>
982 <markup_code><![CDATA[
983 <tcl>
984 set form_baudrate [formfetch form_baudrate]
985 if {[string length $form_baudrate]==0} {
986 set form_baudrate [ocd_uart]
987 set form_baudrate [string range $form_baudrate 0 [expr [string length $form_baudrate]-2]]
988 }
989 set form_action [formfetch form_action]
990 </tcl>
991 <form action="terminal.tcl" method="post">
992 Target baudrate:
993 <select name="form_baudrate">
994 <tcl>
995 foreach i {9600 19200 38400 57600 115200} {
996 </tcl>
997 <option <tcl>if {[string compare $form_baudrate $i]==0} { append buffer {selected="selected"} } </tcl>
998 value ="<tcl>append buffer $i</tcl>"><tcl>append buffer $i</tcl></option>
999 <tcl>
1000 }
1001 </tcl>
1002 </select>
1003
1004 <p>
1005 <input type="submit" name="form_action" value="Set baudrate" >
1006 </form>
1007 <tcl>
1008 if {[string compare $form_action "Set baudrate"]==0} {
1009 append console [encode [ocd_uart $form_baudrate]]
1010 }
1011 </tcl>
1012
1013 <h2>Simple UART</h2>
1014 This terminal window is purely for illustrative purposes. Use telnet or a terminal program
1015 to talk to the target over TCP/IP for anything but trivial case of reading/writing a few
1016 lines of texts in simple tests.
1017 <p>
1018 ]]></markup_code>
1019 <right_column>
1020 <![CDATA[
1021 Serial port data to target is forwarded(both directions) in the simple terminal window
1022 to the left. Alternatively you can <b>telnet <tcl>append buffer [ip]</tcl> 5555</b>
1023 or connect via TCP/IP from e.g. HyperTerminal.
1024 <p>
1025 Type "help uart" in telnet for information on how to set uart speed for target. Normally
1026 the uart speed is set from the target configuration script by adding an "uart N", where
1027 N is the baudrate.
1028 ]]>
1029 </right_column>
1030 </pagetext>
1031
1032 </page>
1033
1034
1035
1036 </language>
1037
1038 </website>

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)