Various cleanups of ETM related code.
- Saner error return paths
- Simplify arm7_9 init ... no need for extra zeroing!
- Shrink some lines
- Tweak some diagnostics
- Use shorter name for ETM struct type.
- Don't exit()
and similar. The diagnostics look forward to having
this ETM code work with more than just ARM7/ARM9.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
arm7_9->common_magic = ARM7_9_COMMON_MAGIC;
if ((retval = arm_jtag_setup_connection(&arm7_9->jtag_info)) != ERROR_OK)
arm7_9->common_magic = ARM7_9_COMMON_MAGIC;
if ((retval = arm_jtag_setup_connection(&arm7_9->jtag_info)) != ERROR_OK)
- arm7_9->wp_available = 0; /* this is set up in arm7_9_clear_watchpoints() */
- arm7_9->wp_available_max = 2;
- arm7_9->sw_breakpoints_added = 0;
- arm7_9->sw_breakpoint_count = 0;
- arm7_9->breakpoint_count = 0;
- arm7_9->wp0_used = 0;
- arm7_9->wp1_used = 0;
- arm7_9->wp1_used_default = 0;
- arm7_9->use_dbgrq = 0;
-
- arm7_9->etm_ctx = NULL;
- arm7_9->has_single_step = 0;
- arm7_9->has_monitor_mode = 0;
- arm7_9->has_vector_catch = 0;
+ /* caller must have allocated via calloc(), so everything's zeroed */
- arm7_9->debug_entry_from_reset = 0;
-
- arm7_9->dcc_working_area = NULL;
+ arm7_9->wp_available_max = 2;
arm7_9->fast_memory_access = fast_and_dangerous;
arm7_9->dcc_downloads = fast_and_dangerous;
arm7_9->fast_memory_access = fast_and_dangerous;
arm7_9->dcc_downloads = fast_and_dangerous;
- arm7_9->need_bypass_before_restart = 0;
-
armv4_5->arch_info = arm7_9;
armv4_5->read_core_reg = arm7_9_read_core_reg;
armv4_5->write_core_reg = arm7_9_write_core_reg;
armv4_5->full_context = arm7_9_full_context;
if ((retval = armv4_5_init_arch_info(target, armv4_5)) != ERROR_OK)
armv4_5->arch_info = arm7_9;
armv4_5->read_core_reg = arm7_9_read_core_reg;
armv4_5->write_core_reg = arm7_9_write_core_reg;
armv4_5->full_context = arm7_9_full_context;
if ((retval = armv4_5_init_arch_info(target, armv4_5)) != ERROR_OK)
- {
- return retval;
- }
-
- if ((retval = target_register_timer_callback(arm7_9_handle_target_request, 1, 1, target)) != ERROR_OK)
- {
+ return target_register_timer_callback(arm7_9_handle_target_request,
+ 1, 1, target);
}
int arm7_9_register_commands(struct command_context_s *cmd_ctx)
}
int arm7_9_register_commands(struct command_context_s *cmd_ctx)
#ifndef ETB_H
#define ETB_H
#ifndef ETB_H
#define ETB_H
/* ETB registers */
enum
{
/* ETB registers */
enum
{
else if (ctx->core_state == ARMV4_5_STATE_JAZELLE)
{
LOG_ERROR("BUG: tracing of jazelle code not supported");
else if (ctx->core_state == ARMV4_5_STATE_JAZELLE)
{
LOG_ERROR("BUG: tracing of jazelle code not supported");
}
else
{
LOG_ERROR("BUG: unknown core state encountered");
}
else
{
LOG_ERROR("BUG: unknown core state encountered");
break;
default: /* reserved */
LOG_ERROR("BUG: branch reason code 0x%" PRIx32 " is reserved", ctx->last_branch_reason);
break;
default: /* reserved */
LOG_ERROR("BUG: branch reason code 0x%" PRIx32 " is reserved", ctx->last_branch_reason);
}
/* if we got here the branch was a normal PC change
}
/* if we got here the branch was a normal PC change
else
{
command_print(cmd_ctx, "invalid option '%s'", args[0]);
else
{
command_print(cmd_ctx, "invalid option '%s'", args[0]);
+ return ERROR_INVALID_ARGUMENTS;
break;
default:
command_print(cmd_ctx, "invalid option '%s'", args[1]);
break;
default:
command_print(cmd_ctx, "invalid option '%s'", args[1]);
+ return ERROR_INVALID_ARGUMENTS;
}
if (strcmp(args[2], "enable") == 0)
}
if (strcmp(args[2], "enable") == 0)
else
{
command_print(cmd_ctx, "invalid option '%s'", args[2]);
else
{
command_print(cmd_ctx, "invalid option '%s'", args[2]);
+ return ERROR_INVALID_ARGUMENTS;
}
if (strcmp(args[3], "enable") == 0)
}
if (strcmp(args[3], "enable") == 0)
else
{
command_print(cmd_ctx, "invalid option '%s'", args[3]);
else
{
command_print(cmd_ctx, "invalid option '%s'", args[3]);
+ return ERROR_INVALID_ARGUMENTS;
-static int handle_etm_tracemode_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_tracemode_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target = get_current_target(cmd_ctx);
{
target_t *target = get_current_target(cmd_ctx);
armv4_5_common_t *armv4_5;
arm7_9_common_t *arm7_9;
armv4_5_common_t *armv4_5;
arm7_9_common_t *arm7_9;
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
- if (!arm7_9->etm_ctx)
- {
+ etm = arm7_9->etm_ctx;
+ if (!etm) {
command_print(cmd_ctx, "current target doesn't have an ETM configured");
command_print(cmd_ctx, "current target doesn't have an ETM configured");
- etmv1_tracemode_t tracemode = arm7_9->etm_ctx->tracemode;
+ etmv1_tracemode_t tracemode = etm->tracemode;
+
command_print(cmd_ctx, "usage: configure trace mode "
"<none | data | address | all> "
"<context id bits> <cycle accurate> <branch output>");
command_print(cmd_ctx, "usage: configure trace mode "
"<none | data | address | all> "
"<context id bits> <cycle accurate> <branch output>");
+ /**
+ * todo: fail if parameters were invalid for this hardware,
+ * or couldn't be written; display actual hardware state...
+ */
+
command_print(cmd_ctx, "current tracemode configuration:");
switch (tracemode & ETMV1_TRACE_MASK)
command_print(cmd_ctx, "current tracemode configuration:");
switch (tracemode & ETMV1_TRACE_MASK)
}
/* only update ETM_CTRL register if tracemode changed */
}
/* only update ETM_CTRL register if tracemode changed */
- if (arm7_9->etm_ctx->tracemode != tracemode)
+ if (etm->tracemode != tracemode)
- etm_ctrl_reg = etm_reg_lookup(arm7_9->etm_ctx, ETM_CTRL);
+ etm_ctrl_reg = etm_reg_lookup(etm, ETM_CTRL);
etm_get_reg(etm_ctrl_reg);
etm_get_reg(etm_ctrl_reg);
buf_set_u32(etm_ctrl_reg->value, 8, 1, (tracemode & ETMV1_BRANCH_OUTPUT) >> 9);
etm_store_reg(etm_ctrl_reg);
buf_set_u32(etm_ctrl_reg->value, 8, 1, (tracemode & ETMV1_BRANCH_OUTPUT) >> 9);
etm_store_reg(etm_ctrl_reg);
- arm7_9->etm_ctx->tracemode = tracemode;
+ etm->tracemode = tracemode;
/* invalidate old trace data */
/* invalidate old trace data */
- arm7_9->etm_ctx->capture_status = TRACE_IDLE;
- if (arm7_9->etm_ctx->trace_depth > 0)
+ etm->capture_status = TRACE_IDLE;
+ if (etm->trace_depth > 0)
- free(arm7_9->etm_ctx->trace_data);
- arm7_9->etm_ctx->trace_data = NULL;
+ free(etm->trace_data);
+ etm->trace_data = NULL;
- arm7_9->etm_ctx->trace_depth = 0;
-static int handle_etm_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_config_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
arm7_9_common_t *arm7_9;
etm_portmode_t portmode = 0x0;
{
target_t *target;
armv4_5_common_t *armv4_5;
arm7_9_common_t *arm7_9;
etm_portmode_t portmode = 0x0;
- etm_context_t *etm_ctx = malloc(sizeof(etm_context_t));
return ERROR_COMMAND_SYNTAX_ERROR;
return ERROR_COMMAND_SYNTAX_ERROR;
target = get_target(args[0]);
if (!target)
{
LOG_ERROR("target '%s' not defined", args[0]);
target = get_target(args[0]);
if (!target)
{
LOG_ERROR("target '%s' not defined", args[0]);
return ERROR_FAIL;
}
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
return ERROR_FAIL;
}
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- free(etm_ctx);
+ command_print(cmd_ctx, "target '%s' is '%s'; not an ARM",
+ target->cmd_name, target_get_name(target));
break;
default:
command_print(cmd_ctx, "unsupported ETM port width '%s', must be 4, 8 or 16", args[1]);
break;
default:
command_print(cmd_ctx, "unsupported ETM port width '%s', must be 4, 8 or 16", args[1]);
else
{
command_print(cmd_ctx, "unsupported ETM port mode '%s', must be 'normal', 'multiplexed' or 'demultiplexed'", args[2]);
else
{
command_print(cmd_ctx, "unsupported ETM port mode '%s', must be 'normal', 'multiplexed' or 'demultiplexed'", args[2]);
else
{
command_print(cmd_ctx, "unsupported ETM port clocking '%s', must be 'full' or 'half'", args[3]);
else
{
command_print(cmd_ctx, "unsupported ETM port clocking '%s', must be 'full' or 'half'", args[3]);
+ return ERROR_FAIL;
+ }
+
+ etm_ctx = calloc(1, sizeof(etm_context_t));
+ if (!etm_ctx) {
+ LOG_DEBUG("out of memory");
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
etm = arm7_9->etm_ctx;
if (!etm)
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
etm = arm7_9->etm_ctx;
if (!etm)
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
command_print(cmd_ctx, "ETM v%d.%d",
}
command_print(cmd_ctx, "ETM v%d.%d",
break;
default:
LOG_ERROR("Illegal max_port_size");
break;
default:
LOG_ERROR("Illegal max_port_size");
}
command_print(cmd_ctx, "max. port size: %i", max_port_size);
}
command_print(cmd_ctx, "max. port size: %i", max_port_size);
-static int handle_etm_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_status_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
{
target_t *target;
armv4_5_common_t *armv4_5;
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!arm7_9->etm_ctx)
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!arm7_9->etm_ctx)
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
reg = etm_reg_lookup(etm, ETM_STATUS);
if (!reg)
reg = etm_reg_lookup(etm, ETM_STATUS);
if (!reg)
if (etm_get_reg(reg) == ERROR_OK) {
unsigned s = buf_get_u32(reg->value, 0, reg->size);
if (etm_get_reg(reg) == ERROR_OK) {
unsigned s = buf_get_u32(reg->value, 0, reg->size);
-static int handle_etm_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_image_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
{
target_t *target;
armv4_5_common_t *armv4_5;
if (argc < 1)
{
command_print(cmd_ctx, "usage: etm image <file> [base address] [type]");
if (argc < 1)
{
command_print(cmd_ctx, "usage: etm image <file> [base address] [type]");
}
target = get_current_target(cmd_ctx);
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
}
target = get_current_target(cmd_ctx);
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
{
free(etm_ctx->image);
etm_ctx->image = NULL;
{
free(etm_ctx->image);
etm_ctx->image = NULL;
-static int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_dump_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
fileio_t file;
target_t *target;
{
fileio_t file;
target_t *target;
if (argc != 1)
{
command_print(cmd_ctx, "usage: etm dump <file>");
if (argc != 1)
{
command_print(cmd_ctx, "usage: etm dump <file>");
}
target = get_current_target(cmd_ctx);
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
}
target = get_current_target(cmd_ctx);
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (etm_ctx->capture_driver->status == TRACE_IDLE)
}
if (etm_ctx->capture_driver->status == TRACE_IDLE)
{
/* TODO: if on-the-fly capture is to be supported, this needs to be changed */
command_print(cmd_ctx, "trace capture not completed");
{
/* TODO: if on-the-fly capture is to be supported, this needs to be changed */
command_print(cmd_ctx, "trace capture not completed");
}
/* read the trace data if it wasn't read already */
}
/* read the trace data if it wasn't read already */
if (fileio_open(&file, args[0], FILEIO_WRITE, FILEIO_BINARY) != ERROR_OK)
{
if (fileio_open(&file, args[0], FILEIO_WRITE, FILEIO_BINARY) != ERROR_OK)
{
}
fileio_write_u32(&file, etm_ctx->capture_status);
}
fileio_write_u32(&file, etm_ctx->capture_status);
-static int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_load_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
fileio_t file;
target_t *target;
{
fileio_t file;
target_t *target;
if (argc != 1)
{
command_print(cmd_ctx, "usage: etm load <file>");
if (argc != 1)
{
command_print(cmd_ctx, "usage: etm load <file>");
}
target = get_current_target(cmd_ctx);
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
}
target = get_current_target(cmd_ctx);
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (etm_ctx->capture_driver->status(etm_ctx) & TRACE_RUNNING)
{
command_print(cmd_ctx, "trace capture running, stop first");
}
if (etm_ctx->capture_driver->status(etm_ctx) & TRACE_RUNNING)
{
command_print(cmd_ctx, "trace capture running, stop first");
}
if (fileio_open(&file, args[0], FILEIO_READ, FILEIO_BINARY) != ERROR_OK)
{
}
if (fileio_open(&file, args[0], FILEIO_READ, FILEIO_BINARY) != ERROR_OK)
{
}
if (file.size % 4)
{
command_print(cmd_ctx, "size isn't a multiple of 4, no valid trace data");
fileio_close(&file);
}
if (file.size % 4)
{
command_print(cmd_ctx, "size isn't a multiple of 4, no valid trace data");
fileio_close(&file);
}
if (etm_ctx->trace_depth > 0)
}
if (etm_ctx->trace_depth > 0)
{
command_print(cmd_ctx, "not enough memory to perform operation");
fileio_close(&file);
{
command_print(cmd_ctx, "not enough memory to perform operation");
fileio_close(&file);
}
for (i = 0; i < etm_ctx->trace_depth; i++)
}
for (i = 0; i < etm_ctx->trace_depth; i++)
-static int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
{
target_t *target;
armv4_5_common_t *armv4_5;
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
-static int handle_etm_start_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_start_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
{
target_t *target;
armv4_5_common_t *armv4_5;
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
- if (!(etm_ctx = arm7_9->etm_ctx))
+ etm_ctx = arm7_9->etm_ctx;
+ if (!etm_ctx)
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
/* invalidate old tracing data */
}
/* invalidate old tracing data */
- arm7_9->etm_ctx->capture_status = TRACE_IDLE;
- if (arm7_9->etm_ctx->trace_depth > 0)
+ etm_ctx->capture_status = TRACE_IDLE;
+ if (etm_ctx->trace_depth > 0)
- free(arm7_9->etm_ctx->trace_data);
- arm7_9->etm_ctx->trace_data = NULL;
+ free(etm_ctx->trace_data);
+ etm_ctx->trace_data = NULL;
- arm7_9->etm_ctx->trace_depth = 0;
+ etm_ctx->trace_depth = 0;
etm_ctrl_reg = etm_reg_lookup(etm_ctx, ETM_CTRL);
if (!etm_ctrl_reg)
etm_ctrl_reg = etm_reg_lookup(etm_ctx, ETM_CTRL);
if (!etm_ctrl_reg)
etm_get_reg(etm_ctrl_reg);
etm_get_reg(etm_ctrl_reg);
-static int handle_etm_stop_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_stop_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
{
target_t *target;
armv4_5_common_t *armv4_5;
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
etm_ctrl_reg = etm_reg_lookup(etm_ctx, ETM_CTRL);
if (!etm_ctrl_reg)
}
etm_ctrl_reg = etm_reg_lookup(etm_ctx, ETM_CTRL);
if (!etm_ctrl_reg)
etm_get_reg(etm_ctrl_reg);
etm_get_reg(etm_ctrl_reg);
-static int handle_etm_analyze_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+static int handle_etm_analyze_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
{
target_t *target;
armv4_5_common_t *armv4_5;
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
- command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");
- return ERROR_OK;
+ command_print(cmd_ctx, "ETM: current target isn't an ARM");
+ return ERROR_FAIL;
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if (!(etm_ctx = arm7_9->etm_ctx))
{
command_print(cmd_ctx, "current target doesn't have an ETM configured");
}
if ((retval = etmv1_analyze_trace(etm_ctx, cmd_ctx)) != ERROR_OK)
}
if ((retval = etmv1_analyze_trace(etm_ctx, cmd_ctx)) != ERROR_OK)
}
int etm_register_commands(struct command_context_s *cmd_ctx)
}
int etm_register_commands(struct command_context_s *cmd_ctx)
} etmv1_tracemode_t;
/* forward-declare ETM context */
} etmv1_tracemode_t;
/* forward-declare ETM context */
typedef struct etm_capture_driver_s
{
char *name;
int (*register_commands)(struct command_context_s *cmd_ctx);
typedef struct etm_capture_driver_s
{
char *name;
int (*register_commands)(struct command_context_s *cmd_ctx);
- int (*init)(struct etm_context_s *etm_ctx);
- trace_status_t (*status)(struct etm_context_s *etm_ctx);
- int (*read_trace)(struct etm_context_s *etm_ctx);
- int (*start_capture)(struct etm_context_s *etm_ctx);
- int (*stop_capture)(struct etm_context_s *etm_ctx);
+ int (*init)(struct etm *etm_ctx);
+ trace_status_t (*status)(struct etm *etm_ctx);
+ int (*read_trace)(struct etm *etm_ctx);
+ int (*start_capture)(struct etm *etm_ctx);
+ int (*stop_capture)(struct etm *etm_ctx);
} etm_capture_driver_t;
enum
} etm_capture_driver_t;
enum
* this will have to be split into version independent elements
* and a version specific part
*/
* this will have to be split into version independent elements
* and a version specific part
*/
-typedef struct etm_context_s
{
target_t *target; /* target this ETM is connected to */
reg_cache_t *reg_cache; /* ETM register cache */
{
target_t *target; /* target this ETM is connected to */
reg_cache_t *reg_cache; /* ETM register cache */
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)