|
Current target - selected target configuration.
Startup - 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
did not contain syntax errors for instance.
See log for details.
Target power - Detects power on target.
If the JTAG cable is not connected, or the target has no power, then no target power will be detected.
Type "help power" in telnet for command to control power relay.
]]>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. ]]>
]]>
Reset CPU and probe flash - This will reset the CPU and show you more detailed information about your flash. This includes information about the different sectors in the flash, and the flash driver used.
]]>
set data ""
append buffer {
File | |
Offset | |
Type |
  |
  |
"
if {$action_flash} {
append console [encode [capture_catch "halt"]]
append buffer ""
if {[catch {capture_catch {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} {
append buffer "Flash write failed
"
append console [encode $result]
} else {
append buffer [encode $result]
append buffer "Flash write succeed
"
}
append buffer ""
}
if {$action_verify} {
append console [encode [capture_catch "halt"]]
append buffer ""
if {[catch {capture_catch {eval "verify_image $upload_filename $form_offset $form_type"}} result]} {
append buffer "Verify failed
"
append console [encode $result]
} else {
append buffer [encode $result]
append buffer "Verify succeed
"
}
append buffer ""
}
Flash - Halt CPU, automatically erase flash if required and program flash with image.
Flash and verify - Programs the flash and verifies the programmed flash content is correct.
Verify - Halt CPU and verify image in flash or RAM.
Offset - This value is added to the address of the image.
Binary images start at address 0 by default, whereas elf and ihex have addresses encoded into the image.
Typically 0 for elf/ihex and the address to write the image to for binary files.
Test - Power up target, run 10 second target test. Output is provided via the DCC output channel.
Power on - Power on target.
Power off - Power off target.
Serial number - A target script can use this string in the production procedure. Type "help production" for more info.
]]>"
append console [encode [capture_catch {
reset init
flash erase_address $form_address $form_length}]]
append buffer
}
}
]]>Reset and init CPU, then erase address range.
The length field is specified in number of bytes.
]]>Halt - halt CPU.
Run from address - halt CPU and resume from address. Default is resume from current address.
Reset and init - reset CPU and run init script.
]]>
]]>
An error message is shown when trying to browse or edit memory which cases a CPU fault.
CPU will be halted if required.
Modify - Will modify only one byte, half-word or word starting at Address.
Fill - Will fill the specified region with the specified value.
Refresh - Display the content of the specified memory area.
]]>To download log you can also use commands like "wget http://
You can also execute tcl commands using curl from your developer PC:
curl --form form_command=ocd_version append buffer [ip] runtcl.tcl
]]>
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. ]]>
]]>
Type "help uart" in telnet for information on how to set uart speed for target. Normally the uart speed is set from the target configuration script by adding an "uart N", where N is the baudrate. ]]>