X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Farm7tdmi.c;h=99fa9bc43b899fb8c3fb84fc22854d6fa6f7ed51;hb=2babd879165466517b3d5f0530794a3885b3eeaf;hp=f3e9fd5f9e4a119d39009550e733972171278ee5;hpb=8d73c2a9b0c00c870694a57f7cfbc23e354855ac;p=openocd.git diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index f3e9fd5f9e..99fa9bc43b 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -2,6 +2,9 @@ * Copyright (C) 2005 by Dominic Rath * * Dominic.Rath@gmx.de * * * + * Copyright (C) 2008 by Spencer Oliver * + * spen@spen-soft.co.uk * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -44,8 +47,8 @@ int arm7tdmi_register_commands(struct command_context_s *cmd_ctx); /* forward declarations */ -int arm7tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target); -int arm7tdmi_target_create(Jim_Interp *interp, struct target_s *target); + +int arm7tdmi_target_create(struct target_s *target,Jim_Interp *interp); int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target); int arm7tdmi_quit(void); @@ -85,9 +88,8 @@ target_type_t arm7tdmi_target = .add_watchpoint = arm7_9_add_watchpoint, .remove_watchpoint = arm7_9_remove_watchpoint, - .register_commands = arm7tdmi_register_commands, - .target_command = arm7tdmi_target_command, - // .target_create = arm7tdmi_target_create, + .register_commands = arm7tdmi_register_commands, + .target_create = arm7tdmi_target_create, .init_target = arm7tdmi_init_target, .examine = arm7tdmi_examine, .quit = arm7tdmi_quit @@ -829,32 +831,9 @@ int arm7tdmi_init_arch_info(target_t *target, arm7tdmi_common_t *arm7tdmi, int c return ERROR_OK; } -/* target arm7tdmi */ -int arm7tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target) -{ - int chain_pos; - char *variant = NULL; - arm7tdmi_common_t *arm7tdmi = malloc(sizeof(arm7tdmi_common_t)); - memset(arm7tdmi, 0, sizeof(*arm7tdmi)); - if (argc < 4) - { - LOG_ERROR("'target arm7tdmi' requires at least one additional argument"); - exit(-1); - } - - chain_pos = strtoul(args[3], NULL, 0); - - if (argc >= 5) - variant = args[4]; - - arm7tdmi_init_arch_info(target, arm7tdmi, chain_pos, variant); - - return ERROR_OK; -} -int arm7tdmi_target_create(Jim_Interp *interp, - struct target_s *target) +int arm7tdmi_target_create( struct target_s *target, Jim_Interp *interp ) { arm7tdmi_common_t *arm7tdmi; @@ -866,7 +845,6 @@ int arm7tdmi_target_create(Jim_Interp *interp, } - int arm7tdmi_register_commands(struct command_context_s *cmd_ctx) { int retval; @@ -876,11 +854,3 @@ int arm7tdmi_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } - - -/* - * Local Variables: *** - * c-basic-offset: 4 *** - * tab-width: 4 *** - * End: *** - */