summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer Oliver <ntfreak@users.sourceforge.net>2010-07-19 20:33:04 +0100
committerSpencer Oliver <ntfreak@users.sourceforge.net>2010-07-20 09:02:42 +0100
commit260eb4548b01da3ecd2cd146bb22a0f36df1a038 (patch)
treef261cdbd58be2eaed8eac554238c599967c98725
parentee17d5c48eaca42438663405ff6d090a391fc9e6 (diff)
downloadopenocd_libswd-260eb4548b01da3ecd2cd146bb22a0f36df1a038.tar.gz
openocd_libswd-260eb4548b01da3ecd2cd146bb22a0f36df1a038.tar.bz2
openocd_libswd-260eb4548b01da3ecd2cd146bb22a0f36df1a038.tar.xz
openocd_libswd-260eb4548b01da3ecd2cd146bb22a0f36df1a038.zip
flash: remove algorithm exit_point address for supported targets
For the above targets the exit_point is optional when used with run_algorithm, so remove it. This makes updating the algorithm less error prone. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
-rw-r--r--src/flash/nor/lpc2000.c2
-rw-r--r--src/flash/nor/pic32mx.c2
-rw-r--r--src/flash/nor/stellaris.c3
-rw-r--r--src/flash/nor/stm32x.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c
index 866be509..0930d62d 100644
--- a/src/flash/nor/lpc2000.c
+++ b/src/flash/nor/lpc2000.c
@@ -346,7 +346,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta
init_reg_param(&reg_params[4], "lr", 32, PARAM_OUT);
buf_set_u32(reg_params[4].value, 0, 32, (lpc2000_info->iap_working_area->address + 0x04) | 1); /* bit0 of LR = 1 to return in Thumb mode */
- target_run_algorithm(target, 2, mem_params, 5, reg_params, lpc2000_info->iap_working_area->address, lpc2000_info->iap_working_area->address + 0x4, 10000, &armv7m_info);
+ target_run_algorithm(target, 2, mem_params, 5, reg_params, lpc2000_info->iap_working_area->address, 0, 10000, &armv7m_info);
break;
case lpc2000_v1:
case lpc2000_v2:
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index 2fe864d4..363f49e8 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -360,7 +360,7 @@ static int pic32mx_write_block(struct flash_bank *bank, uint8_t *buffer,
if ((retval = target_run_algorithm(target, 0, NULL, 3, reg_params,
pic32mx_info->write_algorithm->address,
- pic32mx_info->write_algorithm->address + (sizeof(pic32mx_flash_write_code) - 76),
+ 0,
10000, &mips32_info)) != ERROR_OK)
{
LOG_ERROR("error executing pic32mx flash write algorithm");
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index ff1c2e48..69e2f107 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -884,8 +884,7 @@ static int stellaris_write_block(struct flash_bank *bank,
(unsigned) (wcount - thisrun_count));
retval = target_run_algorithm(target, 0, NULL, 3, reg_params,
write_algorithm->address,
- write_algorithm->address +
- sizeof(stellaris_write_code) - 10,
+ 0,
10000, &armv7m_info);
if (retval != ERROR_OK)
{
diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c
index 5ce5d455..4ec777dd 100644
--- a/src/flash/nor/stm32x.c
+++ b/src/flash/nor/stm32x.c
@@ -519,7 +519,7 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer,
if ((retval = target_run_algorithm(target, 0, NULL, 4, reg_params,
stm32x_info->write_algorithm->address,
- stm32x_info->write_algorithm->address + (sizeof(stm32x_flash_write_code) - 10),
+ 0,
10000, &armv7m_info)) != ERROR_OK)
{
LOG_ERROR("error executing stm32x flash write algorithm");