生命不止,奋斗不息。
分类: 嵌入式
2013-07-01 23:01:54
reset halt
halt
mdw 0 //读取地址0
mdw 4//读取地址4
OpenOCD commands
OpenFacts, the Open Source Knowledge Database
The Open On-Chip Debugger (OpenOCD) allows user interaction through a telnet interface (default: port 4444) and a GDB server (default: port 3333). The command line interpreter is available from both the telnet interface and a GDB session. To issue commands to the interpreter from within a GDB session, use the "monitor" command, e.g. use 'monitor poll' to issue the 'poll' command. All output is relayed through the GDB session.
This page is supposed to document the current state of the OpenOCD - i.e. the latest version available from SVN.
Daemon
sleep
Wait for n milliseconds before resuming. Useful in connection with script files ('script' command and 'target_script' configuration).
shutdown
Close the OpenOCD daemon, disconnecting all clients (GDB, Telnet).
debug_level [n]
Display or adjust debug level to n<0-3>
log_output
Redirect logging to
script
Execute commands from
Target state handling
poll ['on'|'off']
Poll the target for its current state. If the target is in debug mode, architecture specific information about the current state are printed. An optional parameter allows continuous polling to be enabled and disabled.
halt
Send a halt request to the target. The debugger signals the debug request, and waits for the target to enter debug mode.
resume [address]
Resume the target at its current code position, or at an optional address.
step [address]
Single-step the target at its current code position, or at an optional address.
reset ['run'|'halt'|'init'|'run_and_halt'|'run_and_init']
Do a hard-reset. The optional parameter specifies what should happen after the reset. This optional parameter overwrites the setting specified in the configuration file, making the new behaviour the default for the 'reset' command.
Memory access commands
These commands allow accesses of a specific size to the memory system:
mdw
display memory words
mdh
display memory half-words
mdb
display memory bytes
mww
write memory word
mwh
write memory half-word
mwb
write memory byte
load_image
Load image
dump_image
Dump
load_binary
Load binary
dump_binary
Dump
Flash commands
flash banks
List configured flash banks
flash info
Print info about flash bank
flash probe
Identify the flash, or validate the parameters of the configured flash. Operation depends on the flash type.
flash erase_check
Check erase state of sectors in flash bank
flash protect_check
Check protection state of sectors in flash bank
flash erase
Erase sectors at bank
flash write
Write the binary
flash write_binary
Write the binary
flash write_image
Write the image
flash protect
Enable ('on') or disable ('off') protection of flash sectors
flash auto_erase
Enable ('on') to erase flash banks prior to writing using the flash write_image command only. Default is ('off'), flash banks have to be erased using flash erase command.