1 # converted to .tcl by html2tcl.tcl
24 <html xmlns="http://www.w3.org/TR/REC-html40">
26 <title>OpenOCD debugger</title>
27 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
28 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
33 set upload_filename /ram/upload
36 <body style="margin:0px;">
37 <div style="width:974px;height:85px;">
38 <div style="float:left;position:relative;left:32px;width:478px;">
43 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
44 <div style="position:relative;left:15px;top:4px;" class="textlight">
46 append buffer [capture version]
51 <table style="padding:0px;border-collapse:collapse;">
53 <td style="width:33px;">
54 <div style="width:20px;height:510px;">
58 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
59 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
60 <tr style="height:59px;">
64 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
65 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
66 <a href="flashinfo.tcl" style="">Info</a>
71 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
72 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
73 <a href="erase.tcl" style="">Erase</a>
78 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
79 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
80 <a href="flash.tcl" style="">Program / Verify</a>
85 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
86 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
87 <a href="production.tcl" style="font-weight: bold;">Production</a>
92 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
95 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
98 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
102 <td style="vertical-align:top;padding:0px;height:100%">
103 <table style="padding:0px;border-collapse:collapse;height:100%;">
106 <table style="padding:0px;border-collapse:collapse;">
108 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
109 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
110 <a href="index.tcl">Config Target</a>
113 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
114 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
115 <a href="flashinfo.tcl" style="font-weight: bold;">Flash</a>
118 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
119 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
120 <a href="browsemem.tcl">Memory</a>
123 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
124 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
125 <a href="openocd.tcl">OpenOCD</a>
133 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
134 <div style="width:500px;background-color:#ffffff;height:100%;">
140 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
144 <tr style="height:100%;">
145 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
148 set form_action [formfetch form_action]
149 set form_serialnumber [formfetch form_serialnumber]
150 append buffer [production_info]
154 <form enctype="multipart/form-data" action="production.tcl" method="post">
155 <code style="white-space: nowrap;">
158 if {[string compare $form_action "Upload firmware"]==0} {
159 set wrotedata [catch {writeform form_filecontent $upload_filename} result]
160 append buffer [encode $result]
162 append buffer "<br>Running production procedure<p>"
163 append buffer "<br>Reset and init: <br>"
165 append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]]
168 if {[string compare $form_action "Test"]==0} {
169 append buffer "<br>Running production test. Output from first 10 seconds printed below. <p>"
171 append console [encode [capture_catch {catch production_test}]]
173 if {[string compare $form_action "Power on"]==0} {
174 append console [encode [capture_catch "power on"]]
176 if {[string compare $form_action "Power off"]==0} {
177 append console [encode [capture_catch "power off"]]
184 append buffer {<p class="formtext">Firmware file(raw binary) <input type="file" name="form_filecontent"><p>}
185 append buffer {<p class="formtext">Serial number <input type="text" name="form_serialnumber"><p>}
190 <tr><td style="height:15px;width:535px;"> </td></tr>
191 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
192 <tr><td style="height:15px;width:535px;"> </td></tr>
196 <td><input type="submit" name="form_action" value="Upload firmware" ></td>
197 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Test"></td>
198 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Power on"></td>
199 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Power off">
208 set toggle_details [formfetch toggle_details]
209 if {[string length $toggle_details]==0} {
212 set show_details [load_var show_details]
213 if {[string length $show_details]==0} {
216 if {$toggle_details==1} {
217 set show_details [expr 1-$show_details]
218 save_var show_details $show_details
221 if {[string length $console]!=0} {
224 <tr style="height:100%;">
225 <td style="height:100%;background-color:red;" colspan="6">
226 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
227 <td style="width:25px;"> </td>
230 if {$show_details==1} {
232 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
236 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 <a class="openocd" href="production.tcl?toggle_details=1">
244 if {$show_details==1} {
245 append buffer "Hide details"
248 append buffer {<div style="position:relative;top:7px;text-align:center;">}
249 append buffer "Show details"
250 append buffer {</div>}
257 if {$show_details==1} {
258 append buffer $console
261 append buffer {</td>}
263 if {$show_details!=1} {
264 append buffer {<td> </td>}
268 <td style="width:25px;"> </td>
278 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
279 <div style="width:500px;background-color:#ffffff;height:100%;">
286 <td style="width:6px;"/>
287 <td style="width:245px;height:100%">
288 <table style="padding:0px;border-collapse:collapse;height:100%;">
290 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
291 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
301 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
304 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
305 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
310 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
314 <table style="padding:0px;border-collapse:collapse;">
315 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
316 <td style="background-color:#999999;width:225px; height:1px;"/>
317 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
322 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
324 <tr style="height:100%;">
325 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
327 The target script can implement the "production", "production_info" and "production_test" tcl proc's. These procedures
328 are used on this page. There are default implementations that do nothing.
330 <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>
331 <p><b>Test</b> - Power up target, run 10 second target test. Output is provided via the DCC output channel. </p>
332 <p><b>Power on</b> - Power on target.</p>
333 <p><b>Power off</b> - Power off target.</p>
334 <p><b>Serial number</b> - A target script can use this string in the production procedure. Type "help production" for more info.</p>
339 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
390 write_chunked $buffer