1 # converted to .tcl by html2tcl.tcl
34 <html xmlns="http://www.w3.org/TR/REC-html40">
36 <title>OpenOCD debugger</title>
37 <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
38 <link type="text/css" rel="stylesheet" href="menuweb.css"/>
43 set upload_filename /ram/upload
46 <body style="margin:0px;">
47 <div style="width:974px;height:85px;">
48 <div style="float:left;position:relative;left:32px;width:478px;">
53 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
54 <div style="position:relative;left:15px;top:4px;" class="textlight">
56 append buffer [capture version]
61 <table style="padding:0px;border-collapse:collapse;">
63 <td style="width:33px;">
64 <div style="width:20px;height:510px;">
68 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
69 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
70 <tr style="height:59px;">
74 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
75 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
76 <a href="browsemem.tcl" style="font-weight: bold;">Browse / Edit</a>
81 <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
82 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
83 <a href="downloadmem.tcl" style="">Download</a>
88 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
91 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
94 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
98 <td style="vertical-align:top;padding:0px;height:100%">
99 <table style="padding:0px;border-collapse:collapse;height:100%;">
102 <table style="padding:0px;border-collapse:collapse;">
104 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
105 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
106 <a href="index.tcl">Config Target</a>
109 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
110 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
111 <a href="flashinfo.tcl">Flash</a>
114 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
115 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
116 <a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
119 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
120 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
121 <a href="openocd.tcl">OpenOCD</a>
129 <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
130 <div style="width:500px;background-color:#ffffff;height:100%;">
136 <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
137 <H1>Browse / Edit Memory</H1>
140 <tr style="height:100%;">
141 <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
148 set form_address [formfetch form_address]
149 set form_length [formfetch form_length]
150 set form_type [formfetch form_type]
151 set form_action [formfetch form_action]
152 set form_value [formfetch form_value]
154 if {[string compare $form_length ""]==0} {
157 if {$form_length<=0} {
160 if {$form_length>0x1000} {
161 set form_length 0x1000
164 if {[string compare $form_type ""]==0} {
168 if {[string compare $form_type "mdw"]==0} {
172 if {[string compare $form_type "mdh"]==0} {
176 if {[string compare $form_type "mdb"]==0} {
184 if {[string compare $form_address ""]!=0} {
185 if {[string compare $form_action "Previous"]==0} {
186 # Kludge! Work around problems parsing hex in Jim Tcl expressions
187 incr form_address ; set form_address [expr $form_address-1]
188 if {$form_address-$form_length>0} {
189 set form_address "0x[tohex [expr $form_address-$form_length]]"
191 set form_address "0x0"
194 if {[string compare $form_action "Next"]==0} {
195 # Kludge! Work around problems parsing hex in Jim Tcl expressions
196 incr form_address ; set form_address [expr $form_address-1]
197 set form_address "0x[tohex [expr $form_address+$form_length]]"
199 if {[string compare $form_action "Modify"]==0} {
200 append console [capture_catch "$modify_cmd $form_address $form_value"]
202 if {[string compare $form_action "Fill"]==0} {
203 append console [capture_catch "$modify_cmd $form_address $form_value $form_length"]
211 <form action="browsemem.tcl" method="post">
213 <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
214 append buffer $form_address
215 append buffer {"></td></tr>
216 <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
217 append buffer "0x[tohex $form_length]"
218 append buffer {"></td></tr>
219 <tr><td class="formtext">Value</td><td><input type="text" name="form_value" value="}
220 append buffer $form_value
221 append buffer {"></td>
222 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Modify"></td>
223 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Fill"></td></tr>
224 <tr><td class="formtext">Type</td><td style="padding-top:1px;">
225 <select name="form_type">
228 if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} }
229 append buffer { value ="mdb">8 bit
233 if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} }
234 append buffer { value ="mdh">16 bit
238 if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} }
239 append buffer {value ="mdw">32 bit
246 <tr><td style="height:15px;width:535px;"> </td></tr>
247 <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
248 <tr><td style="height:15px;width:535px;"> </td></tr>
252 <td><input type="submit" name="form_action" value="Refresh"></td>
253 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Previous" ></td>
254 <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Next" ></td>
260 <div class="fontbigger">Memory:</div><p>
261 <code style="white-space: nowrap; font-size:11px;font:courier new;">
264 if {[string compare $form_address ""]!=0} {
265 append console [encode [capture_catch halt]]
266 append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]]
281 set toggle_details [formfetch toggle_details]
282 if {[string length $toggle_details]==0} {
285 set show_details [load_var show_details]
286 if {[string length $show_details]==0} {
289 if {$toggle_details==1} {
290 set show_details [expr 1-$show_details]
291 save_var show_details $show_details
294 if {[string length $console]!=0} {
297 <tr style="height:100%;">
298 <td style="height:100%;background-color:red;" colspan="6">
299 <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
300 <td style="width:25px;"> </td>
303 if {$show_details==1} {
305 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
309 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;"}
314 <a class="openocd" href="browsemem.tcl?toggle_details=1">
317 if {$show_details==1} {
318 append buffer "Hide details"
321 append buffer {<div style="position:relative;top:7px;text-align:center;">}
322 append buffer "Show details"
323 append buffer {</div>}
330 if {$show_details==1} {
331 append buffer $console
334 append buffer {</td>}
336 if {$show_details!=1} {
337 append buffer {<td> </td>}
341 <td style="width:25px;"> </td>
351 <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
352 <div style="width:500px;background-color:#ffffff;height:100%;">
359 <td style="width:6px;"/>
360 <td style="width:245px;height:100%">
361 <table style="padding:0px;border-collapse:collapse;height:100%;">
363 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
364 <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
374 <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
377 <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
378 <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
383 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
387 <table style="padding:0px;border-collapse:collapse;">
388 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
389 <td style="background-color:#999999;width:225px; height:1px;"/>
390 <td style="background-color:#d8d7d7;width:10px;height:1px"/>
395 <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
397 <tr style="height:100%;">
398 <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
400 <p>Browse and edit target memory.<br>
401 Length is in bytes, maximum 4096 bytes.</p>
402 <p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
403 <p>CPU will be halted if required.</p>
404 <p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
405 <p><b>Fill</b> - Will fill the specified region with the specified value.</p>
406 <p><b>Refresh</b> - Display the content of the specified memory area.</p>
411 <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
452 write_chunked $buffer