1 # converted to .tcl by html2tcl.tcl
\r
26 <html xmlns="http://www.w3.org/TR/REC-html40">
\r
28 <title>OpenOCD debugger</title>
\r
29 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
\r
30 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
\r
35 set upload_filename /ram/upload
\r
38 <body style="margin:0px;">
\r
39 <div style="width:974px;height:85px;">
\r
40 <div style="float:left;position:relative;left:32px;width:478px;">
\r
45 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
\r
46 <div style="position:relative;left:15px;top:4px;" class="textlight">
\r
48 append buffer [capture version]
\r
53 <table style="padding:0px;border-collapse:collapse;">
\r
55 <td style="width:33px;">
\r
56 <div style="width:20px;height:510px;">
\r
60 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
\r
61 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
\r
62 <tr style="height:59px;">
\r
66 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
\r
67 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
\r
68 <a href="flashinfo.tcl" style="">Info</a>
\r
73 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
\r
74 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
\r
75 <a href="erase.tcl" style="">Erase</a>
\r
80 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
\r
81 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
\r
82 <a href="flash.tcl" style="">Program / Verify</a>
\r
87 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
\r
88 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
\r
89 <a href="production.tcl" style="font-weight: bold;">Production</a>
\r
94 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
\r
97 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
\r
100 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
\r
104 <td style="vertical-align:top;padding:0px;height:100%">
\r
105 <table style="padding:0px;border-collapse:collapse;height:100%;">
\r
108 <table style="padding:0px;border-collapse:collapse;">
\r
110 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
\r
111 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
\r
112 <a href="index.tcl">Config Target</a>
\r
115 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
\r
116 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
\r
117 <a href="flashinfo.tcl" style="font-weight: bold;">Flash</a>
\r
120 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
\r
121 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
\r
122 <a href="browsemem.tcl">Memory</a>
\r
125 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
\r
126 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
\r
127 <a href="openocd.tcl">OpenOCD</a>
\r
135 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
\r
136 <div style="width:500px;background-color:#ffffff;height:100%;">
\r
142 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
\r
143 <H1>Production</H1>
\r
146 <tr style="height:100%;">
\r
147 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
\r
150 set form_action [formfetch form_action]
\r
151 set form_serialnumber [formfetch form_serialnumber]
\r
152 append buffer [production_info]
\r
156 <form enctype="multipart/form-data" action="production.tcl" method="post">
\r
157 <code style="white-space: nowrap;">
\r
160 if {[string compare $form_action "Upload firmware"]==0} {
\r
161 set wrotedata [catch {writeform form_filecontent $upload_filename} result]
\r
162 append buffer [encode $result]
\r
163 if {$wrotedata==0} {
\r
164 append buffer "<br>Running production procedure<p>"
\r
165 append buffer "<br>Reset and init: <br>"
\r
167 append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]]
\r
170 if {[string compare $form_action "Test"]==0} {
\r
171 append buffer "<br>Running production test. Output from first 10 seconds printed below. <p>"
\r
173 append console [encode [capture_catch {catch production_test}]]
\r
175 if {[string compare $form_action "Power on"]==0} {
\r
176 append console [encode [capture_catch "power on"]]
\r
178 if {[string compare $form_action "Power off"]==0} {
\r
179 append console [encode [capture_catch "power off"]]
\r
186 append buffer {<p class="formtext">Firmware file(raw binary) <input type="file" name="form_filecontent"><p>}
\r
187 append buffer {<p class="formtext">Serial number <input type="text" name="form_serialnumber"><p>}
\r
192 <tr><td style="height:15px;width:535px;"> </td></tr>
\r
193 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
\r
194 <tr><td style="height:15px;width:535px;"> </td></tr>
\r
198 <td><input type="submit" name="form_action" value="Upload firmware" ></td>
\r
199 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Test"></td>
\r
200 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Power on"></td>
\r
201 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Power off">
\r
210 set toggle_details [formfetch toggle_details]
\r
211 if {[string length $toggle_details]==0} {
\r
212 set toggle_details 0
\r
214 set show_details [load_var show_details]
\r
215 if {[string length $show_details]==0} {
\r
218 if {$toggle_details==1} {
\r
219 set show_details [expr 1-$show_details]
\r
220 save_var show_details $show_details
\r
223 if {[string length $console]!=0} {
\r
226 <tr style="height:100%;">
\r
227 <td style="height:100%;background-color:red;" colspan="6">
\r
228 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
\r
229 <td style="width:25px;"> </td>
\r
232 if {$show_details==1} {
\r
234 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
\r
238 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;"}
\r
243 <a class="openocd" href="production.tcl?toggle_details=1">
\r
246 if {$show_details==1} {
\r
247 append buffer "Hide details"
\r
248 append buffer <br/>
\r
250 append buffer {<div style="position:relative;top:7px;text-align:center;">}
\r
251 append buffer "Show details"
\r
252 append buffer {</div>}
\r
259 if {$show_details==1} {
\r
260 append buffer $console
\r
263 append buffer {</td>}
\r
265 if {$show_details!=1} {
\r
266 append buffer {<td> </td>}
\r
270 <td style="width:25px;"> </td>
\r
280 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
\r
281 <div style="width:500px;background-color:#ffffff;height:100%;">
\r
288 <td style="width:6px;"/>
\r
289 <td style="width:245px;height:100%">
\r
290 <table style="padding:0px;border-collapse:collapse;height:100%;">
\r
292 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
\r
293 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
\r
303 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
\r
306 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
\r
307 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
\r
312 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
\r
316 <table style="padding:0px;border-collapse:collapse;">
\r
317 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
\r
318 <td style="background-color:#999999;width:225px; height:1px;"/>
\r
319 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
\r
324 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
\r
326 <tr style="height:100%;">
\r
327 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
\r
329 The target script can implement the "production", "production_info" and "production_test" tcl proc's. These procedures
\r
330 are used on this page. There are default implementations that do nothing.
\r
332 <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>
\r
333 <p><b>Test</b> - Power up target, run 10 second target test. Output is provided via the DCC output channel. </p>
\r
334 <p><b>Power on</b> - Power on target.</p>
\r
335 <p><b>Power off</b> - Power off target.</p>
\r
336 <p><b>Serial number</b> - A target script can use this string in the production procedure. Type "help production" for more info.</p>
\r
341 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
\r
391 start_chunked "html"
\r
392 write_chunked $buffer
\r