diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-10-28 10:08:16 +0100 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-10-28 10:08:16 +0100 |
commit | 4617cd0f911d64a460d99d25c531ddc55f2452ca (patch) | |
tree | 502e7ed643468bfc18276c896917fbb522ee2d5d /src/flash/nor/stm32x.c | |
parent | 1fafb669c99744b986d85b5c4a4e276767898654 (diff) |
src: add loader src description
- add comment where to find the various loaders src files.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/flash/nor/stm32x.c')
-rw-r--r-- | src/flash/nor/stm32x.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c index 4ec777dd..5b31b042 100644 --- a/src/flash/nor/stm32x.c +++ b/src/flash/nor/stm32x.c @@ -446,6 +446,8 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer, struct armv7m_algorithm armv7m_info; int retval = ERROR_OK; + /* see contib/loaders/flash/stm32x.s for src */ + static const uint8_t stm32x_flash_write_code[] = { /* write: */ 0xDF, 0xF8, 0x24, 0x40, /* ldr r4, STM32_FLASH_CR */ @@ -462,6 +464,7 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer, 0x01, 0xD1, /* bne exit */ 0x01, 0x3A, /* subs r2, r2, #1 */ 0xED, 0xD1, /* bne write */ + /* exit: */ 0x00, 0xBE, /* bkpt #0 */ 0x10, 0x20, 0x02, 0x40, /* STM32_FLASH_CR: .word 0x40022010 */ 0x0C, 0x20, 0x02, 0x40 /* STM32_FLASH_SR: .word 0x4002200C */ |