Overhaul time support API
[fw/openocd] / src / target / etm_dummy.c
index ee83f172d934e3a75578161cd38a239f05ad032f..4b84fd32061b64279e424f2e848c703e20fe00ca 100644 (file)
 #include "config.h"
 #endif
 
-#include <string.h>
-
 #include "etm_dummy.h"
-#include "etm.h"
-
 #include "arm7_9_common.h"
-#include "log.h"
-#include "types.h"
-#include "binarybuffer.h"
-#include "target.h"
-#include "register.h"
-#include "jtag.h"
 
-#include <stdlib.h>
 
 static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
@@ -42,11 +31,11 @@ static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, ch
        armv4_5_common_t *armv4_5;
        arm7_9_common_t *arm7_9;
 
-       target = get_target_by_num(strtoul(args[0], NULL, 0));
+       target = get_target(args[0]);
 
        if (!target)
        {
-               LOG_ERROR("target number '%s' not defined", args[0]);
+               LOG_ERROR("target '%s' not defined", args[0]);
                return ERROR_FAIL;
        }