You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

460 lines
13 KiB

  1. # converted to .tcl by html2tcl.tcl
  2. set buffer ""
  3. append buffer {
  4. <html xmlns="http://www.w3.org/TR/REC-html40">
  5. <head>
  6. <title>OpenOCD debugger</title>
  7. <meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
  8. <link type="text/css" rel="stylesheet" href="menuweb.css"/>
  9. </head>
  10. }
  11. set console ""
  12. set upload_filename /ram/upload
  13. append buffer {
  14. <body style="margin:0px;">
  15. <div style="width:974px;height:85px;">
  16. <div style="float:left;position:relative;left:32px;width:478px;">
  17. <a href="/">
  18. OpenOCD
  19. </a>
  20. </div>
  21. <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
  22. <div style="position:relative;left:15px;top:4px;" class="textlight">
  23. }
  24. append buffer [capture version]
  25. append buffer {
  26. </div>
  27. </div>
  28. </div>
  29. <table style="padding:0px;border-collapse:collapse;">
  30. <tr>
  31. <td style="width:33px;">
  32. <div style="width:20px;height:510px;">
  33. &nbsp;
  34. </div>
  35. </td>
  36. <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
  37. <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
  38. <tr style="height:59px;">
  39. <td/>
  40. </tr>
  41. <tr>
  42. <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
  43. <div style="position:relative;left:10px;top:10px;font-weight:bold;">
  44. <a href="flashinfo.tcl" style="">Info</a>
  45. </div>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
  50. <div style="position:relative;left:10px;top:10px;font-weight:bold;">
  51. <a href="erase.tcl" style="">Erase</a>
  52. </div>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
  57. <div style="position:relative;left:10px;top:10px;font-weight:bold;">
  58. <a href="flash.tcl" style="font-weight: bold;">Program / Verify</a>
  59. </div>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
  64. <div style="position:relative;left:10px;top:10px;font-weight:bold;">
  65. <a href="production.tcl" style="">Production</a>
  66. </div>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
  71. </tr>
  72. <tr>
  73. <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
  74. </tr>
  75. <tr>
  76. <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
  77. </tr>
  78. </table>
  79. </td>
  80. <td style="vertical-align:top;padding:0px;height:100%">
  81. <table style="padding:0px;border-collapse:collapse;height:100%;">
  82. <tr>
  83. <td>
  84. <table style="padding:0px;border-collapse:collapse;">
  85. <tr>
  86. <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
  87. <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
  88. <a href="index.tcl">Config Target</a>
  89. </div>
  90. </td>
  91. <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
  92. <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
  93. <a href="flashinfo.tcl" style="font-weight: bold;">Flash</a>
  94. </div>
  95. </td>
  96. <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
  97. <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
  98. <a href="browsemem.tcl">Memory</a>
  99. </div>
  100. </td>
  101. <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
  102. <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
  103. <a href="openocd.tcl">OpenOCD</a>
  104. </div>
  105. </td>
  106. </tr>
  107. </table>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
  112. <div style="width:500px;background-color:#ffffff;height:100%;">
  113. &nbsp;
  114. </div>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
  119. <H1>Program / Verify Flash</H1>
  120. </td>
  121. </tr>
  122. <tr style="height:100%;">
  123. <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
  124. }
  125. set form_offset [formfetch form_offset]
  126. set form_action [formfetch form_action]
  127. set form_type [formfetch form_type]
  128. set post ""
  129. catch {set post $post_data} err
  130. if {[string compare $form_offset ""]==0} {
  131. set form_offset 0
  132. }
  133. if {[string compare $form_type ""]==0} {
  134. set form_type ""
  135. }
  136. append buffer {<code style="white-space: nowrap;">}
  137. set data ""
  138. append buffer {<form enctype="multipart/form-data" action="flash.tcl" method="post">}
  139. set action_reset [expr {[string length $form_action]!=0}]
  140. set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}]
  141. set action_verify [expr {[string compare $form_action "Verify"]==0 || [string compare $form_action "Flash and verify"]==0}]
  142. if {$action_reset} {
  143. append console [encode [capture_catch "reset init"]]
  144. }
  145. append buffer {
  146. </code>}
  147. append buffer {<table>}
  148. append buffer {<tr><td class="formtext">File</td><td><input type="file" name="form_filecontent"></td></tr>}
  149. append buffer "<tr><td class=\"formtext\" >Offset</td><td><input type=\"text\" name=\"form_offset\" value=\"$form_offset\"></td></tr>"
  150. append buffer {
  151. <tr><td class="formtext" style="padding-top:1px;">Type</td><td>
  152. <select name="form_type">
  153. <option
  154. }
  155. if {[string compare $form_type ""]==0} { append buffer {selected="selected"} }
  156. append buffer {
  157. value ="">auto</option>
  158. <option
  159. }
  160. if {[string compare $form_type "elf"]==0} { append buffer {selected="selected"} }
  161. append buffer {
  162. value ="elf">elf</option>
  163. <option
  164. }
  165. if {[string compare $form_type "bin"]==0} { append buffer {selected="selected"} }
  166. append buffer {
  167. value ="bin">binary</option>
  168. <option
  169. }
  170. if {[string compare $form_type "ihex"]==0} { append buffer {selected="selected"} }
  171. append buffer {
  172. value ="ihex">ihex</option>
  173. <!-- broken <option value ="s19">s19</option> -->
  174. </select>
  175. </td>
  176. </tr>
  177. </table>
  178. <table>
  179. <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
  180. <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
  181. <tr><td style="height:15px;width:535px;">&nbsp</td></tr>
  182. </table>
  183. <table><tr>
  184. <td><input type="submit" name="form_action" value="Flash" ></td>
  185. <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Flash and verify" ></td>
  186. <td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Verify" ></td>
  187. </tr></table>
  188. <p>
  189. }
  190. if {$action_flash||$action_verify} {
  191. catch {writeform form_filecontent $upload_filename} result
  192. append console [encode $result]
  193. }
  194. append buffer "<br>"
  195. if {$action_flash} {
  196. append console [encode [capture_catch "halt"]]
  197. append buffer "<b>"
  198. if {[catch {capture_catch {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} {
  199. append buffer "Flash write failed<br>"
  200. append console [encode $result]
  201. } else {
  202. append buffer [encode $result]
  203. append buffer "Flash write succeed<br>"
  204. }
  205. append buffer "</b>"
  206. }
  207. if {$action_verify} {
  208. append console [encode [capture_catch "halt"]]
  209. append buffer "<b>"
  210. if {[catch {capture_catch {eval "verify_image $upload_filename $form_offset $form_type"}} result]} {
  211. append buffer "Verify failed<br>"
  212. append console [encode $result]
  213. } else {
  214. append buffer [encode $result]
  215. append buffer "Verify succeed<br>"
  216. }
  217. append buffer "</b>"
  218. }
  219. append buffer {
  220. </form>
  221. </td>
  222. </tr>
  223. }
  224. set toggle_details [formfetch toggle_details]
  225. if {[string length $toggle_details]==0} {
  226. set toggle_details 0
  227. }
  228. set show_details [load_var show_details]
  229. if {[string length $show_details]==0} {
  230. set show_details 0
  231. }
  232. if {$toggle_details==1} {
  233. set show_details [expr 1-$show_details]
  234. save_var show_details $show_details
  235. }
  236. if {[string length $console]!=0} {
  237. append buffer {
  238. <tr style="height:100%;">
  239. <td style="height:100%;background-color:red;" colspan="6">
  240. <table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
  241. <td style="width:25px;">&nbsp;</td>
  242. }
  243. if {$show_details==1} {
  244. append buffer <
  245. append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
  246. append buffer >
  247. } else {
  248. append buffer <
  249. 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;"}
  250. append buffer >
  251. }
  252. append buffer {
  253. <a class="openocd" href="flash.tcl?toggle_details=1">
  254. }
  255. if {$show_details==1} {
  256. append buffer "Hide details"
  257. append buffer <br/>
  258. } else {
  259. append buffer {<div style="position:relative;top:7px;text-align:center;">}
  260. append buffer "Show details"
  261. append buffer {</div>}
  262. }
  263. append buffer {
  264. </a>
  265. }
  266. if {$show_details==1} {
  267. append buffer $console
  268. }
  269. append buffer {</td>}
  270. if {$show_details!=1} {
  271. append buffer {<td>&nbsp;</td>}
  272. }
  273. append buffer {
  274. <td style="width:25px;">&nbsp;</td>
  275. </table>
  276. </td>
  277. </tr>
  278. }
  279. }
  280. append buffer {
  281. <tr>
  282. <td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
  283. <div style="width:500px;background-color:#ffffff;height:100%;">
  284. &nbsp;
  285. </div>
  286. </td>
  287. </tr>
  288. </table>
  289. </td>
  290. <td style="width:6px;"/>
  291. <td style="width:245px;height:100%">
  292. <table style="padding:0px;border-collapse:collapse;height:100%;">
  293. <tr>
  294. <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
  295. <div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
  296. Documentation
  297. </div>
  298. </td>
  299. <td width="40px">
  300. &nbsp;
  301. </td>
  302. <td/>
  303. </tr>
  304. <tr>
  305. <td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
  306. </tr>
  307. <tr>
  308. <td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
  309. <a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
  310. <br/>
  311. </td>
  312. </tr>
  313. <tr>
  314. <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
  315. </tr>
  316. <tr>
  317. <td colspan="3">
  318. <table style="padding:0px;border-collapse:collapse;">
  319. <td style="background-color:#d8d7d7;width:10px;height:1px"/>
  320. <td style="background-color:#999999;width:225px; height:1px;"/>
  321. <td style="background-color:#d8d7d7;width:10px;height:1px"/>
  322. </table>
  323. </td>
  324. </tr>
  325. <tr>
  326. <td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
  327. </tr>
  328. <tr style="height:100%;">
  329. <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
  330. <p>Program and/or verify the flash on your target.</p>
  331. <p><b>Flash</b> - Halt CPU, automatically erase flash if required and program flash with image.</p>
  332. <p><b>Flash and verify</b> - Programs the flash and verifies the programmed flash content is correct.</p>
  333. <p><b>Verify</b> - Halt CPU and verify image in flash or RAM.</p>
  334. <p><b>Offset</b> - This value is added to the address of the image.<br>
  335. Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.<br>
  336. Typically 0 for elf/ihex and the address to write the image to for binary files.</p>
  337. </td>
  338. </tr>
  339. <tr>
  340. <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
  341. &nbsp;
  342. </td>
  343. </tr>
  344. </table>
  345. </td>
  346. </tr>
  347. </table>
  348. </body>
  349. </html>
  350. }
  351. start_chunked "html"
  352. write_chunked $buffer
  353. end_chunked