target.c 124 KB
Newer Older
5001
		.name = "resume",
5002
		.handler = handle_resume_command,
5003
		.mode = COMMAND_EXEC,
5004
5005
		.help =	"resume target execution from current PC or address",
		.usage = "[address]",
5006
5007
5008
	},
	{
		.name = "reset",
5009
		.handler = handle_reset_command,
5010
5011
5012
5013
5014
5015
5016
		.mode = COMMAND_EXEC,
		.usage = "[run|halt|init]",
		.help = "Reset all targets into the specified mode."
			"Default reset mode is run, if not given.",
	},
	{
		.name = "soft_reset_halt",
5017
		.handler = handle_soft_reset_halt_command,
5018
5019
5020
5021
5022
		.mode = COMMAND_EXEC,
		.help = "halt the target and do a soft reset",
	},
	{
		.name = "step",
5023
		.handler = handle_step_command,
5024
		.mode = COMMAND_EXEC,
5025
5026
		.help =	"step one instruction from current PC or address",
		.usage = "[address]",
5027
5028
5029
	},
	{
		.name = "mdw",
5030
		.handler = handle_md_command,
5031
5032
		.mode = COMMAND_EXEC,
		.help = "display memory words",
5033
		.usage = "['phys'] address [count]",
5034
5035
5036
	},
	{
		.name = "mdh",
5037
		.handler = handle_md_command,
5038
5039
		.mode = COMMAND_EXEC,
		.help = "display memory half-words",
5040
		.usage = "['phys'] address [count]",
5041
5042
5043
	},
	{
		.name = "mdb",
5044
		.handler = handle_md_command,
5045
5046
		.mode = COMMAND_EXEC,
		.help = "display memory bytes",
5047
		.usage = "['phys'] address [count]",
5048
5049
5050
	},
	{
		.name = "mww",
5051
		.handler = handle_mw_command,
5052
5053
		.mode = COMMAND_EXEC,
		.help = "write memory word",
5054
		.usage = "['phys'] address value [count]",
5055
5056
5057
	},
	{
		.name = "mwh",
5058
		.handler = handle_mw_command,
5059
5060
		.mode = COMMAND_EXEC,
		.help = "write memory half-word",
5061
		.usage = "['phys'] address value [count]",
5062
5063
5064
	},
	{
		.name = "mwb",
5065
		.handler = handle_mw_command,
5066
5067
		.mode = COMMAND_EXEC,
		.help = "write memory byte",
5068
		.usage = "['phys'] address value [count]",
5069
5070
5071
	},
	{
		.name = "bp",
5072
		.handler = handle_bp_command,
5073
		.mode = COMMAND_EXEC,
5074
5075
		.help = "list or set hardware or software breakpoint",
		.usage = "[address length ['hw']]",
5076
5077
5078
	},
	{
		.name = "rbp",
5079
		.handler = handle_rbp_command,
5080
5081
		.mode = COMMAND_EXEC,
		.help = "remove breakpoint",
5082
		.usage = "address",
5083
5084
5085
	},
	{
		.name = "wp",
5086
		.handler = handle_wp_command,
5087
		.mode = COMMAND_EXEC,
5088
5089
		.help = "list (no params) or create watchpoints",
		.usage = "[address length [('r'|'w'|'a') value [mask]]]",
5090
5091
5092
	},
	{
		.name = "rwp",
5093
		.handler = handle_rwp_command,
5094
5095
		.mode = COMMAND_EXEC,
		.help = "remove watchpoint",
5096
		.usage = "address",
5097
5098
5099
	},
	{
		.name = "load_image",
5100
		.handler = handle_load_image_command,
5101
		.mode = COMMAND_EXEC,
5102
		.usage = "filename address ['bin'|'ihex'|'elf'|'s19'] "
5103
5104
5105
5106
			"[min_address] [max_length]",
	},
	{
		.name = "dump_image",
5107
		.handler = handle_dump_image_command,
5108
		.mode = COMMAND_EXEC,
5109
		.usage = "filename address size",
5110
5111
5112
	},
	{
		.name = "verify_image",
5113
		.handler = handle_verify_image_command,
5114
		.mode = COMMAND_EXEC,
5115
		.usage = "filename [offset [type]]",
5116
5117
5118
	},
	{
		.name = "test_image",
5119
		.handler = handle_test_image_command,
5120
		.mode = COMMAND_EXEC,
5121
		.usage = "filename [offset [type]]",
5122
	},
5123
5124
5125
	{
		.name = "ocd_mem2array",
		.mode = COMMAND_EXEC,
5126
5127
		.jim_handler = jim_mem2array,
		.help = "read 8/16/32 bit memory and return as a TCL array "
5128
			"for script processing",
5129
		.usage = "arrayname bitwidth address count",
5130
5131
5132
5133
	},
	{
		.name = "ocd_array2mem",
		.mode = COMMAND_EXEC,
5134
		.jim_handler = jim_array2mem,
5135
		.help = "convert a TCL array to memory locations "
5136
5137
			"and write the 8/16/32 bit values",
		.usage = "arrayname bitwidth address count",
5138
	},
Øyvind Harboe's avatar
Øyvind Harboe committed
5139
5140
5141
5142
5143
5144
5145
5146
	{
		.name = "reset_nag",
		.handler = handle_target_reset_nag,
		.mode = COMMAND_ANY,
		.help = "Nag after each reset about options that could have been "
				"enabled to improve performance. ",
		.usage = "['enable'|'disable']",
	},
5147
5148
	COMMAND_REGISTRATION_DONE
};
5149
int target_register_user_commands(struct command_context *cmd_ctx)
5150
5151
5152
5153
5154
5155
5156
5157
5158
{
	int retval = ERROR_OK;
	if ((retval = target_request_register_commands(cmd_ctx)) != ERROR_OK)
		return retval;

	if ((retval = trace_register_commands(cmd_ctx)) != ERROR_OK)
		return retval;


5159
	return register_commands(cmd_ctx, NULL, target_exec_command_handlers);
5160
}
For faster browsing, not all history is shown. View entire blame