Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.tags/v0.4.0-rc1
@@ -1091,7 +1091,7 @@ int main(int argc, char *argv[]) | |||||
#ifdef CYGPKG_PROFILE_GPROF | #ifdef CYGPKG_PROFILE_GPROF | ||||
register_command(cmd_ctx, NULL, "ecosboard_profile", eCosBoard_handle_eCosBoard_profile_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ecosboard_profile", eCosBoard_handle_eCosBoard_profile_command, | |||||
COMMAND_ANY, NULL); | COMMAND_ANY, NULL); | ||||
#endif | #endif | ||||
@@ -2478,18 +2478,18 @@ sam3_register_commands(struct command_context *cmd_ctx) | |||||
if (!sam3_registered) { | if (!sam3_registered) { | ||||
sam3_registered++; | sam3_registered++; | ||||
pCmd = register_command(cmd_ctx, NULL, "at91sam3", NULL, COMMAND_ANY, NULL); | |||||
register_command(cmd_ctx, pCmd, | |||||
pCmd = COMMAND_REGISTER(cmd_ctx, NULL, "at91sam3", NULL, COMMAND_ANY, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, pCmd, | |||||
"gpnvm", | "gpnvm", | ||||
sam3_handle_gpnvm_command, | sam3_handle_gpnvm_command, | ||||
COMMAND_EXEC, | COMMAND_EXEC, | ||||
"at91sam3 gpnvm [action [<BIT>], by default 'show', otherwise set | clear BIT"); | "at91sam3 gpnvm [action [<BIT>], by default 'show', otherwise set | clear BIT"); | ||||
register_command(cmd_ctx, pCmd, | |||||
COMMAND_REGISTER(cmd_ctx, pCmd, | |||||
"info", | "info", | ||||
sam3_handle_info_command, | sam3_handle_info_command, | ||||
COMMAND_EXEC, | COMMAND_EXEC, | ||||
"at91sam3 info - print information about the current sam3 chip"); | "at91sam3 info - print information about the current sam3 chip"); | ||||
register_command(cmd_ctx, pCmd, | |||||
COMMAND_REGISTER(cmd_ctx, pCmd, | |||||
"slowclk", | "slowclk", | ||||
sam3_handle_slowclk_command, | sam3_handle_slowclk_command, | ||||
COMMAND_EXEC, | COMMAND_EXEC, | ||||
@@ -1180,10 +1180,10 @@ COMMAND_HANDLER(at91sam7_handle_gpnvm_command) | |||||
static int at91sam7_register_commands(struct command_context *cmd_ctx) | static int at91sam7_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *at91sam7_cmd = register_command(cmd_ctx, NULL, "at91sam7", | |||||
struct command *at91sam7_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "at91sam7", | |||||
NULL, COMMAND_ANY, NULL); | NULL, COMMAND_ANY, NULL); | ||||
register_command(cmd_ctx, at91sam7_cmd, "gpnvm", | |||||
COMMAND_REGISTER(cmd_ctx, at91sam7_cmd, "gpnvm", | |||||
at91sam7_handle_gpnvm_command, COMMAND_EXEC, | at91sam7_handle_gpnvm_command, COMMAND_EXEC, | ||||
"at91sam7 gpnvm <bit> set | clear, " | "at91sam7 gpnvm <bit> set | clear, " | ||||
"set or clear one gpnvm bit"); | "set or clear one gpnvm bit"); | ||||
@@ -451,10 +451,10 @@ COMMAND_HANDLER(avrf_handle_mass_erase_command) | |||||
static int avrf_register_commands(struct command_context *cmd_ctx) | static int avrf_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *avr_cmd = register_command(cmd_ctx, NULL, "avr", | |||||
struct command *avr_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "avr", | |||||
NULL, COMMAND_ANY, "avr flash specific commands"); | NULL, COMMAND_ANY, "avr flash specific commands"); | ||||
register_command(cmd_ctx, avr_cmd, "mass_erase", | |||||
COMMAND_REGISTER(cmd_ctx, avr_cmd, "mass_erase", | |||||
avrf_handle_mass_erase_command, COMMAND_EXEC, | avrf_handle_mass_erase_command, COMMAND_EXEC, | ||||
"mass erase device"); | "mass erase device"); | ||||
@@ -592,9 +592,9 @@ static int cfi_intel_info(struct flash_bank *bank, char *buf, int buf_size) | |||||
static int cfi_register_commands(struct command_context *cmd_ctx) | static int cfi_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
/*struct command *cfi_cmd = */ | /*struct command *cfi_cmd = */ | ||||
register_command(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, "flash bank cfi <base> <size> <chip_width> <bus_width> <targetNum> [jedec_probe/x16_as_x8]"); | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "cfi", NULL, COMMAND_ANY, "flash bank cfi <base> <size> <chip_width> <bus_width> <targetNum> [jedec_probe/x16_as_x8]"); | |||||
/* | /* | ||||
register_command(cmd_ctx, cfi_cmd, "part_id", cfi_handle_part_id_command, COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, cfi_cmd, "part_id", cfi_handle_part_id_command, COMMAND_EXEC, | |||||
"print part id of cfi flash bank <num>"); | "print part id of cfi flash bank <num>"); | ||||
*/ | */ | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -338,7 +338,7 @@ static int ecosflash_probe(struct flash_bank *bank) | |||||
static int ecosflash_register_commands(struct command_context *cmd_ctx) | static int ecosflash_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "ecosflash", NULL, COMMAND_ANY, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ecosflash", NULL, COMMAND_ANY, NULL); | |||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } | ||||
@@ -1280,42 +1280,42 @@ int flash_init_drivers(struct command_context *cmd_ctx) | |||||
if (!flash_banks) | if (!flash_banks) | ||||
return ERROR_OK; | return ERROR_OK; | ||||
register_command(cmd_ctx, flash_cmd, "info", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "info", | |||||
handle_flash_info_command, COMMAND_EXEC, | handle_flash_info_command, COMMAND_EXEC, | ||||
"print info about flash bank <num>"); | "print info about flash bank <num>"); | ||||
register_command(cmd_ctx, flash_cmd, "probe", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "probe", | |||||
handle_flash_probe_command, COMMAND_EXEC, | handle_flash_probe_command, COMMAND_EXEC, | ||||
"identify flash bank <num>"); | "identify flash bank <num>"); | ||||
register_command(cmd_ctx, flash_cmd, "erase_check", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "erase_check", | |||||
handle_flash_erase_check_command, COMMAND_EXEC, | handle_flash_erase_check_command, COMMAND_EXEC, | ||||
"check erase state of sectors in flash bank <num>"); | "check erase state of sectors in flash bank <num>"); | ||||
register_command(cmd_ctx, flash_cmd, "protect_check", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "protect_check", | |||||
handle_flash_protect_check_command, COMMAND_EXEC, | handle_flash_protect_check_command, COMMAND_EXEC, | ||||
"check protection state of sectors in flash bank <num>"); | "check protection state of sectors in flash bank <num>"); | ||||
register_command(cmd_ctx, flash_cmd, "erase_sector", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "erase_sector", | |||||
handle_flash_erase_command, COMMAND_EXEC, | handle_flash_erase_command, COMMAND_EXEC, | ||||
"erase sectors at <bank> <first> <last>"); | "erase sectors at <bank> <first> <last>"); | ||||
register_command(cmd_ctx, flash_cmd, "erase_address", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "erase_address", | |||||
handle_flash_erase_address_command, COMMAND_EXEC, | handle_flash_erase_address_command, COMMAND_EXEC, | ||||
"erase address range <address> <length>"); | "erase address range <address> <length>"); | ||||
register_command(cmd_ctx, flash_cmd, "fillw", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "fillw", | |||||
handle_flash_fill_command, COMMAND_EXEC, | handle_flash_fill_command, COMMAND_EXEC, | ||||
"fill with pattern (no autoerase) <address> <word_pattern> <count>"); | "fill with pattern (no autoerase) <address> <word_pattern> <count>"); | ||||
register_command(cmd_ctx, flash_cmd, "fillh", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "fillh", | |||||
handle_flash_fill_command, COMMAND_EXEC, | handle_flash_fill_command, COMMAND_EXEC, | ||||
"fill with pattern <address> <halfword_pattern> <count>"); | "fill with pattern <address> <halfword_pattern> <count>"); | ||||
register_command(cmd_ctx, flash_cmd, "fillb", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "fillb", | |||||
handle_flash_fill_command, COMMAND_EXEC, | handle_flash_fill_command, COMMAND_EXEC, | ||||
"fill with pattern <address> <byte_pattern> <count>"); | "fill with pattern <address> <byte_pattern> <count>"); | ||||
register_command(cmd_ctx, flash_cmd, "write_bank", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "write_bank", | |||||
handle_flash_write_bank_command, COMMAND_EXEC, | handle_flash_write_bank_command, COMMAND_EXEC, | ||||
"write binary data to <bank> <file> <offset>"); | "write binary data to <bank> <file> <offset>"); | ||||
register_command(cmd_ctx, flash_cmd, "write_image", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "write_image", | |||||
handle_flash_write_image_command, COMMAND_EXEC, | handle_flash_write_image_command, COMMAND_EXEC, | ||||
"write_image [erase] [unlock] <file> [offset] [type]"); | "write_image [erase] [unlock] <file> [offset] [type]"); | ||||
register_command(cmd_ctx, flash_cmd, "protect", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "protect", | |||||
handle_flash_protect_command, COMMAND_EXEC, | handle_flash_protect_command, COMMAND_EXEC, | ||||
"set protection of sectors at <bank> <first> <last> <on | off>"); | "set protection of sectors at <bank> <first> <last> <on | off>"); | ||||
@@ -1324,10 +1324,10 @@ int flash_init_drivers(struct command_context *cmd_ctx) | |||||
int flash_register_commands(struct command_context *cmd_ctx) | int flash_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
flash_cmd = register_command(cmd_ctx, NULL, "flash", | |||||
flash_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "flash", | |||||
NULL, COMMAND_ANY, NULL); | NULL, COMMAND_ANY, NULL); | ||||
register_command(cmd_ctx, flash_cmd, "bank", | |||||
COMMAND_REGISTER(cmd_ctx, flash_cmd, "bank", | |||||
handle_flash_bank_command, COMMAND_CONFIG, | handle_flash_bank_command, COMMAND_CONFIG, | ||||
"flash bank <driver> <base> <size> " | "flash bank <driver> <base> <size> " | ||||
"<chip_width> <bus_width> <target> [driver_options ...]"); | "<chip_width> <bus_width> <target> [driver_options ...]"); | ||||
@@ -778,10 +778,10 @@ COMMAND_HANDLER(lpc2000_handle_part_id_command) | |||||
static int lpc2000_register_commands(struct command_context *cmd_ctx) | static int lpc2000_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *lpc2000_cmd = register_command(cmd_ctx, NULL, "lpc2000", | |||||
struct command *lpc2000_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "lpc2000", | |||||
NULL, COMMAND_ANY, NULL); | NULL, COMMAND_ANY, NULL); | ||||
register_command(cmd_ctx, lpc2000_cmd, "part_id", | |||||
COMMAND_REGISTER(cmd_ctx, lpc2000_cmd, "part_id", | |||||
lpc2000_handle_part_id_command, COMMAND_EXEC, | lpc2000_handle_part_id_command, COMMAND_EXEC, | ||||
"print part id of lpc2000 flash bank <num>"); | "print part id of lpc2000 flash bank <num>"); | ||||
@@ -954,60 +954,36 @@ COMMAND_HANDLER(lpc2900_handle_secure_jtag_command) | |||||
*/ | */ | ||||
static int lpc2900_register_commands(struct command_context *cmd_ctx) | static int lpc2900_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *lpc2900_cmd = register_command(cmd_ctx, NULL, "lpc2900", | |||||
struct command *lpc2900_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "lpc2900", | |||||
NULL, COMMAND_ANY, NULL); | NULL, COMMAND_ANY, NULL); | ||||
register_command( | |||||
cmd_ctx, | |||||
lpc2900_cmd, | |||||
"signature", | |||||
lpc2900_handle_signature_command, | |||||
COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, lpc2900_cmd, "signature", | |||||
&lpc2900_handle_signature_command, COMMAND_EXEC, | |||||
"<bank> | " | "<bank> | " | ||||
"print device signature of flash bank"); | |||||
register_command( | |||||
cmd_ctx, | |||||
lpc2900_cmd, | |||||
"read_custom", | |||||
lpc2900_handle_read_custom_command, | |||||
COMMAND_EXEC, | |||||
"print device signature of flash bank"); | |||||
COMMAND_REGISTER(cmd_ctx, lpc2900_cmd, "read_custom", | |||||
&lpc2900_handle_read_custom_command, COMMAND_EXEC, | |||||
"<bank> <filename> | " | "<bank> <filename> | " | ||||
"read customer information from index sector to file"); | "read customer information from index sector to file"); | ||||
register_command( | |||||
cmd_ctx, | |||||
lpc2900_cmd, | |||||
"password", | |||||
lpc2900_handle_password_command, | |||||
COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, lpc2900_cmd, "password", | |||||
&lpc2900_handle_password_command, COMMAND_EXEC, | |||||
"<bank> <password> | " | "<bank> <password> | " | ||||
"enter password to enable 'dangerous' options"); | "enter password to enable 'dangerous' options"); | ||||
register_command( | |||||
cmd_ctx, | |||||
lpc2900_cmd, | |||||
"write_custom", | |||||
lpc2900_handle_write_custom_command, | |||||
COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, lpc2900_cmd, "write_custom", | |||||
&lpc2900_handle_write_custom_command, COMMAND_EXEC, | |||||
"<bank> <filename> [<type>] | " | "<bank> <filename> [<type>] | " | ||||
"write customer info from file to index sector"); | "write customer info from file to index sector"); | ||||
register_command( | |||||
cmd_ctx, | |||||
lpc2900_cmd, | |||||
"secure_sector", | |||||
lpc2900_handle_secure_sector_command, | |||||
COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, lpc2900_cmd, "secure_sector", | |||||
&lpc2900_handle_secure_sector_command, COMMAND_EXEC, | |||||
"<bank> <first> <last> | " | "<bank> <first> <last> | " | ||||
"activate sector security for a range of sectors"); | "activate sector security for a range of sectors"); | ||||
register_command( | |||||
cmd_ctx, | |||||
lpc2900_cmd, | |||||
"secure_jtag", | |||||
lpc2900_handle_secure_jtag_command, | |||||
COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, lpc2900_cmd, "secure_jtag", | |||||
&lpc2900_handle_secure_jtag_command, COMMAND_EXEC, | |||||
"<bank> <level> | " | "<bank> <level> | " | ||||
"activate JTAG security"); | "activate JTAG security"); | ||||
@@ -875,9 +875,9 @@ COMMAND_HANDLER(handle_lpc3180_select_command) | |||||
static int lpc3180_register_commands(struct command_context *cmd_ctx) | static int lpc3180_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *lpc3180_cmd = register_command(cmd_ctx, NULL, "lpc3180", NULL, COMMAND_ANY, "commands specific to the LPC3180 NAND flash controllers"); | |||||
struct command *lpc3180_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "lpc3180", NULL, COMMAND_ANY, "commands specific to the LPC3180 NAND flash controllers"); | |||||
register_command(cmd_ctx, lpc3180_cmd, "select", handle_lpc3180_select_command, COMMAND_EXEC, "select <'mlc'|'slc'> controller (default is mlc)"); | |||||
COMMAND_REGISTER(cmd_ctx, lpc3180_cmd, "select", handle_lpc3180_select_command, COMMAND_EXEC, "select <'mlc'|'slc'> controller (default is mlc)"); | |||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } | ||||
@@ -1271,12 +1271,12 @@ COMMAND_HANDLER(mg_config_cmd) | |||||
int mflash_init_drivers(struct command_context *cmd_ctx) | int mflash_init_drivers(struct command_context *cmd_ctx) | ||||
{ | { | ||||
if (mflash_bank) { | if (mflash_bank) { | ||||
register_command(cmd_ctx, mflash_cmd, "probe", mg_probe_cmd, COMMAND_EXEC, NULL); | |||||
register_command(cmd_ctx, mflash_cmd, "write", mg_write_cmd, COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, mflash_cmd, "probe", mg_probe_cmd, COMMAND_EXEC, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, mflash_cmd, "write", mg_write_cmd, COMMAND_EXEC, | |||||
"mflash write <num> <file> <address>"); | "mflash write <num> <file> <address>"); | ||||
register_command(cmd_ctx, mflash_cmd, "dump", mg_dump_cmd, COMMAND_EXEC, | |||||
COMMAND_REGISTER(cmd_ctx, mflash_cmd, "dump", mg_dump_cmd, COMMAND_EXEC, | |||||
"mflash dump <num> <file> <address> <size>"); | "mflash dump <num> <file> <address> <size>"); | ||||
register_command(cmd_ctx, mflash_cmd, "config", mg_config_cmd, | |||||
COMMAND_REGISTER(cmd_ctx, mflash_cmd, "config", mg_config_cmd, | |||||
COMMAND_EXEC, "mflash config <num> <stage>"); | COMMAND_EXEC, "mflash config <num> <stage>"); | ||||
} | } | ||||
@@ -1325,8 +1325,8 @@ COMMAND_HANDLER(mg_bank_cmd) | |||||
int mflash_register_commands(struct command_context *cmd_ctx) | int mflash_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
mflash_cmd = register_command(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL); | |||||
register_command(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG, | |||||
mflash_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG, | |||||
"mflash bank <soc> <base> <RST pin> <target #>"); | "mflash bank <soc> <base> <RST pin> <target #>"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } |
@@ -281,13 +281,13 @@ COMMAND_HANDLER(handle_nand_device_command) | |||||
int nand_register_commands(struct command_context *cmd_ctx) | int nand_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
nand_cmd = register_command(cmd_ctx, NULL, "nand", | |||||
nand_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "nand", | |||||
NULL, COMMAND_ANY, "NAND specific commands"); | NULL, COMMAND_ANY, "NAND specific commands"); | ||||
register_command(cmd_ctx, nand_cmd, "device", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "device", | |||||
&handle_nand_device_command, COMMAND_CONFIG, | &handle_nand_device_command, COMMAND_CONFIG, | ||||
"defines a new NAND bank"); | "defines a new NAND bank"); | ||||
register_command(cmd_ctx, nand_cmd, "drivers", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "drivers", | |||||
&handle_nand_list_drivers, COMMAND_ANY, | &handle_nand_list_drivers, COMMAND_ANY, | ||||
"lists available NAND drivers"); | "lists available NAND drivers"); | ||||
@@ -1705,36 +1705,36 @@ int nand_init(struct command_context *cmd_ctx) | |||||
if (!nand_devices) | if (!nand_devices) | ||||
return ERROR_OK; | return ERROR_OK; | ||||
register_command(cmd_ctx, nand_cmd, "list", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "list", | |||||
handle_nand_list_command, COMMAND_EXEC, | handle_nand_list_command, COMMAND_EXEC, | ||||
"list configured NAND flash devices"); | "list configured NAND flash devices"); | ||||
register_command(cmd_ctx, nand_cmd, "info", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "info", | |||||
handle_nand_info_command, COMMAND_EXEC, | handle_nand_info_command, COMMAND_EXEC, | ||||
"print info about NAND flash device <num>"); | "print info about NAND flash device <num>"); | ||||
register_command(cmd_ctx, nand_cmd, "probe", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "probe", | |||||
handle_nand_probe_command, COMMAND_EXEC, | handle_nand_probe_command, COMMAND_EXEC, | ||||
"identify NAND flash device <num>"); | "identify NAND flash device <num>"); | ||||
register_command(cmd_ctx, nand_cmd, "check_bad_blocks", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "check_bad_blocks", | |||||
handle_nand_check_bad_blocks_command, COMMAND_EXEC, | handle_nand_check_bad_blocks_command, COMMAND_EXEC, | ||||
"check NAND flash device <num> for bad blocks [<offset> <length>]"); | "check NAND flash device <num> for bad blocks [<offset> <length>]"); | ||||
register_command(cmd_ctx, nand_cmd, "erase", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "erase", | |||||
handle_nand_erase_command, COMMAND_EXEC, | handle_nand_erase_command, COMMAND_EXEC, | ||||
"erase blocks on NAND flash device <num> [<offset> <length>]"); | "erase blocks on NAND flash device <num> [<offset> <length>]"); | ||||
register_command(cmd_ctx, nand_cmd, "dump", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "dump", | |||||
handle_nand_dump_command, COMMAND_EXEC, | handle_nand_dump_command, COMMAND_EXEC, | ||||
"dump from NAND flash device <num> <filename> " | "dump from NAND flash device <num> <filename> " | ||||
"<offset> <length> [oob_raw | oob_only]"); | "<offset> <length> [oob_raw | oob_only]"); | ||||
register_command(cmd_ctx, nand_cmd, "verify", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "verify", | |||||
&handle_nand_verify_command, COMMAND_EXEC, | &handle_nand_verify_command, COMMAND_EXEC, | ||||
"verify NAND flash device <num> <filename> <offset> " | "verify NAND flash device <num> <filename> <offset> " | ||||
"[oob_raw | oob_only | oob_softecc | oob_softecc_kw]"); | "[oob_raw | oob_only | oob_softecc | oob_softecc_kw]"); | ||||
register_command(cmd_ctx, nand_cmd, "write", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "write", | |||||
handle_nand_write_command, COMMAND_EXEC, | handle_nand_write_command, COMMAND_EXEC, | ||||
"write to NAND flash device <num> <filename> <offset> " | "write to NAND flash device <num> <filename> <offset> " | ||||
"[oob_raw | oob_only | oob_softecc | oob_softecc_kw]"); | "[oob_raw | oob_only | oob_softecc | oob_softecc_kw]"); | ||||
register_command(cmd_ctx, nand_cmd, "raw_access", | |||||
COMMAND_REGISTER(cmd_ctx, nand_cmd, "raw_access", | |||||
handle_nand_raw_access_command, COMMAND_EXEC, | handle_nand_raw_access_command, COMMAND_EXEC, | ||||
"raw access to NAND flash device <num> ['enable'|'disable']"); | "raw access to NAND flash device <num> ['enable'|'disable']"); | ||||
@@ -885,20 +885,20 @@ COMMAND_HANDLER(pic32mx_handle_pgm_word_command) | |||||
static int pic32mx_register_commands(struct command_context *cmd_ctx) | static int pic32mx_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *pic32mx_cmd = register_command(cmd_ctx, NULL, "pic32mx", | |||||
struct command *pic32mx_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "pic32mx", | |||||
NULL, COMMAND_ANY, "pic32mx flash specific commands"); | NULL, COMMAND_ANY, "pic32mx flash specific commands"); | ||||
#if 0 | #if 0 | ||||
register_command(cmd_ctx, pic32mx_cmd, "lock", | |||||
COMMAND_REGISTER(cmd_ctx, pic32mx_cmd, "lock", | |||||
pic32mx_handle_lock_command, COMMAND_EXEC, | pic32mx_handle_lock_command, COMMAND_EXEC, | ||||
"lock device"); | "lock device"); | ||||
register_command(cmd_ctx, pic32mx_cmd, "unlock", | |||||
COMMAND_REGISTER(cmd_ctx, pic32mx_cmd, "unlock", | |||||
pic32mx_handle_unlock_command, COMMAND_EXEC, | pic32mx_handle_unlock_command, COMMAND_EXEC, | ||||
"unlock protected device"); | "unlock protected device"); | ||||
#endif | #endif | ||||
register_command(cmd_ctx, pic32mx_cmd, "chip_erase", | |||||
COMMAND_REGISTER(cmd_ctx, pic32mx_cmd, "chip_erase", | |||||
pic32mx_handle_chip_erase_command, COMMAND_EXEC, | pic32mx_handle_chip_erase_command, COMMAND_EXEC, | ||||
"erase device"); | "erase device"); | ||||
register_command(cmd_ctx, pic32mx_cmd, "pgm_word", | |||||
COMMAND_REGISTER(cmd_ctx, pic32mx_cmd, "pgm_word", | |||||
pic32mx_handle_pgm_word_command, COMMAND_EXEC, | pic32mx_handle_pgm_word_command, COMMAND_EXEC, | ||||
"program a word"); | "program a word"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -1163,10 +1163,10 @@ COMMAND_HANDLER(stellaris_handle_mass_erase_command) | |||||
static int stellaris_register_commands(struct command_context *cmd_ctx) | static int stellaris_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *stm32x_cmd = register_command(cmd_ctx, NULL, "stellaris", | |||||
struct command *stm32x_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "stellaris", | |||||
NULL, COMMAND_ANY, "stellaris flash specific commands"); | NULL, COMMAND_ANY, "stellaris flash specific commands"); | ||||
register_command(cmd_ctx, stm32x_cmd, "mass_erase", | |||||
COMMAND_REGISTER(cmd_ctx, stm32x_cmd, "mass_erase", | |||||
stellaris_handle_mass_erase_command, COMMAND_EXEC, | stellaris_handle_mass_erase_command, COMMAND_EXEC, | ||||
"mass erase device"); | "mass erase device"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -1184,22 +1184,22 @@ COMMAND_HANDLER(stm32x_handle_mass_erase_command) | |||||
static int stm32x_register_commands(struct command_context *cmd_ctx) | static int stm32x_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *stm32x_cmd = register_command(cmd_ctx, NULL, "stm32x", | |||||
struct command *stm32x_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "stm32x", | |||||
NULL, COMMAND_ANY, "stm32x flash specific commands"); | NULL, COMMAND_ANY, "stm32x flash specific commands"); | ||||
register_command(cmd_ctx, stm32x_cmd, "lock", | |||||
COMMAND_REGISTER(cmd_ctx, stm32x_cmd, "lock", | |||||
stm32x_handle_lock_command, COMMAND_EXEC, | stm32x_handle_lock_command, COMMAND_EXEC, | ||||
"lock device"); | "lock device"); | ||||
register_command(cmd_ctx, stm32x_cmd, "unlock", | |||||
COMMAND_REGISTER(cmd_ctx, stm32x_cmd, "unlock", | |||||
stm32x_handle_unlock_command, COMMAND_EXEC, | stm32x_handle_unlock_command, COMMAND_EXEC, | ||||
"unlock protected device"); | "unlock protected device"); | ||||
register_command(cmd_ctx, stm32x_cmd, "mass_erase", | |||||
COMMAND_REGISTER(cmd_ctx, stm32x_cmd, "mass_erase", | |||||
stm32x_handle_mass_erase_command, COMMAND_EXEC, | stm32x_handle_mass_erase_command, COMMAND_EXEC, | ||||
"mass erase device"); | "mass erase device"); | ||||
register_command(cmd_ctx, stm32x_cmd, "options_read", | |||||
COMMAND_REGISTER(cmd_ctx, stm32x_cmd, "options_read", | |||||
stm32x_handle_options_read_command, COMMAND_EXEC, | stm32x_handle_options_read_command, COMMAND_EXEC, | ||||
"read device option bytes"); | "read device option bytes"); | ||||
register_command(cmd_ctx, stm32x_cmd, "options_write", | |||||
COMMAND_REGISTER(cmd_ctx, stm32x_cmd, "options_write", | |||||
stm32x_handle_options_write_command, COMMAND_EXEC, | stm32x_handle_options_write_command, COMMAND_EXEC, | ||||
"write device option bytes"); | "write device option bytes"); | ||||
@@ -674,10 +674,10 @@ COMMAND_HANDLER(str7x_handle_disable_jtag_command) | |||||
static int str7x_register_commands(struct command_context *cmd_ctx) | static int str7x_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *str7x_cmd = register_command(cmd_ctx, NULL, "str7x", | |||||
struct command *str7x_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "str7x", | |||||
NULL, COMMAND_ANY, "str7x flash specific commands"); | NULL, COMMAND_ANY, "str7x flash specific commands"); | ||||
register_command(cmd_ctx, str7x_cmd, "disable_jtag", | |||||
COMMAND_REGISTER(cmd_ctx, str7x_cmd, "disable_jtag", | |||||
str7x_handle_disable_jtag_command, COMMAND_EXEC, | str7x_handle_disable_jtag_command, COMMAND_EXEC, | ||||
"disable jtag access"); | "disable jtag access"); | ||||
@@ -678,10 +678,10 @@ COMMAND_HANDLER(str9x_handle_flash_config_command) | |||||
static int str9x_register_commands(struct command_context *cmd_ctx) | static int str9x_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *str9x_cmd = register_command(cmd_ctx, NULL, "str9x", | |||||
struct command *str9x_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "str9x", | |||||
NULL, COMMAND_ANY, "str9x flash commands"); | NULL, COMMAND_ANY, "str9x flash commands"); | ||||
register_command(cmd_ctx, str9x_cmd, "flash_config", | |||||
COMMAND_REGISTER(cmd_ctx, str9x_cmd, "flash_config", | |||||
str9x_handle_flash_config_command, COMMAND_EXEC, | str9x_handle_flash_config_command, COMMAND_EXEC, | ||||
"configure str9 flash controller"); | "configure str9 flash controller"); | ||||
@@ -1165,40 +1165,40 @@ COMMAND_HANDLER(str9xpec_handle_flash_disable_turbo_command) | |||||
static int str9xpec_register_commands(struct command_context *cmd_ctx) | static int str9xpec_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *str9xpec_cmd = register_command(cmd_ctx, NULL, "str9xpec", | |||||
struct command *str9xpec_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "str9xpec", | |||||
NULL, COMMAND_ANY, "str9xpec flash specific commands"); | NULL, COMMAND_ANY, "str9xpec flash specific commands"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "enable_turbo", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "enable_turbo", | |||||
str9xpec_handle_flash_enable_turbo_command, | str9xpec_handle_flash_enable_turbo_command, | ||||
COMMAND_EXEC, "enable str9xpec turbo mode"); | COMMAND_EXEC, "enable str9xpec turbo mode"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "disable_turbo", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "disable_turbo", | |||||
str9xpec_handle_flash_disable_turbo_command, | str9xpec_handle_flash_disable_turbo_command, | ||||
COMMAND_EXEC, "disable str9xpec turbo mode"); | COMMAND_EXEC, "disable str9xpec turbo mode"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "options_cmap", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "options_cmap", | |||||
str9xpec_handle_flash_options_cmap_command, | str9xpec_handle_flash_options_cmap_command, | ||||
COMMAND_EXEC, "configure str9xpec boot sector"); | COMMAND_EXEC, "configure str9xpec boot sector"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "options_lvdthd", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "options_lvdthd", | |||||
str9xpec_handle_flash_options_lvdthd_command, | str9xpec_handle_flash_options_lvdthd_command, | ||||
COMMAND_EXEC, "configure str9xpec lvd threshold"); | COMMAND_EXEC, "configure str9xpec lvd threshold"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "options_lvdsel", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "options_lvdsel", | |||||
str9xpec_handle_flash_options_lvdsel_command, | str9xpec_handle_flash_options_lvdsel_command, | ||||
COMMAND_EXEC, "configure str9xpec lvd selection"); | COMMAND_EXEC, "configure str9xpec lvd selection"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "options_lvdwarn", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "options_lvdwarn", | |||||
str9xpec_handle_flash_options_lvdwarn_command, | str9xpec_handle_flash_options_lvdwarn_command, | ||||
COMMAND_EXEC, "configure str9xpec lvd warning"); | COMMAND_EXEC, "configure str9xpec lvd warning"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "options_read", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "options_read", | |||||
str9xpec_handle_flash_options_read_command, | str9xpec_handle_flash_options_read_command, | ||||
COMMAND_EXEC, "read str9xpec options"); | COMMAND_EXEC, "read str9xpec options"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "options_write", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "options_write", | |||||
str9xpec_handle_flash_options_write_command, | str9xpec_handle_flash_options_write_command, | ||||
COMMAND_EXEC, "write str9xpec options"); | COMMAND_EXEC, "write str9xpec options"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "lock", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "lock", | |||||
str9xpec_handle_flash_lock_command, | str9xpec_handle_flash_lock_command, | ||||
COMMAND_EXEC, "lock str9xpec device"); | COMMAND_EXEC, "lock str9xpec device"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "unlock", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "unlock", | |||||
str9xpec_handle_flash_unlock_command, | str9xpec_handle_flash_unlock_command, | ||||
COMMAND_EXEC, "unlock str9xpec device"); | COMMAND_EXEC, "unlock str9xpec device"); | ||||
register_command(cmd_ctx, str9xpec_cmd, "part_id", | |||||
COMMAND_REGISTER(cmd_ctx, str9xpec_cmd, "part_id", | |||||
str9xpec_handle_part_id_command, | str9xpec_handle_part_id_command, | ||||
COMMAND_EXEC, "print part id of str9xpec flash bank <num>"); | COMMAND_EXEC, "print part id of str9xpec flash bank <num>"); | ||||
@@ -819,11 +819,11 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector) | |||||
static int tms470_register_commands(struct command_context *cmd_ctx) | static int tms470_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *tms470_cmd = register_command(cmd_ctx, NULL, "tms470", NULL, COMMAND_ANY, "applies to TI tms470 family"); | |||||
struct command *tms470_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "tms470", NULL, COMMAND_ANY, "applies to TI tms470 family"); | |||||
register_command(cmd_ctx, tms470_cmd, "flash_keyset", tms470_handle_flash_keyset_command, COMMAND_ANY, "tms470 flash_keyset <key0> <key1> <key2> <key3>"); | |||||
register_command(cmd_ctx, tms470_cmd, "osc_megahertz", tms470_handle_osc_megahertz_command, COMMAND_ANY, "tms470 osc_megahertz <MHz>"); | |||||
register_command(cmd_ctx, tms470_cmd, "plldis", tms470_handle_plldis_command, COMMAND_ANY, "tms470 plldis <0/1>"); | |||||
COMMAND_REGISTER(cmd_ctx, tms470_cmd, "flash_keyset", tms470_handle_flash_keyset_command, COMMAND_ANY, "tms470 flash_keyset <key0> <key1> <key2> <key3>"); | |||||
COMMAND_REGISTER(cmd_ctx, tms470_cmd, "osc_megahertz", tms470_handle_osc_megahertz_command, COMMAND_ANY, "tms470 osc_megahertz <MHz>"); | |||||
COMMAND_REGISTER(cmd_ctx, tms470_cmd, "plldis", tms470_handle_plldis_command, COMMAND_ANY, "tms470 plldis <0/1>"); | |||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } | ||||
@@ -56,17 +56,17 @@ COMMAND_HANDLER(handle_flag_command) | |||||
int foo_register_commands(struct command_context *cmd_ctx) | int foo_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
// register several commands under the foo command | // register several commands under the foo command | ||||
struct command *cmd = register_command(cmd_ctx, NULL, "foo", | |||||
struct command *cmd = COMMAND_REGISTER(cmd_ctx, NULL, "foo", | |||||
NULL, COMMAND_ANY, "foo: command handler skeleton"); | NULL, COMMAND_ANY, "foo: command handler skeleton"); | ||||
register_command(cmd_ctx, cmd, "bar", | |||||
COMMAND_REGISTER(cmd_ctx, cmd, "bar", | |||||
&handle_foo_command, COMMAND_ANY, | &handle_foo_command, COMMAND_ANY, | ||||
"<address> [enable|disable] - an example command"); | "<address> [enable|disable] - an example command"); | ||||
register_command(cmd_ctx, cmd, "baz", | |||||
COMMAND_REGISTER(cmd_ctx, cmd, "baz", | |||||
&handle_foo_command, COMMAND_ANY, | &handle_foo_command, COMMAND_ANY, | ||||
"<address> [enable|disable] - a sample command"); | "<address> [enable|disable] - a sample command"); | ||||
register_command(cmd_ctx, cmd, "flag", | |||||
COMMAND_REGISTER(cmd_ctx, cmd, "flag", | |||||
&handle_flag_command, COMMAND_ANY, | &handle_flag_command, COMMAND_ANY, | ||||
"[on|off] - set a flag"); | "[on|off] - set a flag"); | ||||
@@ -103,7 +103,7 @@ int hello_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
foo_register_commands(cmd_ctx); | foo_register_commands(cmd_ctx); | ||||
struct command *cmd = register_command(cmd_ctx, NULL, "hello", | |||||
struct command *cmd = COMMAND_REGISTER(cmd_ctx, NULL, "hello", | |||||
&handle_hello_command, COMMAND_ANY, | &handle_hello_command, COMMAND_ANY, | ||||
"[<name>] - prints a warm welcome"); | "[<name>] - prints a warm welcome"); | ||||
return cmd ? ERROR_OK : -ENOMEM; | return cmd ? ERROR_OK : -ENOMEM; | ||||
@@ -908,7 +908,7 @@ struct command_context* command_init(const char *startup_tcl) | |||||
interp->cb_fflush = openocd_jim_fflush; | interp->cb_fflush = openocd_jim_fflush; | ||||
interp->cb_fgets = openocd_jim_fgets; | interp->cb_fgets = openocd_jim_fgets; | ||||
register_command(context, NULL, "add_help_text", | |||||
COMMAND_REGISTER(context, NULL, "add_help_text", | |||||
handle_help_add_command, COMMAND_ANY, | handle_help_add_command, COMMAND_ANY, | ||||
"<command> [...] <help_text>] - " | "<command> [...] <help_text>] - " | ||||
"add new command help text"); | "add new command help text"); | ||||
@@ -925,12 +925,12 @@ struct command_context* command_init(const char *startup_tcl) | |||||
} | } | ||||
Jim_DeleteAssocData(interp, "context"); | Jim_DeleteAssocData(interp, "context"); | ||||
register_command(context, NULL, "sleep", | |||||
COMMAND_REGISTER(context, NULL, "sleep", | |||||
handle_sleep_command, COMMAND_ANY, | handle_sleep_command, COMMAND_ANY, | ||||
"<n> [busy] - sleep for n milliseconds. " | "<n> [busy] - sleep for n milliseconds. " | ||||
"\"busy\" means busy wait"); | "\"busy\" means busy wait"); | ||||
register_command(context, NULL, "help", | |||||
COMMAND_REGISTER(context, NULL, "help", | |||||
&handle_help_command, COMMAND_ANY, | &handle_help_command, COMMAND_ANY, | ||||
"[<command_name> ...] - show built-in command help"); | "[<command_name> ...] - show built-in command help"); | ||||
@@ -647,22 +647,22 @@ static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc, | |||||
int ioutil_init(struct command_context *cmd_ctx) | int ioutil_init(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "rm", handle_rm_command, COMMAND_ANY, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "rm", handle_rm_command, COMMAND_ANY, | |||||
"remove file"); | "remove file"); | ||||
register_command(cmd_ctx, NULL, "cat", handle_cat_command, COMMAND_ANY, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "cat", handle_cat_command, COMMAND_ANY, | |||||
"display file content"); | "display file content"); | ||||
register_command(cmd_ctx, NULL, "trunc", handle_trunc_command, COMMAND_ANY, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "trunc", handle_trunc_command, COMMAND_ANY, | |||||
"truncate a file to 0 size"); | "truncate a file to 0 size"); | ||||
register_command(cmd_ctx, NULL, "cp", handle_cp_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "cp", handle_cp_command, | |||||
COMMAND_ANY, "copy a file <from> <to>"); | COMMAND_ANY, "copy a file <from> <to>"); | ||||
register_command(cmd_ctx, NULL, "append_file", handle_append_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "append_file", handle_append_command, | |||||
COMMAND_ANY, "append a variable number of strings to a file"); | COMMAND_ANY, "append a variable number of strings to a file"); | ||||
register_command(cmd_ctx, NULL, "meminfo", handle_meminfo_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "meminfo", handle_meminfo_command, | |||||
COMMAND_ANY, "display available ram memory"); | COMMAND_ANY, "display available ram memory"); | ||||
Jim_CreateCommand(interp, "rm", zylinjtag_Jim_Command_rm, NULL, NULL); | Jim_CreateCommand(interp, "rm", zylinjtag_Jim_Command_rm, NULL, NULL); | ||||
@@ -319,9 +319,9 @@ COMMAND_HANDLER(handle_log_output_command) | |||||
int log_register_commands(struct command_context *cmd_ctx) | int log_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
start = timeval_ms(); | start = timeval_ms(); | ||||
register_command(cmd_ctx, NULL, "log_output", handle_log_output_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "log_output", handle_log_output_command, | |||||
COMMAND_ANY, "redirect logging to <file> (default: stderr)"); | COMMAND_ANY, "redirect logging to <file> (default: stderr)"); | ||||
register_command(cmd_ctx, NULL, "debug_level", handle_debug_level_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "debug_level", handle_debug_level_command, | |||||
COMMAND_ANY, "adjust debug level <0-3>"); | COMMAND_ANY, "adjust debug level <0-3>"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -542,10 +542,10 @@ COMMAND_HANDLER(amt_jtagaccel_handle_rtck_command) | |||||
static int amt_jtagaccel_register_commands(struct command_context *cmd_ctx) | static int amt_jtagaccel_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "parport_port", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", | |||||
amt_jtagaccel_handle_parport_port_command, COMMAND_CONFIG, | amt_jtagaccel_handle_parport_port_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
register_command(cmd_ctx, NULL, "rtck", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "rtck", | |||||
amt_jtagaccel_handle_rtck_command, COMMAND_CONFIG, | amt_jtagaccel_handle_rtck_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
@@ -504,7 +504,7 @@ COMMAND_HANDLER(armjtagew_handle_armjtagew_info_command) | |||||
static int armjtagew_register_commands(struct command_context *cmd_ctx) | static int armjtagew_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "armjtagew_info", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "armjtagew_info", | |||||
&armjtagew_handle_armjtagew_info_command, COMMAND_EXEC, | &armjtagew_handle_armjtagew_info_command, COMMAND_EXEC, | ||||
"query armjtagew info"); | "query armjtagew info"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -202,7 +202,7 @@ static int at91rm9200_handle_device_command(struct command_context *cmd_ctx, cha | |||||
static int at91rm9200_register_commands(struct command_context *cmd_ctx) | static int at91rm9200_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "at91rm9200_device", at91rm9200_handle_device_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "at91rm9200_device", at91rm9200_handle_device_command, | |||||
COMMAND_CONFIG, NULL); | COMMAND_CONFIG, NULL); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } | ||||
@@ -3971,20 +3971,20 @@ static void ktlink_blink(void) | |||||
static int ft2232_register_commands(struct command_context* cmd_ctx) | static int ft2232_register_commands(struct command_context* cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "ft2232_device_desc", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_device_desc", | |||||
ft2232_handle_device_desc_command, COMMAND_CONFIG, | ft2232_handle_device_desc_command, COMMAND_CONFIG, | ||||
"the USB device description of the FTDI FT2232 device"); | "the USB device description of the FTDI FT2232 device"); | ||||
register_command(cmd_ctx, NULL, "ft2232_serial", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_serial", | |||||
ft2232_handle_serial_command, COMMAND_CONFIG, | ft2232_handle_serial_command, COMMAND_CONFIG, | ||||
"the serial number of the FTDI FT2232 device"); | "the serial number of the FTDI FT2232 device"); | ||||
register_command(cmd_ctx, NULL, "ft2232_layout", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_layout", | |||||
ft2232_handle_layout_command, COMMAND_CONFIG, | ft2232_handle_layout_command, COMMAND_CONFIG, | ||||
"the layout of the FT2232 GPIO signals used " | "the layout of the FT2232 GPIO signals used " | ||||
"to control output-enables and reset signals"); | "to control output-enables and reset signals"); | ||||
register_command(cmd_ctx, NULL, "ft2232_vid_pid", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_vid_pid", | |||||
ft2232_handle_vid_pid_command, COMMAND_CONFIG, | ft2232_handle_vid_pid_command, COMMAND_CONFIG, | ||||
"the vendor ID and product ID of the FTDI FT2232 device"); | "the vendor ID and product ID of the FTDI FT2232 device"); | ||||
register_command(cmd_ctx, NULL, "ft2232_latency", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_latency", | |||||
ft2232_handle_latency_command, COMMAND_CONFIG, | ft2232_handle_latency_command, COMMAND_CONFIG, | ||||
"set the FT2232 latency timer to a new value"); | "set the FT2232 latency timer to a new value"); | ||||
@@ -564,7 +564,7 @@ COMMAND_HANDLER(gw16012_handle_parport_port_command) | |||||
static int gw16012_register_commands(struct command_context *cmd_ctx) | static int gw16012_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "parport_port", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", | |||||
gw16012_handle_parport_port_command, COMMAND_CONFIG, | gw16012_handle_parport_port_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
@@ -630,10 +630,10 @@ COMMAND_HANDLER(jlink_handle_jlink_hw_jtag_command) | |||||
static int jlink_register_commands(struct command_context *cmd_ctx) | static int jlink_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "jlink_info", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jlink_info", | |||||
&jlink_handle_jlink_info_command, COMMAND_EXEC, | &jlink_handle_jlink_info_command, COMMAND_EXEC, | ||||
"query jlink info"); | "query jlink info"); | ||||
register_command(cmd_ctx, NULL, "jlink_hw_jtag", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jlink_hw_jtag", | |||||
&jlink_handle_jlink_hw_jtag_command, COMMAND_EXEC, | &jlink_handle_jlink_hw_jtag_command, COMMAND_EXEC, | ||||
"set/get jlink hw jtag command version [2 | 3]"); | "set/get jlink hw jtag command version [2 | 3]"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -484,22 +484,22 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command) | |||||
static int parport_register_commands(struct command_context *cmd_ctx) | static int parport_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "parport_port", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", | |||||
parport_handle_parport_port_command, COMMAND_CONFIG, | parport_handle_parport_port_command, COMMAND_CONFIG, | ||||
"either the address of the I/O port " | "either the address of the I/O port " | ||||
"or the number of the '/dev/parport' device"); | "or the number of the '/dev/parport' device"); | ||||
register_command(cmd_ctx, NULL, "parport_cable", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_cable", | |||||
parport_handle_parport_cable_command, COMMAND_CONFIG, | parport_handle_parport_cable_command, COMMAND_CONFIG, | ||||
"the layout of the parallel port cable " | "the layout of the parallel port cable " | ||||
"used to connect to the target"); | "used to connect to the target"); | ||||
register_command(cmd_ctx, NULL, "parport_write_on_exit", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_write_on_exit", | |||||
parport_handle_write_on_exit_command, COMMAND_CONFIG, | parport_handle_write_on_exit_command, COMMAND_CONFIG, | ||||
"configure the parallel driver to write " | "configure the parallel driver to write " | ||||
"a known value to the parallel interface"); | "a known value to the parallel interface"); | ||||
register_command(cmd_ctx, NULL, "parport_toggling_time", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_toggling_time", | |||||
parport_handle_parport_toggling_time_command, COMMAND_ANY, | parport_handle_parport_toggling_time_command, COMMAND_ANY, | ||||
"time <ns> it takes for the hardware to toggle TCK"); | "time <ns> it takes for the hardware to toggle TCK"); | ||||
@@ -741,7 +741,7 @@ COMMAND_HANDLER(presto_handle_serial_command) | |||||
static int presto_jtag_register_commands(struct command_context *cmd_ctx) | static int presto_jtag_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "presto_serial", presto_handle_serial_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "presto_serial", presto_handle_serial_command, | |||||
COMMAND_CONFIG, NULL); | COMMAND_CONFIG, NULL); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } | ||||
@@ -1418,21 +1418,21 @@ int jtag_register_commands(struct command_context *cmd_ctx) | |||||
register_jim(cmd_ctx, "jtag", jim_jtag_command, | register_jim(cmd_ctx, "jtag", jim_jtag_command, | ||||
"perform jtag tap actions"); | "perform jtag tap actions"); | ||||
register_command(cmd_ctx, NULL, "interface", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "interface", | |||||
handle_interface_command, COMMAND_CONFIG, | handle_interface_command, COMMAND_CONFIG, | ||||
"try to configure interface"); | "try to configure interface"); | ||||
register_command(cmd_ctx, NULL, "interface_list", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "interface_list", | |||||
&handle_interface_list_command, COMMAND_ANY, | &handle_interface_list_command, COMMAND_ANY, | ||||
"list all built-in interfaces"); | "list all built-in interfaces"); | ||||
register_command(cmd_ctx, NULL, "jtag_khz", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_khz", | |||||
handle_jtag_khz_command, COMMAND_ANY, | handle_jtag_khz_command, COMMAND_ANY, | ||||
"set maximum jtag speed (if supported); " | "set maximum jtag speed (if supported); " | ||||
"parameter is maximum khz, or 0 for adaptive clocking (RTCK)."); | "parameter is maximum khz, or 0 for adaptive clocking (RTCK)."); | ||||
register_command(cmd_ctx, NULL, "jtag_rclk", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_rclk", | |||||
handle_jtag_rclk_command, COMMAND_ANY, | handle_jtag_rclk_command, COMMAND_ANY, | ||||
"fallback_speed_khz - set JTAG speed to RCLK or use fallback speed"); | "fallback_speed_khz - set JTAG speed to RCLK or use fallback speed"); | ||||
register_command(cmd_ctx, NULL, "reset_config", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "reset_config", | |||||
handle_reset_config_command, COMMAND_ANY, | handle_reset_config_command, COMMAND_ANY, | ||||
"reset_config " | "reset_config " | ||||
"[none|trst_only|srst_only|trst_and_srst] " | "[none|trst_only|srst_only|trst_and_srst] " | ||||
@@ -1441,35 +1441,35 @@ int jtag_register_commands(struct command_context *cmd_ctx) | |||||
"[trst_push_pull|trst_open_drain] " | "[trst_push_pull|trst_open_drain] " | ||||
"[srst_push_pull|srst_open_drain]"); | "[srst_push_pull|srst_open_drain]"); | ||||
register_command(cmd_ctx, NULL, "jtag_nsrst_delay", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_nsrst_delay", | |||||
handle_jtag_nsrst_delay_command, COMMAND_ANY, | handle_jtag_nsrst_delay_command, COMMAND_ANY, | ||||
"jtag_nsrst_delay <ms> " | "jtag_nsrst_delay <ms> " | ||||
"- delay after deasserting srst in ms"); | "- delay after deasserting srst in ms"); | ||||
register_command(cmd_ctx, NULL, "jtag_ntrst_delay", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_ntrst_delay", | |||||
handle_jtag_ntrst_delay_command, COMMAND_ANY, | handle_jtag_ntrst_delay_command, COMMAND_ANY, | ||||
"jtag_ntrst_delay <ms> " | "jtag_ntrst_delay <ms> " | ||||
"- delay after deasserting trst in ms"); | "- delay after deasserting trst in ms"); | ||||
register_command(cmd_ctx, NULL, "jtag_nsrst_assert_width", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_nsrst_assert_width", | |||||
handle_jtag_nsrst_assert_width_command, COMMAND_ANY, | handle_jtag_nsrst_assert_width_command, COMMAND_ANY, | ||||
"jtag_nsrst_assert_width <ms> " | "jtag_nsrst_assert_width <ms> " | ||||
"- delay after asserting srst in ms"); | "- delay after asserting srst in ms"); | ||||
register_command(cmd_ctx, NULL, "jtag_ntrst_assert_width", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_ntrst_assert_width", | |||||
handle_jtag_ntrst_assert_width_command, COMMAND_ANY, | handle_jtag_ntrst_assert_width_command, COMMAND_ANY, | ||||
"jtag_ntrst_assert_width <ms> " | "jtag_ntrst_assert_width <ms> " | ||||
"- delay after asserting trst in ms"); | "- delay after asserting trst in ms"); | ||||
register_command(cmd_ctx, NULL, "scan_chain", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "scan_chain", | |||||
handle_scan_chain_command, COMMAND_EXEC, | handle_scan_chain_command, COMMAND_EXEC, | ||||
"print current scan chain configuration"); | "print current scan chain configuration"); | ||||
register_command(cmd_ctx, NULL, "jtag_reset", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "jtag_reset", | |||||
handle_jtag_reset_command, COMMAND_EXEC, | handle_jtag_reset_command, COMMAND_EXEC, | ||||
"toggle reset lines <trst> <srst>"); | "toggle reset lines <trst> <srst>"); | ||||
register_command(cmd_ctx, NULL, "runtest", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "runtest", | |||||
handle_runtest_command, COMMAND_EXEC, | handle_runtest_command, COMMAND_EXEC, | ||||
"move to Run-Test/Idle, and execute <num_cycles>"); | "move to Run-Test/Idle, and execute <num_cycles>"); | ||||
register_command(cmd_ctx, NULL, "irscan", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "irscan", | |||||
handle_irscan_command, COMMAND_EXEC, | handle_irscan_command, COMMAND_EXEC, | ||||
"execute IR scan <device> <instr> [dev2] [instr2] ..."); | "execute IR scan <device> <instr> [dev2] [instr2] ..."); | ||||
@@ -1484,14 +1484,14 @@ int jtag_register_commands(struct command_context *cmd_ctx) | |||||
"<state1>,<state2>,<state3>... " | "<state1>,<state2>,<state3>... " | ||||
"- move JTAG to state1 then to state2, state3, etc."); | "- move JTAG to state1 then to state2, state3, etc."); | ||||
register_command(cmd_ctx, NULL, "verify_ircapture", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "verify_ircapture", | |||||
handle_verify_ircapture_command, COMMAND_ANY, | handle_verify_ircapture_command, COMMAND_ANY, | ||||
"verify value captured during Capture-IR <enable | disable>"); | "verify value captured during Capture-IR <enable | disable>"); | ||||
register_command(cmd_ctx, NULL, "verify_jtag", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "verify_jtag", | |||||
handle_verify_jtag_command, COMMAND_ANY, | handle_verify_jtag_command, COMMAND_ANY, | ||||
"verify value capture <enable | disable>"); | "verify value capture <enable | disable>"); | ||||
register_command(cmd_ctx, NULL, "tms_sequence", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "tms_sequence", | |||||
handle_tms_sequence_command, COMMAND_ANY, | handle_tms_sequence_command, COMMAND_ANY, | ||||
"choose short(default) or long tms_sequence <short | long>"); | "choose short(default) or long tms_sequence <short | long>"); | ||||
@@ -1858,22 +1858,22 @@ static void vsllink_debug_buffer(uint8_t *buffer, int length) | |||||
static int vsllink_register_commands(struct command_context *cmd_ctx) | static int vsllink_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "vsllink_usb_vid", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "vsllink_usb_vid", | |||||
vsllink_handle_usb_vid_command, COMMAND_CONFIG, | vsllink_handle_usb_vid_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
register_command(cmd_ctx, NULL, "vsllink_usb_pid", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "vsllink_usb_pid", | |||||
vsllink_handle_usb_pid_command, COMMAND_CONFIG, | vsllink_handle_usb_pid_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
register_command(cmd_ctx, NULL, "vsllink_usb_bulkin", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "vsllink_usb_bulkin", | |||||
vsllink_handle_usb_bulkin_command, COMMAND_CONFIG, | vsllink_handle_usb_bulkin_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
register_command(cmd_ctx, NULL, "vsllink_usb_bulkout", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "vsllink_usb_bulkout", | |||||
vsllink_handle_usb_bulkout_command, COMMAND_CONFIG, | vsllink_handle_usb_bulkout_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
register_command(cmd_ctx, NULL, "vsllink_usb_interface", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "vsllink_usb_interface", | |||||
vsllink_handle_usb_interface_command, COMMAND_CONFIG, | vsllink_handle_usb_interface_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
register_command(cmd_ctx, NULL, "vsllink_mode", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "vsllink_mode", | |||||
vsllink_handle_mode_command, COMMAND_CONFIG, | vsllink_handle_mode_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
@@ -372,7 +372,7 @@ zylinjtag_Jim_Command_powerstatus(Jim_Interp *interp, | |||||
int zy1000_register_commands(struct command_context *cmd_ctx) | int zy1000_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "power", handle_power_command, COMMAND_ANY, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "power", handle_power_command, COMMAND_ANY, | |||||
"power <on/off> - turn power switch to target on/off. No arguments - print status."); | "power <on/off> - turn power switch to target on/off. No arguments - print status."); | ||||
Jim_CreateCommand(interp, "zy1000_version", jim_zy1000_version, NULL, NULL); | Jim_CreateCommand(interp, "zy1000_version", jim_zy1000_version, NULL, NULL); | ||||
@@ -171,7 +171,7 @@ struct command_context *setup_command_handler(void) | |||||
global_cmd_ctx = cmd_ctx = command_init(openocd_startup_tcl); | global_cmd_ctx = cmd_ctx = command_init(openocd_startup_tcl); | ||||
register_command(cmd_ctx, NULL, "version", handle_version_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "version", handle_version_command, | |||||
COMMAND_EXEC, "show OpenOCD version"); | COMMAND_EXEC, "show OpenOCD version"); | ||||
/* register subsystem commands */ | /* register subsystem commands */ | ||||
@@ -198,7 +198,7 @@ struct command_context *setup_command_handler(void) | |||||
LOG_OUTPUT(OPENOCD_VERSION "\n"); | LOG_OUTPUT(OPENOCD_VERSION "\n"); | ||||
register_command(cmd_ctx, NULL, "init", handle_init_command, | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "init", handle_init_command, | |||||
COMMAND_ANY, "initializes target and servers - nop on subsequent invocations"); | COMMAND_ANY, "initializes target and servers - nop on subsequent invocations"); | ||||
return cmd_ctx; | return cmd_ctx; | ||||
@@ -189,10 +189,10 @@ int pld_init(struct command_context *cmd_ctx) | |||||
if (!pld_devices) | if (!pld_devices) | ||||
return ERROR_OK; | return ERROR_OK; | ||||
register_command(cmd_ctx, pld_cmd, "devices", | |||||
COMMAND_REGISTER(cmd_ctx, pld_cmd, "devices", | |||||
handle_pld_devices_command, COMMAND_EXEC, | handle_pld_devices_command, COMMAND_EXEC, | ||||
"list configured pld devices"); | "list configured pld devices"); | ||||
register_command(cmd_ctx, pld_cmd, "load", | |||||
COMMAND_REGISTER(cmd_ctx, pld_cmd, "load", | |||||
handle_pld_load_command, COMMAND_EXEC, | handle_pld_load_command, COMMAND_EXEC, | ||||
"load configuration <file> into programmable logic device"); | "load configuration <file> into programmable logic device"); | ||||
@@ -201,9 +201,9 @@ int pld_init(struct command_context *cmd_ctx) | |||||
int pld_register_commands(struct command_context *cmd_ctx) | int pld_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
pld_cmd = register_command(cmd_ctx, NULL, "pld", NULL, COMMAND_ANY, "programmable logic device commands"); | |||||
pld_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "pld", NULL, COMMAND_ANY, "programmable logic device commands"); | |||||
register_command(cmd_ctx, pld_cmd, "device", handle_pld_device_command, COMMAND_CONFIG, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, pld_cmd, "device", handle_pld_device_command, COMMAND_CONFIG, NULL); | |||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } |
@@ -235,10 +235,10 @@ PLD_DEVICE_COMMAND_HANDLER(virtex2_pld_device_command) | |||||
static int virtex2_register_commands(struct command_context *cmd_ctx) | static int virtex2_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *virtex2_cmd = register_command(cmd_ctx, NULL, "virtex2", | |||||
struct command *virtex2_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "virtex2", | |||||
NULL, COMMAND_ANY, "virtex2 specific commands"); | NULL, COMMAND_ANY, "virtex2 specific commands"); | ||||
register_command(cmd_ctx, virtex2_cmd, "read_stat", | |||||
COMMAND_REGISTER(cmd_ctx, virtex2_cmd, "read_stat", | |||||
&virtex2_handle_read_stat_command, COMMAND_EXEC, | &virtex2_handle_read_stat_command, COMMAND_EXEC, | ||||
"read Virtex-II status register"); | "read Virtex-II status register"); | ||||
@@ -2328,23 +2328,23 @@ COMMAND_HANDLER(handle_gdb_breakpoint_override_command) | |||||
int gdb_register_commands(struct command_context *command_context) | int gdb_register_commands(struct command_context *command_context) | ||||
{ | { | ||||
register_command(command_context, NULL, "gdb_sync", | |||||
COMMAND_REGISTER(command_context, NULL, "gdb_sync", | |||||
handle_gdb_sync_command, COMMAND_ANY, | handle_gdb_sync_command, COMMAND_ANY, | ||||
"next stepi will return immediately allowing GDB to " | "next stepi will return immediately allowing GDB to " | ||||
"fetch register state without affecting target state"); | "fetch register state without affecting target state"); | ||||
register_command(command_context, NULL, "gdb_port", | |||||
COMMAND_REGISTER(command_context, NULL, "gdb_port", | |||||
handle_gdb_port_command, COMMAND_ANY, | handle_gdb_port_command, COMMAND_ANY, | ||||
"daemon configuration command gdb_port"); | "daemon configuration command gdb_port"); | ||||
register_command(command_context, NULL, "gdb_memory_map", | |||||
COMMAND_REGISTER(command_context, NULL, "gdb_memory_map", | |||||
handle_gdb_memory_map_command, COMMAND_CONFIG, | handle_gdb_memory_map_command, COMMAND_CONFIG, | ||||
"enable or disable memory map"); | "enable or disable memory map"); | ||||
register_command(command_context, NULL, "gdb_flash_program", | |||||
COMMAND_REGISTER(command_context, NULL, "gdb_flash_program", | |||||
handle_gdb_flash_program_command, COMMAND_CONFIG, | handle_gdb_flash_program_command, COMMAND_CONFIG, | ||||
"enable or disable flash program"); | "enable or disable flash program"); | ||||
register_command(command_context, NULL, "gdb_report_data_abort", | |||||
COMMAND_REGISTER(command_context, NULL, "gdb_report_data_abort", | |||||
handle_gdb_report_data_abort_command, COMMAND_CONFIG, | handle_gdb_report_data_abort_command, COMMAND_CONFIG, | ||||
"enable or disable reporting data aborts"); | "enable or disable reporting data aborts"); | ||||
register_command(command_context, NULL, "gdb_breakpoint_override", | |||||
COMMAND_REGISTER(command_context, NULL, "gdb_breakpoint_override", | |||||
handle_gdb_breakpoint_override_command, COMMAND_EXEC, | handle_gdb_breakpoint_override_command, COMMAND_EXEC, | ||||
"hard/soft/disable - force type of breakpoint " | "hard/soft/disable - force type of breakpoint " | ||||
"used by gdb 'break' commands."); | "used by gdb 'break' commands."); | ||||
@@ -541,7 +541,7 @@ COMMAND_HANDLER(handle_shutdown_command) | |||||
int server_register_commands(struct command_context *context) | int server_register_commands(struct command_context *context) | ||||
{ | { | ||||
register_command(context, NULL, "shutdown", | |||||
COMMAND_REGISTER(context, NULL, "shutdown", | |||||
handle_shutdown_command, COMMAND_ANY, | handle_shutdown_command, COMMAND_ANY, | ||||
"shut the server down"); | "shut the server down"); | ||||
@@ -177,7 +177,7 @@ COMMAND_HANDLER(handle_tcl_port_command) | |||||
int tcl_register_commands(struct command_context *cmd_ctx) | int tcl_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "tcl_port", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "tcl_port", | |||||
handle_tcl_port_command, COMMAND_CONFIG, | handle_tcl_port_command, COMMAND_CONFIG, | ||||
"port on which to listen for incoming TCL syntax"); | "port on which to listen for incoming TCL syntax"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -618,11 +618,11 @@ COMMAND_HANDLER(handle_exit_command) | |||||
int telnet_register_commands(struct command_context *command_context) | int telnet_register_commands(struct command_context *command_context) | ||||
{ | { | ||||
register_command(command_context, NULL, "exit", | |||||
COMMAND_REGISTER(command_context, NULL, "exit", | |||||
&handle_exit_command, COMMAND_EXEC, | &handle_exit_command, COMMAND_EXEC, | ||||
"exit telnet session"); | "exit telnet session"); | ||||
register_command(command_context, NULL, "telnet_port", | |||||
COMMAND_REGISTER(command_context, NULL, "telnet_port", | |||||
&handle_telnet_port_command, COMMAND_ANY, | &handle_telnet_port_command, COMMAND_ANY, | ||||
"port on which to listen for incoming telnet connections"); | "port on which to listen for incoming telnet connections"); | ||||
@@ -1462,7 +1462,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str) | |||||
int svf_register_commands(struct command_context *cmd_ctx) | int svf_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "svf", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "svf", | |||||
&handle_svf_command, COMMAND_EXEC, | &handle_svf_command, COMMAND_EXEC, | ||||
"run svf <file>"); | "run svf <file>"); | ||||
@@ -1571,34 +1571,34 @@ static int arm11_register_commands(struct command_context *cmd_ctx) | |||||
armv4_5_register_commands(cmd_ctx); | armv4_5_register_commands(cmd_ctx); | ||||
top_cmd = register_command(cmd_ctx, NULL, "arm11", | |||||
top_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm11", | |||||
NULL, COMMAND_ANY, NULL); | NULL, COMMAND_ANY, NULL); | ||||
/* "hardware_step" is only here to check if the default | /* "hardware_step" is only here to check if the default | ||||
* simulate + breakpoint implementation is broken. | * simulate + breakpoint implementation is broken. | ||||
* TEMPORARY! NOT DOCUMENTED! | * TEMPORARY! NOT DOCUMENTED! | ||||
*/ | */ | ||||
register_command(cmd_ctx, top_cmd, "hardware_step", | |||||
COMMAND_REGISTER(cmd_ctx, top_cmd, "hardware_step", | |||||
arm11_handle_bool_hardware_step, COMMAND_ANY, | arm11_handle_bool_hardware_step, COMMAND_ANY, | ||||
"DEBUG ONLY - Hardware single stepping" | "DEBUG ONLY - Hardware single stepping" | ||||
" (default: disabled)"); | " (default: disabled)"); | ||||
mw_cmd = register_command(cmd_ctx, top_cmd, "memwrite", | |||||
mw_cmd = COMMAND_REGISTER(cmd_ctx, top_cmd, "memwrite", | |||||
NULL, COMMAND_ANY, NULL); | NULL, COMMAND_ANY, NULL); | ||||
register_command(cmd_ctx, mw_cmd, "burst", | |||||
COMMAND_REGISTER(cmd_ctx, mw_cmd, "burst", | |||||
arm11_handle_bool_memwrite_burst, COMMAND_ANY, | arm11_handle_bool_memwrite_burst, COMMAND_ANY, | ||||
"Enable/Disable non-standard but fast burst mode" | "Enable/Disable non-standard but fast burst mode" | ||||
" (default: enabled)"); | " (default: enabled)"); | ||||
register_command(cmd_ctx, mw_cmd, "error_fatal", | |||||
COMMAND_REGISTER(cmd_ctx, mw_cmd, "error_fatal", | |||||
arm11_handle_bool_memwrite_error_fatal, COMMAND_ANY, | arm11_handle_bool_memwrite_error_fatal, COMMAND_ANY, | ||||
"Terminate program if transfer error was found" | "Terminate program if transfer error was found" | ||||
" (default: enabled)"); | " (default: enabled)"); | ||||
register_command(cmd_ctx, top_cmd, "step_irq_enable", | |||||
COMMAND_REGISTER(cmd_ctx, top_cmd, "step_irq_enable", | |||||
arm11_handle_bool_step_irq_enable, COMMAND_ANY, | arm11_handle_bool_step_irq_enable, COMMAND_ANY, | ||||
"Enable interrupts while stepping" | "Enable interrupts while stepping" | ||||
" (default: disabled)"); | " (default: disabled)"); | ||||
register_command(cmd_ctx, top_cmd, "vcr", | |||||
COMMAND_REGISTER(cmd_ctx, top_cmd, "vcr", | |||||
arm11_handle_vcr, COMMAND_ANY, | arm11_handle_vcr, COMMAND_ANY, | ||||
"Control (Interrupt) Vector Catch Register"); | "Control (Interrupt) Vector Catch Register"); | ||||
@@ -499,11 +499,11 @@ static int arm720t_register_commands(struct command_context *cmd_ctx) | |||||
retval = arm7_9_register_commands(cmd_ctx); | retval = arm7_9_register_commands(cmd_ctx); | ||||
arm720t_cmd = register_command(cmd_ctx, NULL, "arm720t", | |||||
arm720t_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm720t", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"arm720t specific commands"); | "arm720t specific commands"); | ||||
register_command(cmd_ctx, arm720t_cmd, "cp15", | |||||
COMMAND_REGISTER(cmd_ctx, arm720t_cmd, "cp15", | |||||
arm720t_handle_cp15_command, COMMAND_EXEC, | arm720t_handle_cp15_command, COMMAND_EXEC, | ||||
"display/modify cp15 register <opcode> [value]"); | "display/modify cp15 register <opcode> [value]"); | ||||
@@ -2851,18 +2851,18 @@ int arm7_9_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *arm7_9_cmd; | struct command *arm7_9_cmd; | ||||
arm7_9_cmd = register_command(cmd_ctx, NULL, "arm7_9", | |||||
arm7_9_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm7_9", | |||||
NULL, COMMAND_ANY, "arm7/9 specific commands"); | NULL, COMMAND_ANY, "arm7/9 specific commands"); | ||||
register_command(cmd_ctx, arm7_9_cmd, "dbgrq", | |||||
COMMAND_REGISTER(cmd_ctx, arm7_9_cmd, "dbgrq", | |||||
handle_arm7_9_dbgrq_command, COMMAND_ANY, | handle_arm7_9_dbgrq_command, COMMAND_ANY, | ||||
"use EmbeddedICE dbgrq instead of breakpoint " | "use EmbeddedICE dbgrq instead of breakpoint " | ||||
"for target halt requests <enable | disable>"); | "for target halt requests <enable | disable>"); | ||||
register_command(cmd_ctx, arm7_9_cmd, "fast_memory_access", | |||||
COMMAND_REGISTER(cmd_ctx, arm7_9_cmd, "fast_memory_access", | |||||
handle_arm7_9_fast_memory_access_command, COMMAND_ANY, | handle_arm7_9_fast_memory_access_command, COMMAND_ANY, | ||||
"use fast memory accesses instead of slower " | "use fast memory accesses instead of slower " | ||||
"but potentially safer accesses <enable | disable>"); | "but potentially safer accesses <enable | disable>"); | ||||
register_command(cmd_ctx, arm7_9_cmd, "dcc_downloads", | |||||
COMMAND_REGISTER(cmd_ctx, arm7_9_cmd, "dcc_downloads", | |||||
handle_arm7_9_dcc_downloads_command, COMMAND_ANY, | handle_arm7_9_dcc_downloads_command, COMMAND_ANY, | ||||
"use DCC downloads for larger memory writes <enable | disable>"); | "use DCC downloads for larger memory writes <enable | disable>"); | ||||
@@ -1369,24 +1369,24 @@ int arm920t_register_commands(struct command_context *cmd_ctx) | |||||
retval = arm9tdmi_register_commands(cmd_ctx); | retval = arm9tdmi_register_commands(cmd_ctx); | ||||
arm920t_cmd = register_command(cmd_ctx, NULL, "arm920t", | |||||
arm920t_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm920t", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"arm920t specific commands"); | "arm920t specific commands"); | ||||
register_command(cmd_ctx, arm920t_cmd, "cp15", | |||||
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "cp15", | |||||
arm920t_handle_cp15_command, COMMAND_EXEC, | arm920t_handle_cp15_command, COMMAND_EXEC, | ||||
"display/modify cp15 register <num> [value]"); | "display/modify cp15 register <num> [value]"); | ||||
register_command(cmd_ctx, arm920t_cmd, "cp15i", | |||||
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "cp15i", | |||||
arm920t_handle_cp15i_command, COMMAND_EXEC, | arm920t_handle_cp15i_command, COMMAND_EXEC, | ||||
"display/modify cp15 (interpreted access) " | "display/modify cp15 (interpreted access) " | ||||
"<opcode> [value] [address]"); | "<opcode> [value] [address]"); | ||||
register_command(cmd_ctx, arm920t_cmd, "cache_info", | |||||
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "cache_info", | |||||
arm920t_handle_cache_info_command, COMMAND_EXEC, | arm920t_handle_cache_info_command, COMMAND_EXEC, | ||||
"display information about target caches"); | "display information about target caches"); | ||||
register_command(cmd_ctx, arm920t_cmd, "read_cache", | |||||
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "read_cache", | |||||
arm920t_handle_read_cache_command, COMMAND_EXEC, | arm920t_handle_read_cache_command, COMMAND_EXEC, | ||||
"display I/D cache content"); | "display I/D cache content"); | ||||
register_command(cmd_ctx, arm920t_cmd, "read_mmu", | |||||
COMMAND_REGISTER(cmd_ctx, arm920t_cmd, "read_mmu", | |||||
arm920t_handle_read_mmu_command, COMMAND_EXEC, | arm920t_handle_read_mmu_command, COMMAND_EXEC, | ||||
"display I/D mmu content"); | "display I/D mmu content"); | ||||
@@ -764,11 +764,11 @@ int arm926ejs_register_commands(struct command_context *cmd_ctx) | |||||
retval = arm9tdmi_register_commands(cmd_ctx); | retval = arm9tdmi_register_commands(cmd_ctx); | ||||
arm926ejs_cmd = register_command(cmd_ctx, NULL, "arm926ejs", | |||||
arm926ejs_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm926ejs", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"arm926ejs specific commands"); | "arm926ejs specific commands"); | ||||
register_command(cmd_ctx, arm926ejs_cmd, "cache_info", | |||||
COMMAND_REGISTER(cmd_ctx, arm926ejs_cmd, "cache_info", | |||||
arm926ejs_handle_cache_info_command, COMMAND_EXEC, | arm926ejs_handle_cache_info_command, COMMAND_EXEC, | ||||
"display information about target caches"); | "display information about target caches"); | ||||
@@ -228,10 +228,10 @@ int arm966e_register_commands(struct command_context *cmd_ctx) | |||||
struct command *arm966e_cmd; | struct command *arm966e_cmd; | ||||
retval = arm9tdmi_register_commands(cmd_ctx); | retval = arm9tdmi_register_commands(cmd_ctx); | ||||
arm966e_cmd = register_command(cmd_ctx, NULL, "arm966e", | |||||
arm966e_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm966e", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"arm966e specific commands"); | "arm966e specific commands"); | ||||
register_command(cmd_ctx, arm966e_cmd, "cp15", | |||||
COMMAND_REGISTER(cmd_ctx, arm966e_cmd, "cp15", | |||||
arm966e_handle_cp15_command, COMMAND_EXEC, | arm966e_handle_cp15_command, COMMAND_EXEC, | ||||
"display/modify cp15 register <num> [value]"); | "display/modify cp15 register <num> [value]"); | ||||
@@ -914,10 +914,10 @@ int arm9tdmi_register_commands(struct command_context *cmd_ctx) | |||||
struct command *arm9tdmi_cmd; | struct command *arm9tdmi_cmd; | ||||
retval = arm7_9_register_commands(cmd_ctx); | retval = arm7_9_register_commands(cmd_ctx); | ||||
arm9tdmi_cmd = register_command(cmd_ctx, NULL, "arm9", | |||||
arm9tdmi_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm9", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"arm9 specific commands"); | "arm9 specific commands"); | ||||
register_command(cmd_ctx, arm9tdmi_cmd, "vector_catch", | |||||
COMMAND_REGISTER(cmd_ctx, arm9tdmi_cmd, "vector_catch", | |||||
handle_arm9tdmi_catch_vectors_command, COMMAND_EXEC, | handle_arm9tdmi_catch_vectors_command, COMMAND_EXEC, | ||||
"arm9 vector_catch [all|none|reset|undef|swi|pabt|dabt|irq|fiq] ..."); | "arm9 vector_catch [all|none|reset|undef|swi|pabt|dabt|irq|fiq] ..."); | ||||
@@ -790,17 +790,17 @@ int armv4_5_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *armv4_5_cmd; | struct command *armv4_5_cmd; | ||||
armv4_5_cmd = register_command(cmd_ctx, NULL, "arm", | |||||
armv4_5_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "arm", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"generic ARM commands"); | "generic ARM commands"); | ||||
register_command(cmd_ctx, armv4_5_cmd, "reg", | |||||
COMMAND_REGISTER(cmd_ctx, armv4_5_cmd, "reg", | |||||
handle_armv4_5_reg_command, COMMAND_EXEC, | handle_armv4_5_reg_command, COMMAND_EXEC, | ||||
"display ARM core registers"); | "display ARM core registers"); | ||||
register_command(cmd_ctx, armv4_5_cmd, "core_state", | |||||
COMMAND_REGISTER(cmd_ctx, armv4_5_cmd, "core_state", | |||||
handle_armv4_5_core_state_command, COMMAND_EXEC, | handle_armv4_5_core_state_command, COMMAND_EXEC, | ||||
"display/change ARM core state <arm | thumb>"); | "display/change ARM core state <arm | thumb>"); | ||||
register_command(cmd_ctx, armv4_5_cmd, "disassemble", | |||||
COMMAND_REGISTER(cmd_ctx, armv4_5_cmd, "disassemble", | |||||
handle_armv4_5_disassemble_command, COMMAND_EXEC, | handle_armv4_5_disassemble_command, COMMAND_EXEC, | ||||
"disassemble instructions " | "disassemble instructions " | ||||
"<address> [<count> ['thumb']]"); | "<address> [<count> ['thumb']]"); | ||||
@@ -148,26 +148,26 @@ int armv7a_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *arm_adi_v5_dap_cmd; | struct command *arm_adi_v5_dap_cmd; | ||||
arm_adi_v5_dap_cmd = register_command(cmd_ctx, NULL, "dap", | |||||
arm_adi_v5_dap_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "dap", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"cortex dap specific commands"); | "cortex dap specific commands"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "info", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "info", | |||||
handle_dap_info_command, COMMAND_EXEC, | handle_dap_info_command, COMMAND_EXEC, | ||||
"dap info for ap [num], " | "dap info for ap [num], " | ||||
"default currently selected AP"); | "default currently selected AP"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apsel", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apsel", | |||||
handle_dap_apsel_command, COMMAND_EXEC, | handle_dap_apsel_command, COMMAND_EXEC, | ||||
"select a different AP [num] (default 0)"); | "select a different AP [num] (default 0)"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apid", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apid", | |||||
handle_dap_apid_command, COMMAND_EXEC, | handle_dap_apid_command, COMMAND_EXEC, | ||||
"return id reg from AP [num], " | "return id reg from AP [num], " | ||||
"default currently selected AP"); | "default currently selected AP"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr", | |||||
handle_dap_baseaddr_command, COMMAND_EXEC, | handle_dap_baseaddr_command, COMMAND_EXEC, | ||||
"return debug base address from AP [num], " | "return debug base address from AP [num], " | ||||
"default currently selected AP"); | "default currently selected AP"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess", | |||||
handle_dap_memaccess_command, COMMAND_EXEC, | handle_dap_memaccess_command, COMMAND_EXEC, | ||||
"set/get number of extra tck for mem-ap memory " | "set/get number of extra tck for mem-ap memory " | ||||
"bus access [0-255]"); | "bus access [0-255]"); | ||||
@@ -800,26 +800,26 @@ int armv7m_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *arm_adi_v5_dap_cmd; | struct command *arm_adi_v5_dap_cmd; | ||||
arm_adi_v5_dap_cmd = register_command(cmd_ctx, NULL, "dap", | |||||
arm_adi_v5_dap_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "dap", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"cortex dap specific commands"); | "cortex dap specific commands"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "info", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "info", | |||||
handle_dap_info_command, COMMAND_EXEC, | handle_dap_info_command, COMMAND_EXEC, | ||||
"Displays dap info for ap [num]," | "Displays dap info for ap [num]," | ||||
"default currently selected AP"); | "default currently selected AP"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apsel", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apsel", | |||||
handle_dap_apsel_command, COMMAND_EXEC, | handle_dap_apsel_command, COMMAND_EXEC, | ||||
"Select a different AP [num] (default 0)"); | "Select a different AP [num] (default 0)"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apid", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apid", | |||||
handle_dap_apid_command, COMMAND_EXEC, | handle_dap_apid_command, COMMAND_EXEC, | ||||
"Displays id reg from AP [num], " | "Displays id reg from AP [num], " | ||||
"default currently selected AP"); | "default currently selected AP"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr", | |||||
handle_dap_baseaddr_command, COMMAND_EXEC, | handle_dap_baseaddr_command, COMMAND_EXEC, | ||||
"Displays debug base address from AP [num]," | "Displays debug base address from AP [num]," | ||||
"default currently selected AP"); | "default currently selected AP"); | ||||
register_command(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess", | |||||
COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess", | |||||
handle_dap_memaccess_command, COMMAND_EXEC, | handle_dap_memaccess_command, COMMAND_EXEC, | ||||
"set/get number of extra tck for mem-ap " | "set/get number of extra tck for mem-ap " | ||||
"memory bus access [0-255]"); | "memory bus access [0-255]"); | ||||
@@ -1634,15 +1634,15 @@ static int cortex_a8_register_commands(struct command_context *cmd_ctx) | |||||
armv4_5_register_commands(cmd_ctx); | armv4_5_register_commands(cmd_ctx); | ||||
armv7a_register_commands(cmd_ctx); | armv7a_register_commands(cmd_ctx); | ||||
cortex_a8_cmd = register_command(cmd_ctx, NULL, "cortex_a8", | |||||
cortex_a8_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "cortex_a8", | |||||
NULL, COMMAND_ANY, | NULL, COMMAND_ANY, | ||||
"cortex_a8 specific commands"); | "cortex_a8 specific commands"); | ||||
register_command(cmd_ctx, cortex_a8_cmd, "cache_info", | |||||
COMMAND_REGISTER(cmd_ctx, cortex_a8_cmd, "cache_info", | |||||
cortex_a8_handle_cache_info_command, COMMAND_EXEC, | cortex_a8_handle_cache_info_command, COMMAND_EXEC, | ||||
"display information about target caches"); | "display information about target caches"); | ||||
register_command(cmd_ctx, cortex_a8_cmd, "dbginit", | |||||
COMMAND_REGISTER(cmd_ctx, cortex_a8_cmd, "dbginit", | |||||
cortex_a8_handle_dbginit_command, COMMAND_EXEC, | cortex_a8_handle_dbginit_command, COMMAND_EXEC, | ||||
"Initialize core debug"); | "Initialize core debug"); | ||||
@@ -1919,16 +1919,16 @@ static int cortex_m3_register_commands(struct command_context *cmd_ctx) | |||||
retval = armv7m_register_commands(cmd_ctx); | retval = armv7m_register_commands(cmd_ctx); | ||||
cortex_m3_cmd = register_command(cmd_ctx, NULL, "cortex_m3", | |||||
cortex_m3_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "cortex_m3", | |||||
NULL, COMMAND_ANY, "cortex_m3 specific commands"); | NULL, COMMAND_ANY, "cortex_m3 specific commands"); | ||||
register_command(cmd_ctx, cortex_m3_cmd, "disassemble", | |||||
COMMAND_REGISTER(cmd_ctx, cortex_m3_cmd, "disassemble", | |||||
handle_cortex_m3_disassemble_command, COMMAND_EXEC, | handle_cortex_m3_disassemble_command, COMMAND_EXEC, | ||||
"disassemble Thumb2 instructions <address> [<count>]"); | "disassemble Thumb2 instructions <address> [<count>]"); | ||||
register_command(cmd_ctx, cortex_m3_cmd, "maskisr", | |||||
COMMAND_REGISTER(cmd_ctx, cortex_m3_cmd, "maskisr", | |||||
handle_cortex_m3_mask_interrupts_command, COMMAND_EXEC, | handle_cortex_m3_mask_interrupts_command, COMMAND_EXEC, | ||||
"mask cortex_m3 interrupts ['on'|'off']"); | "mask cortex_m3 interrupts ['on'|'off']"); | ||||
register_command(cmd_ctx, cortex_m3_cmd, "vector_catch", | |||||
COMMAND_REGISTER(cmd_ctx, cortex_m3_cmd, "vector_catch", | |||||
handle_cortex_m3_vector_catch_command, COMMAND_EXEC, | handle_cortex_m3_vector_catch_command, COMMAND_EXEC, | ||||
"catch hardware vectors ['all'|'none'|<list>]"); | "catch hardware vectors ['all'|'none'|<list>]"); | ||||
@@ -404,10 +404,10 @@ COMMAND_HANDLER(handle_etb_config_command) | |||||
static int etb_register_commands(struct command_context *cmd_ctx) | static int etb_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *etb_cmd = register_command(cmd_ctx, NULL, "etb", | |||||
struct command *etb_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etb", | |||||
NULL, COMMAND_ANY, "Embedded Trace Buffer"); | NULL, COMMAND_ANY, "Embedded Trace Buffer"); | ||||
register_command(cmd_ctx, etb_cmd, "config", | |||||
COMMAND_REGISTER(cmd_ctx, etb_cmd, "config", | |||||
handle_etb_config_command, COMMAND_CONFIG, | handle_etb_config_command, COMMAND_CONFIG, | ||||
NULL); | NULL); | ||||
@@ -2097,9 +2097,9 @@ COMMAND_HANDLER(handle_etm_analyze_command) | |||||
int etm_register_commands(struct command_context *cmd_ctx) | int etm_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
etm_cmd = register_command(cmd_ctx, NULL, "etm", NULL, COMMAND_ANY, "Embedded Trace Macrocell"); | |||||
etm_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etm", NULL, COMMAND_ANY, "Embedded Trace Macrocell"); | |||||
register_command(cmd_ctx, etm_cmd, "config", handle_etm_config_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "config", handle_etm_config_command, | |||||
COMMAND_CONFIG, "etm config <target> <port_width> <port_mode> <clocking> <capture_driver>"); | COMMAND_CONFIG, "etm config <target> <port_width> <port_mode> <clocking> <capture_driver>"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -2107,32 +2107,32 @@ int etm_register_commands(struct command_context *cmd_ctx) | |||||
static int etm_register_user_commands(struct command_context *cmd_ctx) | static int etm_register_user_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, etm_cmd, "tracemode", handle_etm_tracemode_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "tracemode", handle_etm_tracemode_command, | |||||
COMMAND_EXEC, "configure/display trace mode: " | COMMAND_EXEC, "configure/display trace mode: " | ||||
"<none | data | address | all> " | "<none | data | address | all> " | ||||
"<context_id_bits> <cycle_accurate> <branch_output>"); | "<context_id_bits> <cycle_accurate> <branch_output>"); | ||||
register_command(cmd_ctx, etm_cmd, "info", handle_etm_info_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "info", handle_etm_info_command, | |||||
COMMAND_EXEC, "display info about the current target's ETM"); | COMMAND_EXEC, "display info about the current target's ETM"); | ||||
register_command(cmd_ctx, etm_cmd, "trigger_percent", handle_etm_trigger_percent_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "trigger_percent", handle_etm_trigger_percent_command, | |||||
COMMAND_EXEC, "amount (<percent>) of trace buffer to be filled after the trigger occured"); | COMMAND_EXEC, "amount (<percent>) of trace buffer to be filled after the trigger occured"); | ||||
register_command(cmd_ctx, etm_cmd, "status", handle_etm_status_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "status", handle_etm_status_command, | |||||
COMMAND_EXEC, "display current target's ETM status"); | COMMAND_EXEC, "display current target's ETM status"); | ||||
register_command(cmd_ctx, etm_cmd, "start", handle_etm_start_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "start", handle_etm_start_command, | |||||
COMMAND_EXEC, "start ETM trace collection"); | COMMAND_EXEC, "start ETM trace collection"); | ||||
register_command(cmd_ctx, etm_cmd, "stop", handle_etm_stop_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "stop", handle_etm_stop_command, | |||||
COMMAND_EXEC, "stop ETM trace collection"); | COMMAND_EXEC, "stop ETM trace collection"); | ||||
register_command(cmd_ctx, etm_cmd, "analyze", handle_etm_analyze_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "analyze", handle_etm_analyze_command, | |||||
COMMAND_EXEC, "anaylze collected ETM trace"); | COMMAND_EXEC, "anaylze collected ETM trace"); | ||||
register_command(cmd_ctx, etm_cmd, "image", handle_etm_image_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "image", handle_etm_image_command, | |||||
COMMAND_EXEC, "load image from <file> [base address]"); | COMMAND_EXEC, "load image from <file> [base address]"); | ||||
register_command(cmd_ctx, etm_cmd, "dump", handle_etm_dump_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "dump", handle_etm_dump_command, | |||||
COMMAND_EXEC, "dump captured trace data <file>"); | COMMAND_EXEC, "dump captured trace data <file>"); | ||||
register_command(cmd_ctx, etm_cmd, "load", handle_etm_load_command, | |||||
COMMAND_REGISTER(cmd_ctx, etm_cmd, "load", handle_etm_load_command, | |||||
COMMAND_EXEC, "load trace data for analysis <file>"); | COMMAND_EXEC, "load trace data for analysis <file>"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -62,9 +62,9 @@ static int etm_dummy_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *etm_dummy_cmd; | struct command *etm_dummy_cmd; | ||||
etm_dummy_cmd = register_command(cmd_ctx, NULL, "etm_dummy", NULL, COMMAND_ANY, "Dummy ETM capture driver"); | |||||
etm_dummy_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etm_dummy", NULL, COMMAND_ANY, "Dummy ETM capture driver"); | |||||
register_command(cmd_ctx, etm_dummy_cmd, "config", handle_etm_dummy_config_command, COMMAND_CONFIG, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, etm_dummy_cmd, "config", handle_etm_dummy_config_command, COMMAND_CONFIG, NULL); | |||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } | ||||
@@ -411,12 +411,12 @@ int oocd_trace_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *oocd_trace_cmd; | struct command *oocd_trace_cmd; | ||||
oocd_trace_cmd = register_command(cmd_ctx, NULL, "oocd_trace", NULL, COMMAND_ANY, "OpenOCD + trace"); | |||||
oocd_trace_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "oocd_trace", NULL, COMMAND_ANY, "OpenOCD + trace"); | |||||
register_command(cmd_ctx, oocd_trace_cmd, "config", handle_oocd_trace_config_command, COMMAND_CONFIG, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, oocd_trace_cmd, "config", handle_oocd_trace_config_command, COMMAND_CONFIG, NULL); | |||||
register_command(cmd_ctx, oocd_trace_cmd, "status", handle_oocd_trace_status_command, COMMAND_EXEC, "display OpenOCD + trace status"); | |||||
register_command(cmd_ctx, oocd_trace_cmd, "resync", handle_oocd_trace_resync_command, COMMAND_EXEC, "resync OpenOCD + trace capture clock"); | |||||
COMMAND_REGISTER(cmd_ctx, oocd_trace_cmd, "status", handle_oocd_trace_status_command, COMMAND_EXEC, "display OpenOCD + trace status"); | |||||
COMMAND_REGISTER(cmd_ctx, oocd_trace_cmd, "resync", handle_oocd_trace_resync_command, COMMAND_EXEC, "resync OpenOCD + trace capture clock"); | |||||
return ERROR_OK; | return ERROR_OK; | ||||
} | } |
@@ -4765,7 +4765,7 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv) | |||||
int target_register_commands(struct command_context *cmd_ctx) | int target_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "targets", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "targets", | |||||
handle_targets_command, COMMAND_EXEC, | handle_targets_command, COMMAND_EXEC, | ||||
"change current command line target (one parameter) " | "change current command line target (one parameter) " | ||||
"or list targets (no parameters)"); | "or list targets (no parameters)"); | ||||
@@ -4784,7 +4784,7 @@ int target_register_user_commands(struct command_context *cmd_ctx) | |||||
if ((retval = trace_register_commands(cmd_ctx)) != ERROR_OK) | if ((retval = trace_register_commands(cmd_ctx)) != ERROR_OK) | ||||
return retval; | return retval; | ||||
register_command(cmd_ctx, NULL, "profile", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "profile", | |||||
handle_profile_command, COMMAND_EXEC, | handle_profile_command, COMMAND_EXEC, | ||||
"profiling samples the CPU PC"); | "profiling samples the CPU PC"); | ||||
@@ -4796,94 +4796,94 @@ int target_register_user_commands(struct command_context *cmd_ctx) | |||||
"convert a TCL array to memory locations and write the values " | "convert a TCL array to memory locations and write the values " | ||||
"<ARRAYNAME> <WIDTH = 32/16/8> <ADDRESS> <COUNT>"); | "<ARRAYNAME> <WIDTH = 32/16/8> <ADDRESS> <COUNT>"); | ||||
register_command(cmd_ctx, NULL, "fast_load_image", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "fast_load_image", | |||||
handle_fast_load_image_command, COMMAND_ANY, | handle_fast_load_image_command, COMMAND_ANY, | ||||
"same CMD_ARGV as load_image, image stored in memory " | "same CMD_ARGV as load_image, image stored in memory " | ||||
"- mainly for profiling purposes"); | "- mainly for profiling purposes"); | ||||
register_command(cmd_ctx, NULL, "fast_load", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "fast_load", | |||||
handle_fast_load_command, COMMAND_ANY, | handle_fast_load_command, COMMAND_ANY, | ||||
"loads active fast load image to current target " | "loads active fast load image to current target " | ||||
"- mainly for profiling purposes"); | "- mainly for profiling purposes"); | ||||
/** @todo don't register virt2phys() unless target supports it */ | /** @todo don't register virt2phys() unless target supports it */ | ||||
register_command(cmd_ctx, NULL, "virt2phys", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "virt2phys", | |||||
handle_virt2phys_command, COMMAND_ANY, | handle_virt2phys_command, COMMAND_ANY, | ||||
"translate a virtual address into a physical address"); | "translate a virtual address into a physical address"); | ||||
register_command(cmd_ctx, NULL, "reg", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "reg", | |||||
handle_reg_command, COMMAND_EXEC, | handle_reg_command, COMMAND_EXEC, | ||||
"display or set a register"); | "display or set a register"); | ||||
register_command(cmd_ctx, NULL, "poll", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "poll", | |||||
handle_poll_command, COMMAND_EXEC, | handle_poll_command, COMMAND_EXEC, | ||||
"poll target state"); | "poll target state"); | ||||
register_command(cmd_ctx, NULL, "wait_halt", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "wait_halt", | |||||
handle_wait_halt_command, COMMAND_EXEC, | handle_wait_halt_command, COMMAND_EXEC, | ||||
"wait for target halt [time (s)]"); | "wait for target halt [time (s)]"); | ||||
register_command(cmd_ctx, NULL, "halt", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "halt", | |||||
handle_halt_command, COMMAND_EXEC, | handle_halt_command, COMMAND_EXEC, | ||||
"halt target"); | "halt target"); | ||||
register_command(cmd_ctx, NULL, "resume", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "resume", | |||||
handle_resume_command, COMMAND_EXEC, | handle_resume_command, COMMAND_EXEC, | ||||
"resume target [addr]"); | "resume target [addr]"); | ||||
register_command(cmd_ctx, NULL, "reset", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "reset", | |||||
handle_reset_command, COMMAND_EXEC, | handle_reset_command, COMMAND_EXEC, | ||||
"reset target [run | halt | init] - default is run"); | "reset target [run | halt | init] - default is run"); | ||||
register_command(cmd_ctx, NULL, "soft_reset_halt", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "soft_reset_halt", | |||||
handle_soft_reset_halt_command, COMMAND_EXEC, | handle_soft_reset_halt_command, COMMAND_EXEC, | ||||
"halt the target and do a soft reset"); | "halt the target and do a soft reset"); | ||||
register_command(cmd_ctx, NULL, "step", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "step", | |||||
handle_step_command, COMMAND_EXEC, | handle_step_command, COMMAND_EXEC, | ||||
"step one instruction from current PC or [addr]"); | "step one instruction from current PC or [addr]"); | ||||
register_command(cmd_ctx, NULL, "mdw", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "mdw", | |||||
handle_md_command, COMMAND_EXEC, | handle_md_command, COMMAND_EXEC, | ||||
"display memory words [phys] <addr> [count]"); | "display memory words [phys] <addr> [count]"); | ||||
register_command(cmd_ctx, NULL, "mdh", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "mdh", | |||||
handle_md_command, COMMAND_EXEC, | handle_md_command, COMMAND_EXEC, | ||||
"display memory half-words [phys] <addr> [count]"); | "display memory half-words [phys] <addr> [count]"); | ||||
register_command(cmd_ctx, NULL, "mdb", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "mdb", | |||||
handle_md_command, COMMAND_EXEC, | handle_md_command, COMMAND_EXEC, | ||||
"display memory bytes [phys] <addr> [count]"); | "display memory bytes [phys] <addr> [count]"); | ||||
register_command(cmd_ctx, NULL, "mww", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "mww", | |||||
handle_mw_command, COMMAND_EXEC, | handle_mw_command, COMMAND_EXEC, | ||||
"write memory word [phys] <addr> <value> [count]"); | "write memory word [phys] <addr> <value> [count]"); | ||||
register_command(cmd_ctx, NULL, "mwh", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "mwh", | |||||
handle_mw_command, COMMAND_EXEC, | handle_mw_command, COMMAND_EXEC, | ||||
"write memory half-word [phys] <addr> <value> [count]"); | "write memory half-word [phys] <addr> <value> [count]"); | ||||
register_command(cmd_ctx, NULL, "mwb", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "mwb", | |||||
handle_mw_command, COMMAND_EXEC, | handle_mw_command, COMMAND_EXEC, | ||||
"write memory byte [phys] <addr> <value> [count]"); | "write memory byte [phys] <addr> <value> [count]"); | ||||
register_command(cmd_ctx, NULL, "bp", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "bp", | |||||
handle_bp_command, COMMAND_EXEC, | handle_bp_command, COMMAND_EXEC, | ||||
"list or set breakpoint [<address> <length> [hw]]"); | "list or set breakpoint [<address> <length> [hw]]"); | ||||
register_command(cmd_ctx, NULL, "rbp", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "rbp", | |||||
handle_rbp_command, COMMAND_EXEC, | handle_rbp_command, COMMAND_EXEC, | ||||
"remove breakpoint <address>"); | "remove breakpoint <address>"); | ||||
register_command(cmd_ctx, NULL, "wp", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "wp", | |||||
handle_wp_command, COMMAND_EXEC, | handle_wp_command, COMMAND_EXEC, | ||||
"list or set watchpoint " | "list or set watchpoint " | ||||
"[<address> <length> <r/w/a> [value] [mask]]"); | "[<address> <length> <r/w/a> [value] [mask]]"); | ||||
register_command(cmd_ctx, NULL, "rwp", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "rwp", | |||||
handle_rwp_command, COMMAND_EXEC, | handle_rwp_command, COMMAND_EXEC, | ||||
"remove watchpoint <address>"); | "remove watchpoint <address>"); | ||||
register_command(cmd_ctx, NULL, "load_image", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "load_image", | |||||
handle_load_image_command, COMMAND_EXEC, | handle_load_image_command, COMMAND_EXEC, | ||||
"load_image <file> <address> " | "load_image <file> <address> " | ||||
"['bin'|'ihex'|'elf'|'s19'] [min_address] [max_length]"); | "['bin'|'ihex'|'elf'|'s19'] [min_address] [max_length]"); | ||||
register_command(cmd_ctx, NULL, "dump_image", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "dump_image", | |||||
handle_dump_image_command, COMMAND_EXEC, | handle_dump_image_command, COMMAND_EXEC, | ||||
"dump_image <file> <address> <size>"); | "dump_image <file> <address> <size>"); | ||||
register_command(cmd_ctx, NULL, "verify_image", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "verify_image", | |||||
handle_verify_image_command, COMMAND_EXEC, | handle_verify_image_command, COMMAND_EXEC, | ||||
"verify_image <file> [offset] [type]"); | "verify_image <file> [offset] [type]"); | ||||
register_command(cmd_ctx, NULL, "test_image", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "test_image", | |||||
handle_test_image_command, COMMAND_EXEC, | handle_test_image_command, COMMAND_EXEC, | ||||
"test_image <file> [offset] [type]"); | "test_image <file> [offset] [type]"); | ||||
@@ -303,9 +303,9 @@ COMMAND_HANDLER(handle_target_request_debugmsgs_command) | |||||
int target_request_register_commands(struct command_context *cmd_ctx) | int target_request_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
target_request_cmd = | target_request_cmd = | ||||
register_command(cmd_ctx, NULL, "target_request", NULL, COMMAND_ANY, "target_request commands"); | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "target_request", NULL, COMMAND_ANY, "target_request commands"); | |||||
register_command(cmd_ctx, target_request_cmd, "debugmsgs", handle_target_request_debugmsgs_command, | |||||
COMMAND_REGISTER(cmd_ctx, target_request_cmd, "debugmsgs", handle_target_request_debugmsgs_command, | |||||
COMMAND_EXEC, "enable/disable reception of debug messages from target"); | COMMAND_EXEC, "enable/disable reception of debug messages from target"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -159,12 +159,12 @@ COMMAND_HANDLER(handle_trace_history_command) | |||||
int trace_register_commands(struct command_context *cmd_ctx) | int trace_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
struct command *trace_cmd = | struct command *trace_cmd = | ||||
register_command(cmd_ctx, NULL, "trace", NULL, COMMAND_ANY, "trace commands"); | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "trace", NULL, COMMAND_ANY, "trace commands"); | |||||
register_command(cmd_ctx, trace_cmd, "history", handle_trace_history_command, | |||||
COMMAND_REGISTER(cmd_ctx, trace_cmd, "history", handle_trace_history_command, | |||||
COMMAND_EXEC, "display trace history, ['clear'] history or set [size]"); | COMMAND_EXEC, "display trace history, ['clear'] history or set [size]"); | ||||
register_command(cmd_ctx, trace_cmd, "point", handle_trace_point_command, | |||||
COMMAND_REGISTER(cmd_ctx, trace_cmd, "point", handle_trace_point_command, | |||||
COMMAND_EXEC, "display trace points, ['clear'] list of trace points, or add new tracepoint at [address]"); | COMMAND_EXEC, "display trace points, ['clear'] list of trace points, or add new tracepoint at [address]"); | ||||
return ERROR_OK; | return ERROR_OK; | ||||
@@ -3558,27 +3558,27 @@ static int xscale_register_commands(struct command_context *cmd_ctx) | |||||
{ | { | ||||
struct command *xscale_cmd; | struct command *xscale_cmd; | ||||
xscale_cmd = register_command(cmd_ctx, NULL, "xscale", NULL, COMMAND_ANY, "xscale specific commands"); | |||||
xscale_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "xscale", NULL, COMMAND_ANY, "xscale specific commands"); | |||||
register_command(cmd_ctx, xscale_cmd, "debug_handler", xscale_handle_debug_handler_command, COMMAND_ANY, "'xscale debug_handler <target#> <address>' command takes two required operands"); | |||||
register_command(cmd_ctx, xscale_cmd, "cache_clean_address", xscale_handle_cache_clean_address_command, COMMAND_ANY, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "debug_handler", xscale_handle_debug_handler_command, COMMAND_ANY, "'xscale debug_handler <target#> <address>' command takes two required operands"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "cache_clean_address", xscale_handle_cache_clean_address_command, COMMAND_ANY, NULL); | |||||
register_command(cmd_ctx, xscale_cmd, "cache_info", xscale_handle_cache_info_command, COMMAND_EXEC, NULL); | |||||
register_command(cmd_ctx, xscale_cmd, "mmu", xscale_handle_mmu_command, COMMAND_EXEC, "['enable'|'disable'] the MMU"); | |||||
register_command(cmd_ctx, xscale_cmd, "icache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the ICache"); | |||||
register_command(cmd_ctx, xscale_cmd, "dcache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the DCache"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "cache_info", xscale_handle_cache_info_command, COMMAND_EXEC, NULL); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "mmu", xscale_handle_mmu_command, COMMAND_EXEC, "['enable'|'disable'] the MMU"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "icache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the ICache"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "dcache", xscale_handle_idcache_command, COMMAND_EXEC, "['enable'|'disable'] the DCache"); | |||||
register_command(cmd_ctx, xscale_cmd, "vector_catch", xscale_handle_vector_catch_command, COMMAND_EXEC, "<mask> of vectors that should be catched"); | |||||
register_command(cmd_ctx, xscale_cmd, "vector_table", xscale_handle_vector_table_command, COMMAND_EXEC, "<high|low> <index> <code> set static code for exception handler entry"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "vector_catch", xscale_handle_vector_catch_command, COMMAND_EXEC, "<mask> of vectors that should be catched"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "vector_table", xscale_handle_vector_table_command, COMMAND_EXEC, "<high|low> <index> <code> set static code for exception handler entry"); | |||||
register_command(cmd_ctx, xscale_cmd, "trace_buffer", xscale_handle_trace_buffer_command, COMMAND_EXEC, "<enable | disable> ['fill' [n]|'wrap']"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "trace_buffer", xscale_handle_trace_buffer_command, COMMAND_EXEC, "<enable | disable> ['fill' [n]|'wrap']"); | |||||
register_command(cmd_ctx, xscale_cmd, "dump_trace", xscale_handle_dump_trace_command, COMMAND_EXEC, "dump content of trace buffer to <file>"); | |||||
register_command(cmd_ctx, xscale_cmd, "analyze_trace", xscale_handle_analyze_trace_buffer_command, COMMAND_EXEC, "analyze content of trace buffer"); | |||||
register_command(cmd_ctx, xscale_cmd, "trace_image", xscale_handle_trace_image_command, | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "dump_trace", xscale_handle_dump_trace_command, COMMAND_EXEC, "dump content of trace buffer to <file>"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "analyze_trace", xscale_handle_analyze_trace_buffer_command, COMMAND_EXEC, "analyze content of trace buffer"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "trace_image", xscale_handle_trace_image_command, | |||||
COMMAND_EXEC, "load image from <file> [base address]"); | COMMAND_EXEC, "load image from <file> [base address]"); | ||||
register_command(cmd_ctx, xscale_cmd, "cp15", xscale_handle_cp15, COMMAND_EXEC, "access coproc 15 <register> [value]"); | |||||
COMMAND_REGISTER(cmd_ctx, xscale_cmd, "cp15", xscale_handle_cp15, COMMAND_EXEC, "access coproc 15 <register> [value]"); | |||||
armv4_5_register_commands(cmd_ctx); | armv4_5_register_commands(cmd_ctx); | ||||
@@ -1052,7 +1052,7 @@ COMMAND_HANDLER(handle_xsvf_command) | |||||
int xsvf_register_commands(struct command_context *cmd_ctx) | int xsvf_register_commands(struct command_context *cmd_ctx) | ||||
{ | { | ||||
register_command(cmd_ctx, NULL, "xsvf", | |||||
COMMAND_REGISTER(cmd_ctx, NULL, "xsvf", | |||||
&handle_xsvf_command, COMMAND_EXEC, | &handle_xsvf_command, COMMAND_EXEC, | ||||
"run xsvf <file> [virt2] [quiet]"); | "run xsvf <file> [virt2] [quiet]"); | ||||