diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-02-02 13:22:07 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-02-28 22:26:52 +0000 |
commit | a851ce0d6f2b961f94e09746304e0fb0dad6a15f (patch) | |
tree | a98ee20fb1f66e271c3984fc8daf9d9dfdf748ad /src/flash | |
parent | 0324eb24967088f753bc2fd997b4c18f4ea988c8 (diff) | |
download | openocd_libswd-a851ce0d6f2b961f94e09746304e0fb0dad6a15f.tar.gz openocd_libswd-a851ce0d6f2b961f94e09746304e0fb0dad6a15f.tar.bz2 openocd_libswd-a851ce0d6f2b961f94e09746304e0fb0dad6a15f.tar.xz openocd_libswd-a851ce0d6f2b961f94e09746304e0fb0dad6a15f.zip |
ARMv7M: use software breakpoints for algorithms
- armv7m_run_algorithm now requires all algorithms to use
a software breakpoint at their exit address
- updated all algorithms to support this
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nor/at91sam3.c | 4 | ||||
-rw-r--r-- | src/flash/nor/lpc2000.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stellaris.c | 3 | ||||
-rw-r--r-- | src/flash/nor/stm32x.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 1b2f27c2..5f013ed8 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -2046,9 +2046,7 @@ sam3_page_write_opcodes[] = { 0x10,0xf0,0x01,0x0f, // 41 0024 FBD0 beq .L4 0xfb,0xd0, - // 42 .done: - // 43 0026 FEE7 b .done - 0xfe,0xe7 + 0x00,0xBE /* bkpt #0 */ }; diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c index fc2b1cfc..6674f171 100644 --- a/src/flash/nor/lpc2000.c +++ b/src/flash/nor/lpc2000.c @@ -267,7 +267,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta target_buffer_set_u32(target, jump_gate, ARMV4_5_T_BX(12)); target_buffer_set_u32(target, jump_gate + 4, - ARMV4_5_T_B(0xfffffe)); + ARMV5_T_BKPT(0)); break; case lpc2000_v1: case lpc2000_v2: diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 21a0cffd..b80daed1 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -805,8 +805,7 @@ static const uint8_t stellaris_write_code[] = 0x04,0x36, /* adds r6, r6, #4 */ 0x96,0x42, /* cmp r6, r2 */ 0xF4,0xD1, /* bne mainloop */ - /* exit: */ - 0xFE,0xE7, /* b exit */ + 0x00,0xBE, /* bkpt #0 */ /* pFLASH_CTRL_BASE: */ 0x00,0xD0,0x0F,0x40, /* .word 0x400FD000 */ /* FLASHWRITECMD: */ diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c index bfdd3cd0..53fc4ea2 100644 --- a/src/flash/nor/stm32x.c +++ b/src/flash/nor/stm32x.c @@ -459,8 +459,7 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer, uint32_t 0x01, 0xD1, /* bne exit */ 0x01, 0x3A, /* subs r2, r2, #1 */ 0xED, 0xD1, /* bne write */ - /* exit: */ - 0xFE, 0xE7, /* b exit */ + 0x00, 0xBE, /* bkpt #0 */ 0x10, 0x20, 0x02, 0x40, /* STM32_FLASH_CR: .word 0x40022010 */ 0x0C, 0x20, 0x02, 0x40 /* STM32_FLASH_SR: .word 0x4002200C */ }; |