summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-09 13:16:32 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-09 13:16:32 -0800
commitd70d9634bf6ab73ec4f2ac1e77012785770b460a (patch)
treee2cfbb23ab2a145dbd465832415de867904c247f /src
parent9253ce9baea6f7b5ef3fc53b4bc0cfbff48194f4 (diff)
downloadopenocd_libswd-d70d9634bf6ab73ec4f2ac1e77012785770b460a.tar.gz
openocd_libswd-d70d9634bf6ab73ec4f2ac1e77012785770b460a.tar.bz2
openocd_libswd-d70d9634bf6ab73ec4f2ac1e77012785770b460a.tar.xz
openocd_libswd-d70d9634bf6ab73ec4f2ac1e77012785770b460a.zip
finish removing deprecated/obsolete commands
It's been about a year since these were deprecated and, in most cases, removed. There's no point in carrying that documentation, or backwards compatibility for "jtag_device" and "jtag_speed", around forever. (Or a few remnants of obsolete code...) Removed a few obsolete uses of "jtag_speed": - The Calao stuff hasn't worked since July 2008. (Those Atmel targets need to work with a 32KHz core clock after reset until board-specific init-reset code sets up the PLL and enables a faster JTAg clock.) - Parport speed controls don't actually work (tops out at about 1 MHz on typical HW). - In general, speed controls need to live in board.cfg files (or sometimes target.cfg files), not interface.cfg ... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/core.c7
-rw-r--r--src/jtag/jtag.h14
-rw-r--r--src/jtag/tcl.c90
-rw-r--r--src/target/arm7_9_common.c1
-rw-r--r--src/target/arm7_9_common.h1
-rw-r--r--src/target/target.c8
6 files changed, 8 insertions, 113 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 8bb45bcd..bbe7425f 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1569,13 +1569,6 @@ static int jtag_set_speed(int speed)
return jtag ? jtag->speed(speed) : ERROR_OK;
}
-int jtag_config_speed(int speed)
-{
- LOG_DEBUG("handle jtag speed");
- clock_mode = CLOCK_MODE_SPEED;
- return jtag_set_speed(speed);
-}
-
int jtag_config_khz(unsigned khz)
{
LOG_DEBUG("handle jtag khz");
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index c5bee075..1dfefdef 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -254,31 +254,25 @@ int jtag_call_event_callbacks(enum jtag_event event);
/// @returns The current JTAG speed setting.
int jtag_get_speed(void);
+
/**
* Given a @a speed setting, use the interface @c speed_div callback to
* adjust the setting.
* @param speed The speed setting to convert back to readable KHz.
* @returns ERROR_OK if the interface has not been initialized or on success;
- * otherwise, the error code produced by the @c speed_div callback.
+ * otherwise, the error code produced by the @c speed_div callback.
*/
int jtag_get_speed_readable(int *speed);
-/**
- * Set the JTAG speed. This routine will call the underlying
- * interface @c speed callback, if the interface has been initialized.
- * @param speed The new speed setting.
- * @returns ERROR_OK during configuration or on success, or an error
- * code returned from the interface @c speed callback.
- */
-int jtag_config_speed(int speed);
-
/// Attempt to configure the interface for the specified KHz.
int jtag_config_khz(unsigned khz);
+
/**
* Attempt to enable RTCK/RCLK. If that fails, fallback to the
* specified frequency.
*/
int jtag_config_rclk(unsigned fallback_speed_khz);
+
/// Retreives the clock speed of the JTAG interface in KHz.
unsigned jtag_get_speed_khz(void);
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index c064a825..574f266e 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -55,10 +55,8 @@ extern jtag_interface_t *jtag_interface;
static int handle_interface_list_command(struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc);
static int handle_interface_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-static int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_jtag_khz_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_jtag_rclk_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-static int handle_jtag_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_reset_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_jtag_nsrst_delay_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_jtag_ntrst_delay_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
@@ -615,15 +613,11 @@ int jtag_register_commands(struct command_context_s *cmd_ctx)
register_command(cmd_ctx, NULL,
"interface_list", &handle_interface_list_command,
COMMAND_ANY, "list all built-in interfaces");
- register_command(cmd_ctx, NULL, "jtag_speed", handle_jtag_speed_command,
- COMMAND_ANY, "(DEPRECATED) set jtag speed (if supported)");
register_command(cmd_ctx, NULL, "jtag_khz", handle_jtag_khz_command,
COMMAND_ANY, "set maximum jtag speed (if supported); "
"parameter is maximum khz, or 0 for adaptive clocking (RTCK).");
register_command(cmd_ctx, NULL, "jtag_rclk", handle_jtag_rclk_command,
COMMAND_ANY, "fallback_speed_khz - set JTAG speed to RCLK or use fallback speed");
- register_command(cmd_ctx, NULL, "jtag_device", handle_jtag_device_command,
- COMMAND_CONFIG, "(DEPRECATED) jtag_device <ir_length> <ir_expected> <ir_mask>");
register_command(cmd_ctx, NULL, "reset_config", handle_reset_config_command,
COMMAND_ANY,
"reset_config "
@@ -748,67 +742,6 @@ static int handle_interface_list_command(struct command_context_s *cmd_ctx,
return ERROR_OK;
}
-static int handle_jtag_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
-{
- int e;
- char buf[1024];
- Jim_Obj *newargs[ 10 ];
- /*
- * CONVERT SYNTAX
- * argv[-1] = command
- * argv[ 0] = ir length
- * argv[ 1] = ir capture
- * argv[ 2] = ir mask
- * argv[ 3] = not actually used by anything but in the docs
- */
-
- if (argc < 4) {
- command_print(cmd_ctx, "OLD DEPRECATED SYNTAX: Please use the NEW syntax");
- return ERROR_OK;
- }
- command_print(cmd_ctx, "OLD SYNTAX: DEPRECATED - translating to new syntax");
- command_print(cmd_ctx, "jtag newtap CHIP TAP -irlen %s -ircapture %s -irvalue %s",
- args[0],
- args[1],
- args[2]);
- command_print(cmd_ctx, "Example: STM32 has 2 taps, the cortexM3(len4) + boundaryscan(len5)");
- command_print(cmd_ctx, "jtag newtap stm32 cortexm3 ....., thus creating the tap: \"stm32.cortexm3\"");
- command_print(cmd_ctx, "jtag newtap stm32 boundary ....., and the tap: \"stm32.boundary\"");
- command_print(cmd_ctx, "And then refer to the taps by the dotted name.");
-
- newargs[0] = Jim_NewStringObj(interp, "jtag", -1);
- newargs[1] = Jim_NewStringObj(interp, "newtap", -1);
- sprintf(buf, "chip%d", jtag_tap_count());
- newargs[2] = Jim_NewStringObj(interp, buf, -1);
- sprintf(buf, "tap%d", jtag_tap_count());
- newargs[3] = Jim_NewStringObj(interp, buf, -1);
- newargs[4] = Jim_NewStringObj(interp, "-irlen", -1);
- newargs[5] = Jim_NewStringObj(interp, args[0], -1);
- newargs[6] = Jim_NewStringObj(interp, "-ircapture", -1);
- newargs[7] = Jim_NewStringObj(interp, args[1], -1);
- newargs[8] = Jim_NewStringObj(interp, "-irmask", -1);
- newargs[9] = Jim_NewStringObj(interp, args[2], -1);
-
- command_print(cmd_ctx, "NEW COMMAND:");
- sprintf(buf, "%s %s %s %s %s %s %s %s %s %s",
- Jim_GetString(newargs[0], NULL),
- Jim_GetString(newargs[1], NULL),
- Jim_GetString(newargs[2], NULL),
- Jim_GetString(newargs[3], NULL),
- Jim_GetString(newargs[4], NULL),
- Jim_GetString(newargs[5], NULL),
- Jim_GetString(newargs[6], NULL),
- Jim_GetString(newargs[7], NULL),
- Jim_GetString(newargs[8], NULL),
- Jim_GetString(newargs[9], NULL));
-
- e = jim_jtag_command(interp, 10, newargs);
- if (e != JIM_OK) {
- command_print(cmd_ctx, "%s", Jim_GetString(Jim_GetResult(interp), NULL));
- }
- return e;
-}
-
static int handle_scan_chain_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
jtag_tap_t *tap;
@@ -1106,29 +1039,6 @@ static int handle_jtag_ntrst_assert_width_command(struct command_context_s *cmd_
return ERROR_OK;
}
-static int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
-{
- int retval = ERROR_OK;
-
- command_print(cmd_ctx, "OLD SYNTAX: DEPRECATED - "
- "use jtag_khz, not jtag_speed");
-
- if (argc > 1)
- return ERROR_COMMAND_SYNTAX_ERROR;
- if (argc == 1)
- {
- LOG_DEBUG("handle jtag speed");
-
- unsigned cur_speed = 0;
- COMMAND_PARSE_NUMBER(uint, args[0], cur_speed);
-
- retval = jtag_config_speed(cur_speed);
- }
- command_print(cmd_ctx, "jtag_speed: %d", jtag_get_speed());
-
- return retval;
-}
-
static int handle_jtag_khz_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
if (argc > 1)
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 2a0aefca..b251ec5b 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -38,7 +38,6 @@
int arm7_9_debug_entry(target_t *target);
-int arm7_9_enable_sw_bkpts(struct target_s *target);
/* command handler forward declarations */
int handle_arm7_9_write_xpsr_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h
index 9c42b6b0..c0145d95 100644
--- a/src/target/arm7_9_common.h
+++ b/src/target/arm7_9_common.h
@@ -47,7 +47,6 @@ typedef struct arm7_9_common_s
uint32_t arm_bkpt; /**< ARM breakpoint instruction */
uint16_t thumb_bkpt; /**< Thumb breakpoint instruction */
- bool force_hw_bkpts;
int sw_breakpoints_added; /**< Specifies which watchpoint software breakpoints are setup on */
int sw_breakpoint_count; /**< keep track of number of software breakpoints we have set */
diff --git a/src/target/target.c b/src/target/target.c
index 3e4c00d0..90c143ff 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -1282,10 +1282,10 @@ void target_free_all_working_areas(struct target_s *target)
int target_register_commands(struct command_context_s *cmd_ctx)
{
- register_command(cmd_ctx, NULL, "targets", handle_targets_command, COMMAND_EXEC, "change the current command line target (one parameter) or lists targets (with no parameter)");
-
-
-
+ register_command(cmd_ctx, NULL, "targets",
+ handle_targets_command, COMMAND_EXEC,
+ "change current command line target (one parameter) "
+ "or list targets (no parameters)");
register_jim(cmd_ctx, "target", jim_target, "configure target");