1 # converted to .tcl by html2tcl.tcl
61 <html xmlns
="http://www.w3.org/TR/REC-html40">
63 <title
>Zylin ZY1000 JTAG debugger
</title
>
64 <meta charset
="utf-8" content
="text/html" http-equiv
="Content-Type"/>
65 <link type
="text/css" rel
="stylesheet" href
="menuweb.css"/>
70 set upload_filename
/ram
/upload
73 <body style
="margin:0px;">
74 <div style
="width:974px;height:85px;">
75 <div style
="float:left;position:relative;left:32px;width:478px;">
77 <img src
="menu_cuts/logo_top.png" style
="border:0px;"/>
80 <div style
="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
81 <div style
="position:relative;left:15px;top:4px;" class
="textlight">
83 append buffer
[capture version
]
88 <table style
="padding:0px;border-collapse:collapse;">
90 <td style
="width:33px;">
91 <div style
="width:20px;height:510px;">
95 <td style
="vertical-align:top;height:100%;width:140px;padding:0px;">
96 <table style
="padding:0px;border-collapse:collapse;height:100%;width:140px;">
97 <tr style
="height:59px;">
101 <td style
="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
102 <div style
="position:relative;left:10px;top:10px;font-weight:bold;">
103 <a href
="zy1000.tcl" style
="">Set IP Address
</a
>
108 <td style
="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
109 <div style
="position:relative;left:10px;top:10px;font-weight:bold;">
110 <a href
="upgrade.tcl" style
="">ZY1000 Firmware
</a
>
115 <td style
="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
116 <div style
="position:relative;left:10px;top:10px;font-weight:bold;">
117 <a href
="editfile.tcl" style
="font-weight: bold;">Edit File
</a
>
122 <td style
="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
123 <div style
="position:relative;left:10px;top:10px;font-weight:bold;">
124 <a href
="support.tcl" style
="">Support Request
</a
>
129 <td style
="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
130 <div style
="position:relative;left:10px;top:10px;font-weight:bold;">
131 <a href
="log.tcl#tail" style
="">View Tail of Log
</a
>
136 <td style
="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
139 <td style
="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
142 <td style
="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
146 <td style
="vertical-align:top;padding:0px;height:100%">
147 <table style
="padding:0px;border-collapse:collapse;height:100%;">
150 <table style
="padding:0px;border-collapse:collapse;">
152 <td style
="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
153 <div style
="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
154 <a href
="/ram/cgi/index.tcl">Config Target
</a
>
157 <td style
="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
158 <div style
="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
159 <a href
="/ram/cgi/flashinfo.tcl">Flash
</a
>
162 <td style
="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
163 <div style
="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
164 <a href
="/ram/cgi/browsemem.tcl">Memory
</a
>
167 <td style
="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
168 <div style
="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
169 <a href
="/ram/cgi/openocd.tcl">OpenOCD
</a
>
172 <td style
="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
173 <div style
="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
174 <a href
="/ram/cgi/zy1000.tcl" style
="font-weight: bold;">Setup ZY1000
</a
>
182 <td style
="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan
="6">
183 <div style
="width:500px;background-color:#ffffff;height:100%;">
189 <td style
="background-color:#ffffff;text-indent:30px;height:40px;" colspan
="6">
193 <tr style
="height:100%;">
194 <td style
="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan
="6">
199 #Read a text file, edit it and write it back. Useful for interactive debugging
203 append buffer
{<form action
="editfile.tcl" method
="post">} "\n"
207 set form_edittext
[formfetch form_edittext
];
208 set form_action
[formfetch form_action
];
209 set form_filename
[formfetch form_filename
];
211 puts Action
$form_action
213 if {[string compare
$form_action "Load"]==0} {
217 set fp
[aio.
open $form_filename r
];
218 set form_edittext
[$fp read];
222 if {[string compare
$form_action "Delete"]==0} {
223 capture
"rm $form_filename"
226 set form_edittext_subst
[to_textarea
$form_edittext]
229 if {[string compare
$form_action "Save"]==0} {
231 set fp
[aio.
open $form_filename w
];
232 $fp puts [from_textarea
$form_edittext]
234 append buffer
"Wrote file $form_filename<br>"
236 append buffer
"Could not write $form_filename<br>"
243 append buffer
{<table
><tr
><td class
="formtext">File
</td
><td style
="padding-top:1px;"><input type
="text" name
="form_filename" } "\n"
244 append buffer
"value=\"$form_filename\" ></td>\n"
245 append buffer
{<td class
="buttonspacesmall"> 
</td
><td
><input type
="submit" value
="Load" name
="form_action" ></td
><td class
="buttonspacesmall"> 
</td
><td
><input type
="submit" value
="Save" name
="form_action"></td
><td class
="buttonspacesmall"> 
</td
><td
><input type
="submit" value
="Delete" name
="form_action"></td
>} "\n"
246 append buffer
{</tr
></table
>} "\n"
249 append buffer
{<textarea style
="overflow:auto;" rows
="18" cols
="65" name
="form_edittext" wrap
="off">}
250 append buffer
$form_edittext_subst
251 append buffer
{</textarea
><br
>}
253 append buffer
{</html
> } "\n"
264 set toggle_details
[formfetch toggle_details
]
265 if {[string length
$toggle_details]==0} {
268 set show_details
[load_var show_details
]
269 if {[string length
$show_details]==0} {
272 if {$toggle_details==1} {
273 set show_details
[expr 1-$show_details]
274 save_var show_details
$show_details
277 if {[string length
$console]!=0} {
280 <tr style
="height:100%;">
281 <td style
="height:100%;background-color:red;" colspan
="6">
282 <table style
="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class
="textgray">
283 <td style
="width:25px;"> 
;</td
>
286 if {$show_details==1} {
288 append buffer
{td style
="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
292 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;"}
297 <a class
="openocd" href
="/ram/cgi/editfile.tcl?toggle_details=1">
300 if {$show_details==1} {
301 append buffer
"Hide details"
304 append buffer
{<div style
="position:relative;top:7px;text-align:center;">}
305 append buffer
"Show details"
306 append buffer
{</div
>}
313 if {$show_details==1} {
314 append buffer
$console
317 append buffer
{</td
>}
319 if {$show_details!=1} {
320 append buffer
{<td
> 
;</td
>}
324 <td style
="width:25px;"> 
;</td
>
334 <td style
="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan
="6">
335 <div style
="width:500px;background-color:#ffffff;height:100%;">
342 <td style
="width:6px;"/>
343 <td style
="width:245px;height:100%">
344 <table style
="padding:0px;border-collapse:collapse;height:100%;">
346 <td style
="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
347 <div style
="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class
="textgray">
357 <td style
="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan
="3"/>
360 <td style
="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan
="3">
361 <a target
="_blank" href
="http://www.zylin.com/zy1000/ZY1000_Quick_Start_Guide.pdf">Quick Start Manual
</a
>
363 <a target
="_blank" href
="http://www.zylin.com/zy1000/openocd.pdf">OpenOCD Manual
</a
>
365 <a target
="_blank" href
="http://www.zylin.com/zy1000_contact.html">Contact Zylin AS
</a
>
369 <td style
="background-color:#d8d7d7;height:15px;" colspan
="3"/>
373 <table style
="padding:0px;border-collapse:collapse;">
374 <td style
="background-color:#d8d7d7;width:10px;height:1px"/>
375 <td style
="background-color:#999999;width:225px; height:1px;"/>
376 <td style
="background-color:#d8d7d7;width:10px;height:1px"/>
381 <td style
="background-color:#d8d7d7;height:15px;" colspan
="3"/>
383 <tr style
="height:100%;">
384 <td style
="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan
="3" class
="textgray">
386 Edit any
file on the ZY1000 by typing in the
387 filename and pressing Load.
389 <table style
="line-height:17px;"><tr
>
390 <td
><a href
="/ram" target
="_blank">Browse files on
/ram
</a
><br
>
391 <a href
="/config" target
="_blank">Browse files on
/config
</a
><br
>
392 <a href
="/rom" target
="_blank">Browse files on
/rom
</a
></td
>
398 <td style
="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan
="3">
408 <img border
="0" src
="menu_cuts/logo_bottom.png"/>
434 write_chunked
$buffer