if (etm_reg->reg_info->mode == WO) {
LOG_ERROR("BUG: can't read write-only register %s", r->name);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
LOG_DEBUG("%s (%u)", r->name, reg_addr);
if (etm_reg->reg_info->mode == RO) {
LOG_ERROR("BUG: can't write read--only register %s", r->name);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
LOG_DEBUG("%s (%u): 0x%8.8" PRIx32 "", r->name, reg_addr, value);
else
{
command_print(CMD_CTX, "invalid option '%s'", CMD_ARGV[0]);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
uint8_t context_id;
break;
default:
command_print(CMD_CTX, "invalid option '%s'", CMD_ARGV[1]);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
bool etmv1_cycle_accurate;
&tracemode);
break;
default:
- command_print(CMD_CTX, "usage: tracemode "
- "('none'|'data'|'address'|'all') "
- "context_id_bits "
- "('enable'|'disable') "
- "('enable'|'disable')"
- );
- return ERROR_FAIL;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
/**
if (CMD_ARGC < 1)
{
- command_print(CMD_CTX, "usage: etm image <file> [base address] [type]");
- return ERROR_FAIL;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
target = get_current_target(CMD_CTX);
if (CMD_ARGC != 1)
{
- command_print(CMD_CTX, "usage: etm dump <file>");
- return ERROR_FAIL;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
target = get_current_target(CMD_CTX);
if (CMD_ARGC != 1)
{
- command_print(CMD_CTX, "usage: etm load <file>");
- return ERROR_FAIL;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
target = get_current_target(CMD_CTX);
.name = "etm",
.mode = COMMAND_ANY,
.help = "Emebdded Trace Macrocell command group",
+ .usage = "",
.chain = etm_config_command_handlers,
},
COMMAND_REGISTRATION_DONE
.name = "info",
.handler = handle_etm_info_command,
.mode = COMMAND_EXEC,
+ .usage = "",
.help = "display info about the current target's ETM",
},
{
.name = "status",
.handler = handle_etm_status_command,
.mode = COMMAND_EXEC,
+ .usage = "",
.help = "display current target's ETM status",
},
{
.name = "start",
.handler = handle_etm_start_command,
.mode = COMMAND_EXEC,
+ .usage = "",
.help = "start ETM trace collection",
},
{
.name = "stop",
.handler = handle_etm_stop_command,
.mode = COMMAND_EXEC,
+ .usage = "",
.help = "stop ETM trace collection",
},
{
.name = "analyze",
.handler = handle_etm_analyze_command,
.mode = COMMAND_EXEC,
+ .usage = "",
.help = "analyze collected ETM trace",
},
{
.handler = handle_etm_image_command,
.mode = COMMAND_EXEC,
.help = "load image from file with optional offset",
- .usage = "filename [offset]",
+ .usage = "<file> [base address] [type]",
},
{
.name = "dump",
.name = "load",
.handler = handle_etm_load_command,
.mode = COMMAND_EXEC,
+ .usage = "",
.help = "load trace data for analysis <file>",
},
COMMAND_REGISTRATION_DONE