arm_jtag_scann(etm_reg->jtag_info, 0x6);
arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL);
- fields[0].tap = etm_reg->jtag_info->tap;
fields[0].num_bits = 32;
fields[0].out_value = reg->value;
fields[0].in_value = NULL;
fields[0].check_value = NULL;
fields[0].check_mask = NULL;
- fields[1].tap = etm_reg->jtag_info->tap;
fields[1].num_bits = 7;
fields[1].out_value = malloc(1);
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].check_value = NULL;
fields[1].check_mask = NULL;
- fields[2].tap = etm_reg->jtag_info->tap;
fields[2].num_bits = 1;
fields[2].out_value = malloc(1);
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].check_value = NULL;
fields[2].check_mask = NULL;
- jtag_add_dr_scan(3, fields, jtag_get_end_state());
+ jtag_add_dr_scan(etm_reg->jtag_info->tap, 3, fields, jtag_get_end_state());
fields[0].in_value = reg->value;
fields[0].check_value = check_value;
fields[0].check_mask = check_mask;
- jtag_add_dr_scan_check(3, fields, jtag_get_end_state());
+ jtag_add_dr_scan_check(etm_reg->jtag_info->tap, 3, fields, jtag_get_end_state());
free(fields[1].out_value);
free(fields[2].out_value);
arm_jtag_scann(etm_reg->jtag_info, 0x6);
arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL);
- fields[0].tap = etm_reg->jtag_info->tap;
fields[0].num_bits = 32;
uint8_t tmp1[4];
fields[0].out_value = tmp1;
buf_set_u32(fields[0].out_value, 0, 32, value);
fields[0].in_value = NULL;
- fields[1].tap = etm_reg->jtag_info->tap;
fields[1].num_bits = 7;
uint8_t tmp2;
fields[1].out_value = &tmp2;
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].in_value = NULL;
- fields[2].tap = etm_reg->jtag_info->tap;
fields[2].num_bits = 1;
uint8_t tmp3;
fields[2].out_value = &tmp3;
buf_set_u32(fields[2].out_value, 0, 1, 1);
fields[2].in_value = NULL;
- jtag_add_dr_scan(3, fields, jtag_get_end_state());
+ jtag_add_dr_scan(etm_reg->jtag_info->tap, 3, fields, jtag_get_end_state());
return ERROR_OK;
}
case 0:
break;
case 4:
- CALL_COMMAND_HANDLER(handle_etm_tracemode_command_update, &tracemode);
+ CALL_COMMAND_HANDLER(handle_etm_tracemode_command_update,
+ &tracemode);
break;
default:
- command_print(CMD_CTX, "usage: configure trace mode "
- "<none | data | address | all> "
- "<context id bits> <cycle accurate> <branch output>");
+ command_print(CMD_CTX, "usage: tracemode "
+ "('none'|'data'|'address'|'all') "
+ "context_id_bits "
+ "('enable'|'disable') "
+ "('enable'|'disable')"
+ );
return ERROR_FAIL;
}
static const struct command_registration etm_config_command_handlers[] = {
{
+ /* NOTE: with ADIv5, ETMs are accessed by DAP operations,
+ * possibly over SWD, not JTAG scanchain 6 of 'target'.
+ *
+ * Also, these parameters don't match ETM v3+ modules...
+ */
.name = "config",
- .handler = &handle_etm_config_command,
+ .handler = handle_etm_config_command,
.mode = COMMAND_CONFIG,
- .usage = "<target> <port_width> <port_mode> "
- "<clocking> <capture_driver>",
+ .help = "Set up ETM output port.",
+ .usage = "target port_width port_mode clocking capture_driver",
},
COMMAND_REGISTRATION_DONE
};
static const struct command_registration etm_exec_command_handlers[] = {
{
- .name = "tracemode", handle_etm_tracemode_command,
+ .name = "tracemode",
+ .handler = handle_etm_tracemode_command,
.mode = COMMAND_EXEC,
.help = "configure/display trace mode",
- .usage = "<none | data | address | all> "
- "<context_id_bits> <cycle_accurate> <branch_output>",
+ .usage = "('none'|'data'|'address'|'all') "
+ "context_id_bits "
+ "['enable'|'disable'] "
+ "['enable'|'disable']",
},
{
.name = "info",
- .handler = &handle_etm_info_command,
+ .handler = handle_etm_info_command,
.mode = COMMAND_EXEC,
.help = "display info about the current target's ETM",
},
{
.name = "status",
- .handler = &handle_etm_status_command,
+ .handler = handle_etm_status_command,
.mode = COMMAND_EXEC,
.help = "display current target's ETM status",
},
{
.name = "start",
- .handler = &handle_etm_start_command,
+ .handler = handle_etm_start_command,
.mode = COMMAND_EXEC,
.help = "start ETM trace collection",
},
{
.name = "stop",
- .handler = &handle_etm_stop_command,
+ .handler = handle_etm_stop_command,
.mode = COMMAND_EXEC,
.help = "stop ETM trace collection",
},
.handler = handle_etm_trigger_debug_command,
.mode = COMMAND_EXEC,
.help = "enable/disable debug entry on trigger",
- .usage = "(enable | disable)",
+ .usage = "['enable'|'disable']",
},
{
.name = "analyze",
},
{
.name = "image",
- .handler = &handle_etm_image_command,
+ .handler = handle_etm_image_command,
.mode = COMMAND_EXEC,
- .help = "load image from <file> [base address]",
+ .help = "load image from file with optional offset",
+ .usage = "filename [offset]",
},
{
.name = "dump",
- .handler = &handle_etm_dump_command,
+ .handler = handle_etm_dump_command,
.mode = COMMAND_EXEC,
- .help = "dump captured trace data <file>",
+ .help = "dump captured trace data to file",
+ .usage = "filename",
},
{
.name = "load",
- .handler = &handle_etm_load_command,
+ .handler = handle_etm_load_command,
.mode = COMMAND_EXEC,
.help = "load trace data for analysis <file>",
},