diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-11 21:52:02 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-11 21:52:02 -0800 |
commit | 9855a11eddc38b812203facd7a52a71422b19272 (patch) | |
tree | 6ccd624cc263845d8b3acea20e093f691b25d448 /src/target/etm_dummy.c | |
parent | 3ae44019018b7fa9adbe7dcf49c2b79e8e11acea (diff) | |
download | openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.tar.gz openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.tar.bz2 openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.tar.xz openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.zip |
ETM: update port drivers
Make both useful ETM port drivers (etb, etm_dummy) use the new
toplevel ETM handle, instead of the to-be-removed lower level one.
Do the same for the "oocd-trace" prototype too; and fix its
error reporting paths: return failure codes, don't exit(), etc
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/etm_dummy.c')
-rw-r--r-- | src/target/etm_dummy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/target/etm_dummy.c b/src/target/etm_dummy.c index 4b84fd32..eba1865e 100644 --- a/src/target/etm_dummy.c +++ b/src/target/etm_dummy.c @@ -28,8 +28,7 @@ static int handle_etm_dummy_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; + struct arm *arm; target = get_target(args[0]); @@ -39,15 +38,16 @@ static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, ch return ERROR_FAIL; } - if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK) + arm = target_to_arm(target); + if (!is_arm(arm)) { - command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target"); + command_print(cmd_ctx, "target '%s' isn't an ARM", args[0]); return ERROR_FAIL; } - if (arm7_9->etm_ctx) + if (arm->etm) { - arm7_9->etm_ctx->capture_driver_priv = NULL; + arm->etm->capture_driver_priv = NULL; } else { |