aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2012-01-04 17:36:56 +0000
committerØyvind Harboe <oyvindharboe@gmail.com>2012-01-04 17:32:37 +0000
commit42cb62cf3b47b982d6444948b483f9c6ce32de05 (patch)
treedd228b9704e3eeb841994b1c61a1618dde7f305d /src
parentae7ab8b09d1c69559284ad9d9e3c17345d2496dd (diff)
stlink: update to use ERROR_COMMAND_SYNTAX_ERROR
Change-Id: I21b669b09df65b56659d2f057cf389ba7b1cecfa Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/335 Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/target/stm32_stlink.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/target/stm32_stlink.c b/src/target/stm32_stlink.c
index baa6b748..c39d4c80 100644
--- a/src/target/stm32_stlink.c
+++ b/src/target/stm32_stlink.c
@@ -98,7 +98,7 @@ static int stm32_stlink_load_core_reg_u32(struct target *target,
break;
default:
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
return ERROR_OK;
@@ -184,7 +184,7 @@ static int stm32_stlink_store_core_reg_u32(struct target *target,
break;
default:
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
return ERROR_OK;
@@ -225,7 +225,7 @@ static int stm32_stlink_target_create(struct target *target,
struct cortex_m3_common *cortex_m3 = calloc(1, sizeof(struct cortex_m3_common));
if (!cortex_m3)
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
stm32_stlink_init_arch_info(target, cortex_m3, target->tap);
@@ -245,7 +245,7 @@ static int stm32_stlink_examine(struct target *target)
if (target->tap->hasidcode == false) {
LOG_ERROR("no IDCODE present on device");
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
if (!target_was_examined(target)) {
@@ -566,10 +566,10 @@ static int stm32_stlink_read_memory(struct target *target, uint32_t address,
struct stlink_interface_s *stlink_if = target_to_stlink(target);
if (!count || !buffer)
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
if (size != 4) {
LOG_DEBUG("%s %x %d %d", __func__, address, size, count);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
while (count) {
@@ -602,10 +602,10 @@ static int stm32_stlink_write_memory(struct target *target, uint32_t address,
struct stlink_interface_s *stlink_if = target_to_stlink(target);
if (!count || !buffer)
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
if (size != 4) {
LOG_DEBUG("%s %x %d %d", __func__, address, size, count);
- return ERROR_INVALID_ARGUMENTS;
+ return ERROR_COMMAND_SYNTAX_ERROR;
}
while (count) {