summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpencer Oliver <ntfreak@users.sourceforge.net>2010-07-16 22:52:49 +0100
committerSpencer Oliver <ntfreak@users.sourceforge.net>2010-07-16 22:52:49 +0100
commitb05ae413314f48832dd12c994b85c9aad8632967 (patch)
tree2a968439367f10ad300a3806f075cc5f1ab00e6b /src
parentd16f9259c2aa0be1ffde9c6faa04a6463819bb8e (diff)
downloadopenocd_libswd-b05ae413314f48832dd12c994b85c9aad8632967.tar.gz
openocd_libswd-b05ae413314f48832dd12c994b85c9aad8632967.tar.bz2
openocd_libswd-b05ae413314f48832dd12c994b85c9aad8632967.tar.xz
openocd_libswd-b05ae413314f48832dd12c994b85c9aad8632967.zip
flash: use bkpt for str9 flash algo algorithm
STR9 is ARMv5 arch so use bkpt instruction rather than waste a breakpoint. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/str9x.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c
index 103af16d..528e52e2 100644
--- a/src/flash/nor/str9x.c
+++ b/src/flash/nor/str9x.c
@@ -369,7 +369,7 @@ static int str9x_write_block(struct flash_bank *bank,
0xe2522001, /* subs r2, r2, #1 */
0x1affffed, /* bne write */
/* exit: */
- 0xeafffffe, /* b exit */
+ 0xe1200070, /* bkpt #0 */
};
/* flash write code */
@@ -421,8 +421,7 @@ static int str9x_write_block(struct flash_bank *bank,
if ((retval = target_run_algorithm(target, 0, NULL, 4, reg_params,
str9x_info->write_algorithm->address,
- str9x_info->write_algorithm->address + (sizeof(str9x_flash_write_code) - 4),
- 10000, &armv4_5_info)) != ERROR_OK)
+ 0, 10000, &armv4_5_info)) != ERROR_OK)
{
LOG_ERROR("error executing str9x flash write algorithm");
retval = ERROR_FLASH_OPERATION_FAILED;