summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-20 16:21:29 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-20 16:21:29 -0800
commit85fe1506a2296493d13368e545fa2d4ddb13ea72 (patch)
tree8a213490024e751ddcea4dbf2a29b7afd93252a3 /src
parent7a67aae93c7de1e72baaba65635af0461ad8d040 (diff)
downloadopenocd+libswd-85fe1506a2296493d13368e545fa2d4ddb13ea72.tar.gz
openocd+libswd-85fe1506a2296493d13368e545fa2d4ddb13ea72.tar.bz2
openocd+libswd-85fe1506a2296493d13368e545fa2d4ddb13ea72.tar.xz
openocd+libswd-85fe1506a2296493d13368e545fa2d4ddb13ea72.zip
ARM7/ARM9: remove old "debug commands"
Remove two commands that were documented as "debug commands" and where "you probably don't want to use this". We never intended to support them, and at least one problem report boiled down to using this when it shouldn't have been used. Update the docs on the existing register commands to talk a bit more about register access and cache behavior. (Those debug commands existed largely to *bypass* the cache.) And fix some minor doc goofs that snuck in with recent changes, renaming "armv4_5" as "arm" and "arm9tdmi" as "arm9". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/target/arm7_9_common.c130
1 files changed, 0 insertions, 130 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 1c854177..7a2b5429 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2737,124 +2737,6 @@ int arm7_9_examine(struct target *target)
return retval;
}
-
-COMMAND_HANDLER(handle_arm7_9_write_xpsr_command)
-{
- uint32_t value;
- int spsr;
- int retval;
- struct target *target = get_current_target(CMD_CTX);
- struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
-
- if (!is_arm7_9(arm7_9))
- {
- command_print(CMD_CTX, "current target isn't an ARM7/ARM9 target");
- return ERROR_TARGET_INVALID;
- }
-
- if (target->state != TARGET_HALTED)
- {
- command_print(CMD_CTX, "can't write registers while running");
- return ERROR_FAIL;
- }
-
- if (CMD_ARGC < 2)
- {
- command_print(CMD_CTX, "usage: write_xpsr <value> <not cpsr | spsr>");
- return ERROR_FAIL;
- }
-
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], value);
- COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], spsr);
-
- /* if we're writing the CPSR, mask the T bit */
- if (!spsr)
- value &= ~0x20;
-
- arm7_9->write_xpsr(target, value, spsr);
- if ((retval = jtag_execute_queue()) != ERROR_OK)
- {
- LOG_ERROR("JTAG error while writing to xpsr");
- return retval;
- }
-
- return ERROR_OK;
-}
-
-COMMAND_HANDLER(handle_arm7_9_write_xpsr_im8_command)
-{
- uint32_t value;
- int rotate;
- int spsr;
- int retval;
- struct target *target = get_current_target(CMD_CTX);
- struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
-
- if (!is_arm7_9(arm7_9))
- {
- command_print(CMD_CTX, "current target isn't an ARM7/ARM9 target");
- return ERROR_TARGET_INVALID;
- }
-
- if (target->state != TARGET_HALTED)
- {
- command_print(CMD_CTX, "can't write registers while running");
- return ERROR_FAIL;
- }
-
- if (CMD_ARGC < 3)
- {
- command_print(CMD_CTX, "usage: write_xpsr_im8 <im8> <rotate> <not cpsr | spsr>");
- return ERROR_FAIL;
- }
-
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], value);
- COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], rotate);
- COMMAND_PARSE_NUMBER(int, CMD_ARGV[2], spsr);
-
- arm7_9->write_xpsr_im8(target, value, rotate, spsr);
- if ((retval = jtag_execute_queue()) != ERROR_OK)
- {
- LOG_ERROR("JTAG error while writing 8-bit immediate to xpsr");
- return retval;
- }
-
- return ERROR_OK;
-}
-
-COMMAND_HANDLER(handle_arm7_9_write_core_reg_command)
-{
- uint32_t value;
- uint32_t mode;
- int num;
- struct target *target = get_current_target(CMD_CTX);
- struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
-
- if (!is_arm7_9(arm7_9))
- {
- command_print(CMD_CTX, "current target isn't an ARM7/ARM9 target");
- return ERROR_TARGET_INVALID;
- }
-
- if (target->state != TARGET_HALTED)
- {
- command_print(CMD_CTX, "can't write registers while running");
- return ERROR_FAIL;
- }
-
- if (CMD_ARGC < 3)
- {
- command_print(CMD_CTX, "usage: write_core_reg <num> <mode> <value>");
- return ERROR_FAIL;
- }
-
- COMMAND_PARSE_NUMBER(int, CMD_ARGV[0], num);
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], mode);
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], value);
-
- return arm7_9_write_core_reg(target, num, mode, value);
-}
-
COMMAND_HANDLER(handle_arm7_9_dbgrq_command)
{
struct target *target = get_current_target(CMD_CTX);
@@ -2948,18 +2830,6 @@ int arm7_9_register_commands(struct command_context *cmd_ctx)
arm7_9_cmd = register_command(cmd_ctx, NULL, "arm7_9",
NULL, COMMAND_ANY, "arm7/9 specific commands");
- register_command(cmd_ctx, arm7_9_cmd, "write_xpsr",
- handle_arm7_9_write_xpsr_command, COMMAND_EXEC,
- "write program status register <value> <not cpsr | spsr>");
- register_command(cmd_ctx, arm7_9_cmd, "write_xpsr_im8",
- handle_arm7_9_write_xpsr_im8_command, COMMAND_EXEC,
- "write program status register "
- "<8bit immediate> <rotate> <not cpsr | spsr>");
-
- register_command(cmd_ctx, arm7_9_cmd, "write_core_reg",
- handle_arm7_9_write_core_reg_command, COMMAND_EXEC,
- "write core register <num> <mode> <value>");
-
register_command(cmd_ctx, arm7_9_cmd, "dbgrq",
handle_arm7_9_dbgrq_command, COMMAND_ANY,
"use EmbeddedICE dbgrq instead of breakpoint "