<?xml version = "1.0" encoding="iso-8859-1" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="plaintext.xsl"?>
<website>
<?xml version = "1.0" encoding="iso-8859-1" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="plaintext.xsl"?>
<website>
<pageheading>OpenOCD debugger</pageheading>
<level2parent>index.tcl</level2parent>
<level2menu href="index.tcl" title="Target Status" titlestyle="color:#4e6627;">
</level2menu>
<pageheading>OpenOCD debugger</pageheading>
<level2parent>index.tcl</level2parent>
<level2menu href="index.tcl" title="Target Status" titlestyle="color:#4e6627;">
</level2menu>
<table>
<tr><td style="height:10px;width:535px;"> </td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<table>
<tr><td style="height:10px;width:535px;"> </td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
if {[string compare $form_action "Halt"]==0} {
append console [encode [capture_catch "halt"]]
}
if {[string compare $form_action "Resume"]==0} {
append console [encode [capture_catch "resume"]]
}
if {[string compare $form_action "Halt"]==0} {
append console [encode [capture_catch "halt"]]
}
if {[string compare $form_action "Resume"]==0} {
append console [encode [capture_catch "resume"]]
}
if {[string compare $form_action "Reset and run"]==0} {
append console [encode [capture_catch "reset run"]]
}
if {[string compare $form_action "Reset and run"]==0} {
append console [encode [capture_catch "reset run"]]
}
if {[string compare $form_action "Power on"]==0} {
append console [encode [capture_catch "power on"]]
}
if {[string compare $form_action "Power on"]==0} {
append console [encode [capture_catch "power on"]]
}
<table><tr>
<td><input type="submit" name="form_action" value="Reset and run"></td>
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Halt"></td>
<table><tr>
<td><input type="submit" name="form_action" value="Reset and run"></td>
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Halt"></td>
<p><b>Current target</b> - selected target configuration. <br>
<p><b>Startup</b> - whether or not the target script ran to completion. Note
that even if the target is disconnected, powered down or unresponsive, the
startup script will still run to completion. Startup - OK does not mean
that the target is fully operational, simply that the configuration script
<p><b>Current target</b> - selected target configuration. <br>
<p><b>Startup</b> - whether or not the target script ran to completion. Note
that even if the target is disconnected, powered down or unresponsive, the
startup script will still run to completion. Startup - OK does not mean
that the target is fully operational, simply that the configuration script
See log for details. <br>
<p><b>Target power</b> - Detects power on target. <br>
If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p>
<p>Type "help power" in telnet for command to control power relay.</p>
]]></markup_code>
</right_column>
See log for details. <br>
<p><b>Target power</b> - Detects power on target. <br>
If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p>
<p>Type "help power" in telnet for command to control power relay.</p>
]]></markup_code>
</right_column>
A target needs an openocd.cfg file. This config file sets up
the CPU, flash and reset init script. Either OpenOCD ships with an
openocd.cfg file for your target or you need to take an existing
config file and modify it for your needs.
A target needs an openocd.cfg file. This config file sets up
the CPU, flash and reset init script. Either OpenOCD ships with an
openocd.cfg file for your target or you need to take an existing
config file and modify it for your needs.
The reset init script is crucial. It will set up e.g. MMU, chip
select registers, etc. after a reset. The init.cfg (reset init script)
is embedded into the openocd.cfg file in the sampls OpenOCD provides.
The reset init script is crucial. It will set up e.g. MMU, chip
select registers, etc. after a reset. The init.cfg (reset init script)
is embedded into the openocd.cfg file in the sampls OpenOCD provides.
Writing an openocd.cfg from scratch is a non-trivial exercise, but
fortunally it only has to be done once for a target and afterwards it
rarely if ever needs to be changed.
Writing an openocd.cfg from scratch is a non-trivial exercise, but
fortunally it only has to be done once for a target and afterwards it
rarely if ever needs to be changed.
<pageheading>Flash Information</pageheading>
<level2parent>flashinfo.tcl</level2parent>
<level2menu href="flashinfo.tcl" title="Info" titlestyle="color:#4e6627;">
<pageheading>Flash Information</pageheading>
<level2parent>flashinfo.tcl</level2parent>
<level2menu href="flashinfo.tcl" title="Info" titlestyle="color:#4e6627;">
<code style="white-space: nowrap;">
<tcl>
set flash_return [ocd_flash_banks]
if {[llength $flash_return]!=0} {
append buffer [encode [flash banks]]
<code style="white-space: nowrap;">
<tcl>
set flash_return [ocd_flash_banks]
if {[llength $flash_return]!=0} {
append buffer [encode [flash banks]]
set form_action [formfetch form_action]
if {[string compare $form_action "Reset CPU and probe flash"]==0} {
append console [encode [capture_catch "reset init"]]
set form_action [formfetch form_action]
if {[string compare $form_action "Reset CPU and probe flash"]==0} {
append console [encode [capture_catch "reset init"]]
<input type="submit" name="form_action" value="Reset CPU and probe flash">
</form>
<tcl>
foreach a [ocd_flash_banks] {
append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: "
</tcl>
<input type="submit" name="form_action" value="Reset CPU and probe flash">
</form>
<tcl>
foreach a [ocd_flash_banks] {
append buffer "Flash bank at [format "0x%08x size 0x%08x" $a(base) $a(size)]: "
</tcl>
<input type="hidden" name="form_address" value="<tcl>append buffer [format "0x%08x" $a(base)]</tcl>">
<input type="hidden" name="form_length" value="<tcl>append buffer [format "0x%08x" $a(size)]</tcl>">
<input type="hidden" name="form_address" value="<tcl>append buffer [format "0x%08x" $a(base)]</tcl>">
<input type="hidden" name="form_length" value="<tcl>append buffer [format "0x%08x" $a(size)]</tcl>">
set form_offset [formfetch form_offset]
set form_action [formfetch form_action]
set form_type [formfetch form_type]
set form_offset [formfetch form_offset]
set form_action [formfetch form_action]
set form_type [formfetch form_type]
-
- set action_reset [expr {[string length $form_action]!=0}]
- set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}]
+
+ set action_reset [expr {[string length $form_action]!=0}]
+ set action_flash [expr {[string compare $form_action "Flash"]==0 || [string compare $form_action "Flash and verify"]==0}]
append buffer {<table>}
append buffer {<tr><td class="formtext">File</td><td><input type="file" name="form_filecontent"></td></tr>}
append buffer "<tr><td class=\"formtext\" >Offset</td><td><input type=\"text\" name=\"form_offset\" value=\"$form_offset\"></td></tr>"
append buffer {<table>}
append buffer {<tr><td class="formtext">File</td><td><input type="file" name="form_filecontent"></td></tr>}
append buffer "<tr><td class=\"formtext\" >Offset</td><td><input type=\"text\" name=\"form_offset\" value=\"$form_offset\"></td></tr>"
- <option
- <tcl>if {[string compare $form_type ""]==0} { append buffer {selected="selected"} } </tcl>
- value ="">auto</option>
- <option
- <tcl>if {[string compare $form_type "elf"]==0} { append buffer {selected="selected"} } </tcl>
- value ="elf">elf</option>
- <option
- <tcl>if {[string compare $form_type "bin"]==0} { append buffer {selected="selected"} } </tcl>
- value ="bin">binary</option>
- <option
- <tcl>if {[string compare $form_type "ihex"]==0} { append buffer {selected="selected"} } </tcl>
- value ="ihex">ihex</option>
- <!-- broken <option value ="s19">s19</option> -->
+ <option
+ <tcl>if {[string compare $form_type ""]==0} { append buffer {selected="selected"} } </tcl>
+ value ="">auto</option>
+ <option
+ <tcl>if {[string compare $form_type "elf"]==0} { append buffer {selected="selected"} } </tcl>
+ value ="elf">elf</option>
+ <option
+ <tcl>if {[string compare $form_type "bin"]==0} { append buffer {selected="selected"} } </tcl>
+ value ="bin">binary</option>
+ <option
+ <tcl>if {[string compare $form_type "ihex"]==0} { append buffer {selected="selected"} } </tcl>
+ value ="ihex">ihex</option>
+ <!-- broken <option value ="s19">s19</option> -->
<table>
<tr><td style="height:15px;width:535px;"> </td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<table>
<tr><td style="height:15px;width:535px;"> </td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<table><tr>
<td><input type="submit" name="form_action" value="Flash" ></td>
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Flash and verify" ></td>
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Verify" ></td>
</tr></table>
<table><tr>
<td><input type="submit" name="form_action" value="Flash" ></td>
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Flash and verify" ></td>
<td class="buttonspacesmall"></td><td><input type="submit" name="form_action" value="Verify" ></td>
</tr></table>
if {$action_flash||$action_verify} {
catch {writeform form_filecontent $upload_filename} result
append console [encode $result]
if {$action_flash||$action_verify} {
catch {writeform form_filecontent $upload_filename} result
append console [encode $result]
<right_column>
<![CDATA[
<p>Program and/or verify the flash on your target.</p>
<p><b>Flash</b> - Halt CPU, automatically erase flash if required and program flash with image.</p>
<p><b>Flash and verify</b> - Programs the flash and verifies the programmed flash content is correct.</p>
<p><b>Verify</b> - Halt CPU and verify image in flash or RAM.</p>
<right_column>
<![CDATA[
<p>Program and/or verify the flash on your target.</p>
<p><b>Flash</b> - Halt CPU, automatically erase flash if required and program flash with image.</p>
<p><b>Flash and verify</b> - Programs the flash and verifies the programmed flash content is correct.</p>
<p><b>Verify</b> - Halt CPU and verify image in flash or RAM.</p>
- <p><b>Offset</b> - This value is added to the address of the image.<br>
- Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.<br>
+ <p><b>Offset</b> - This value is added to the address of the image.<br>
+ Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.<br>
<form enctype="multipart/form-data" action="production.tcl" method="post">
<code style="white-space: nowrap;">
<form enctype="multipart/form-data" action="production.tcl" method="post">
<code style="white-space: nowrap;">
append buffer [encode $result]
if {$wrotedata==0} {
append buffer "<br>Running production procedure<p>"
append buffer "<br>Reset and init: <br>"
append buffer [encode $result]
if {$wrotedata==0} {
append buffer "<br>Running production procedure<p>"
append buffer "<br>Reset and init: <br>"
append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]]
}
}
if {[string compare $form_action "Test"]==0} {
append buffer "<br>Running production test. Output from first 10 seconds printed below. <p>"
append console [encode [capture_catch {catch "production $upload_filename $form_serialnumber"}]]
}
}
if {[string compare $form_action "Test"]==0} {
append buffer "<br>Running production test. Output from first 10 seconds printed below. <p>"
append console [encode [capture_catch {catch production_test}]]
}
if {[string compare $form_action "Power on"]==0} {
append console [encode [capture_catch {catch production_test}]]
}
if {[string compare $form_action "Power on"]==0} {
append buffer {<p class="formtext">Firmware file(raw binary) <input type="file" name="form_filecontent"><p>}
append buffer {<p class="formtext">Serial number <input type="text" name="form_serialnumber"><p>}
</tcl>
append buffer {<p class="formtext">Firmware file(raw binary) <input type="file" name="form_filecontent"><p>}
append buffer {<p class="formtext">Serial number <input type="text" name="form_serialnumber"><p>}
</tcl>
<table>
<tr><td style="height:15px;width:535px;"> </td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<table>
<tr><td style="height:15px;width:535px;"> </td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<table><tr>
<td><input type="submit" name="form_action" value="Upload firmware" ></td>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Test"></td>
<table><tr>
<td><input type="submit" name="form_action" value="Upload firmware" ></td>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Test"></td>
<right_column>
<![CDATA[
The target script can implement the "production", "production_info" and "production_test" tcl proc's. These procedures
are used on this page. There are default implementations that do nothing.
<right_column>
<![CDATA[
The target script can implement the "production", "production_info" and "production_test" tcl proc's. These procedures
are used on this page. There are default implementations that do nothing.
<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>
<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>
<p><b>Power on</b> - Power on target.</p>
<p><b>Power off</b> - Power off target.</p>
<p><b>Serial number</b> - A target script can use this string in the production procedure. Type "help production" for more info.</p>
<p><b>Power on</b> - Power on target.</p>
<p><b>Power off</b> - Power off target.</p>
<p><b>Serial number</b> - A target script can use this string in the production procedure. Type "help production" for more info.</p>
set form_address [formfetch form_address]
set form_length [formfetch form_length]
set form_action [formfetch form_action]
set form_address [formfetch form_address]
set form_length [formfetch form_length]
set form_action [formfetch form_action]
if {[string compare $form_address ""]==0} {
if {[catch {[first_flash_base]} result]==0} {
set form_address "0x[tohex $result]"
if {[string compare $form_address ""]==0} {
if {[catch {[first_flash_base]} result]==0} {
set form_address "0x[tohex $result]"
if {[string compare $form_address ""]!=0} {
if {[string compare $form_action "Erase"]==0} {
append buffer "<code style=\"white-space: nowrap;\">"
if {[string compare $form_address ""]!=0} {
if {[string compare $form_action "Erase"]==0} {
append buffer "<code style=\"white-space: nowrap;\">"
<table>
<tr><td class="formtext" style="padding-right:10px;">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer $form_length</tcl>"></td></tr>
<table>
<tr><td class="formtext" style="padding-right:10px;">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer $form_length</tcl>"></td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
append console [encode [capture_catch "halt"]]
append console [encode [capture_catch "wait_halt"]]
append console [encode [capture_catch "resume $form_address"]]
append console [encode [capture_catch "halt"]]
append console [encode [capture_catch "wait_halt"]]
append console [encode [capture_catch "resume $form_address"]]
if {[string compare $form_action "Halt"]==0} {
append console [encode [capture_catch "halt"]]
append console [encode [capture_catch "wait_halt"]]
}
if {[string compare $form_action "Halt"]==0} {
append console [encode [capture_catch "halt"]]
append console [encode [capture_catch "wait_halt"]]
}
if {[string compare $form_action "Reset and run"]==0} {
append console [encode [capture_catch "reset run"]]
}
if {[string compare $form_action "Reset and run"]==0} {
append console [encode [capture_catch "reset run"]]
}
if {[string compare $form_action "Reset and init"]==0} {
append console [encode [capture_catch "reset init"]]
if {[string compare $form_action "Reset and init"]==0} {
append console [encode [capture_catch "reset init"]]
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<pageheading>Browse / Edit Memory</pageheading>
<level2parent>browsemem.tcl</level2parent>
<level2menu href="browsemem.tcl" title="Browse / Edit" titlestyle="color:#4e6627;">
<pageheading>Browse / Edit Memory</pageheading>
<level2parent>browsemem.tcl</level2parent>
<level2menu href="browsemem.tcl" title="Browse / Edit" titlestyle="color:#4e6627;">
set form_address [formfetch form_address]
set form_length [formfetch form_length]
set form_type [formfetch form_type]
set form_action [formfetch form_action]
set form_value [formfetch form_value]
set form_address [formfetch form_address]
set form_length [formfetch form_length]
set form_type [formfetch form_type]
set form_action [formfetch form_action]
set form_value [formfetch form_value]
if {[string compare $form_address ""]!=0} {
if {[string compare $form_action "Previous"]==0} {
# Kludge! Work around problems parsing hex in Jim Tcl expressions
if {[string compare $form_address ""]!=0} {
if {[string compare $form_action "Previous"]==0} {
# Kludge! Work around problems parsing hex in Jim Tcl expressions
if {[string compare $form_action "Next"]==0} {
# Kludge! Work around problems parsing hex in Jim Tcl expressions
incr form_address ; set form_address [expr $form_address-1]
set form_address "0x[tohex [expr $form_address+$form_length]]"
if {[string compare $form_action "Next"]==0} {
# Kludge! Work around problems parsing hex in Jim Tcl expressions
incr form_address ; set form_address [expr $form_address-1]
set form_address "0x[tohex [expr $form_address+$form_length]]"
if {[string compare $form_action "Modify"]==0} {
append console [capture_catch "$modify_cmd $form_address $form_value"]
if {[string compare $form_action "Modify"]==0} {
append console [capture_catch "$modify_cmd $form_address $form_value"]
if {[string compare $form_action "Fill"]==0} {
append console [capture_catch "$modify_cmd $form_address $form_value $form_length"]
if {[string compare $form_action "Fill"]==0} {
append console [capture_catch "$modify_cmd $form_address $form_value $form_length"]
<table>
<tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer "0x[tohex $form_length]"</tcl>"></td></tr>
<table>
<tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer "0x[tohex $form_length]"</tcl>"></td></tr>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Fill"></td></tr>
<tr><td class="formtext">Type</td><td style="padding-top:1px;">
<select name="form_type">
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Fill"></td></tr>
<tr><td class="formtext">Type</td><td style="padding-top:1px;">
<select name="form_type">
- <option
- <tcl>if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} } </tcl> value ="mdb">8 bit
- </option>
- <option
- <tcl>if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} } </tcl> value ="mdh">16 bit
- </option>
- <option
- <tcl>if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} } </tcl>value ="mdw">32 bit
- </option>
+ <option
+ <tcl>if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} } </tcl> value ="mdb">8 bit
+ </option>
+ <option
+ <tcl>if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} } </tcl> value ="mdh">16 bit
+ </option>
+ <option
+ <tcl>if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} } </tcl>value ="mdw">32 bit
+ </option>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<table><tr>
<td><input type="submit" name="form_action" value="Refresh"></td>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Previous" ></td>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Next" ></td>
</tr></table>
<br>
<table><tr>
<td><input type="submit" name="form_action" value="Refresh"></td>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Previous" ></td>
<td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Next" ></td>
</tr></table>
<br>
if {[string compare $form_address ""]!=0} {
append console [encode [capture_catch halt]]
append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]]
if {[string compare $form_address ""]!=0} {
append console [encode [capture_catch halt]]
append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]]
<p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
<p>CPU will be halted if required.</p>
<p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
<p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
<p>CPU will be halted if required.</p>
<p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
set form_address [formfetch form_address]
set form_length [formfetch form_length]
set form_action [formfetch form_action]
set form_address [formfetch form_address]
set form_length [formfetch form_length]
set form_action [formfetch form_action]
<table>
<tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer $form_length</tcl>"></td></tr>
<table>
<tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="<tcl>append buffer $form_address</tcl>"></td></tr>
<tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="<tcl>append buffer $form_length</tcl>"></td></tr>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
<tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
<tr><td style="height:15px;width:535px;"> </td></tr>
</table>
</form>
<tcl>
if {[string compare $form_action "Download"]==0} {
append console [encode [capture_catch "reset init"]]
append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]]
</tcl>
</form>
<tcl>
if {[string compare $form_action "Download"]==0} {
append console [encode [capture_catch "reset init"]]
append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]]
</tcl>
Download memory from target. <br>
<b>Note</b> that download memory can take
a long time(potentially minutes for megabytes at low JTAG clk speeds).
Download memory from target. <br>
<b>Note</b> that download memory can take
a long time(potentially minutes for megabytes at low JTAG clk speeds).
<pageheading>Run Command</pageheading>
<level2parent>openocd.tcl</level2parent>
<level2menu href="openocd.tcl" title="Run Command" titlestyle="color:#4e6627;">
</level2menu>
<level2menu href="guiupload.tcl" title="Upload File" titlestyle="color:#4e6627;">
<![CDATA[
<pageheading>Run Command</pageheading>
<level2parent>openocd.tcl</level2parent>
<level2menu href="openocd.tcl" title="Run Command" titlestyle="color:#4e6627;">
</level2menu>
<level2menu href="guiupload.tcl" title="Upload File" titlestyle="color:#4e6627;">
<![CDATA[
append buffer [to_textarea $form_command]
append buffer {</textarea><br>}
append buffer {<input type="submit" value="Run" name="form_action" ><br>}
append buffer [to_textarea $form_command]
append buffer {</textarea><br>}
append buffer {<input type="submit" value="Run" name="form_action" ><br>}
<page lang="eng">
<outfile>guiupload.tcl</outfile>
<level2parent>openocd.tcl</level2parent>
<pageheading>Upload File</pageheading>
<pagetext>
<markup_code><![CDATA[
<page lang="eng">
<outfile>guiupload.tcl</outfile>
<level2parent>openocd.tcl</level2parent>
<pageheading>Upload File</pageheading>
<pagetext>
<markup_code><![CDATA[
<tcl>
set form_filename [formfetch form_filename];
set form_action [formfetch form_action];
#set form_filecontent [formfetch form_filecontent];
<tcl>
set form_filename [formfetch form_filename];
set form_action [formfetch form_action];
#set form_filecontent [formfetch form_filecontent];
if {[string compare $form_action "Upload"]==0} {
if {[catch {writeform form_filecontent $form_filename} result]==0} {
append buffer [encode $result]
if {[string compare $form_action "Upload"]==0} {
if {[catch {writeform form_filecontent $form_filename} result]==0} {
append buffer [encode $result]
append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on OpenOCD machine</td><td><input type="text" name="form_filename"></td></tr>}
append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}
append buffer {<table><tr><td style="height:15px;width:535px;"> </td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;"> </td></tr></table>}
append buffer {<input type="submit" name="form_action" value="Upload" ><br> }
append buffer {</form>}
append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on OpenOCD machine</td><td><input type="text" name="form_filename"></td></tr>}
append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>}
append buffer {<table><tr><td style="height:15px;width:535px;"> </td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;"> </td></tr></table>}
append buffer {<input type="submit" name="form_action" value="Upload" ><br> }
append buffer {</form>}
A target needs an openocd.cfg file. This config file sets up
the CPU, flash and reset init script. Either OpenOCD ships with an
openocd.cfg file for your target or you need to take an existing
config file and modify it for your needs.
A target needs an openocd.cfg file. This config file sets up
the CPU, flash and reset init script. Either OpenOCD ships with an
openocd.cfg file for your target or you need to take an existing
config file and modify it for your needs.
The reset init script is crucial. It will set up e.g. MMU, chip
select registers, etc. after a reset. The init.cfg (reset init script)
is embedded into the openocd.cfg file in the sampls OpenOCD provides.
The reset init script is crucial. It will set up e.g. MMU, chip
select registers, etc. after a reset. The init.cfg (reset init script)
is embedded into the openocd.cfg file in the sampls OpenOCD provides.
Writing an openocd.cfg from scratch is a non-trivial exercise, but
fortunally it only has to be done once for a target and afterwards it
rarely if ever needs to be changed.
Writing an openocd.cfg from scratch is a non-trivial exercise, but
fortunally it only has to be done once for a target and afterwards it
rarely if ever needs to be changed.
<level2parent>index.tcl</level2parent>
<outfile>terminal.tcl</outfile>
<pageheading>UART forwarding</pageheading>
<level2parent>index.tcl</level2parent>
<outfile>terminal.tcl</outfile>
<pageheading>UART forwarding</pageheading>
- foreach i {9600 19200 38400 57600 115200} {
+ foreach i {9600 19200 38400 57600 115200} {
+ </tcl>
+ <option <tcl>if {[string compare $form_baudrate $i]==0} { append buffer {selected="selected"} } </tcl>
+ value ="<tcl>append buffer $i</tcl>"><tcl>append buffer $i</tcl></option>
+ <tcl>
+ }
<tcl>
if {[string compare $form_action "Set baudrate"]==0} {
append console [encode [ocd_uart $form_baudrate]]
}
</tcl>
<tcl>
if {[string compare $form_action "Set baudrate"]==0} {
append console [encode [ocd_uart $form_baudrate]]
}
</tcl>
<h2>Simple UART</h2>
This terminal window is purely for illustrative purposes. Use telnet or a terminal program
to talk to the target over TCP/IP for anything but trivial case of reading/writing a few
<h2>Simple UART</h2>
This terminal window is purely for illustrative purposes. Use telnet or a terminal program
to talk to the target over TCP/IP for anything but trivial case of reading/writing a few