From 4617cd0f911d64a460d99d25c531ddc55f2452ca Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 28 Oct 2010 10:08:16 +0100 Subject: src: add loader src description - add comment where to find the various loaders src files. Signed-off-by: Spencer Oliver --- src/flash/nor/pic32mx.c | 2 ++ src/flash/nor/stellaris.c | 2 ++ src/flash/nor/stm32x.c | 3 +++ src/flash/nor/str7x.c | 2 ++ src/flash/nor/str9x.c | 2 ++ 5 files changed, 11 insertions(+) (limited to 'src/flash/nor') diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 363f49e8..6e51f1aa 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -227,6 +227,8 @@ static int pic32mx_protect(struct flash_bank *bank, int set, int first, int last return ERROR_OK; } +/* see contib/loaders/flash/pic32mx.s for src */ + static const uint32_t pic32mx_flash_write_code[] = { /* write: */ 0x3C08AA99, /* lui $t0, 0xaa99 */ diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 287be12d..069ee8c1 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -773,6 +773,8 @@ static int stellaris_protect(struct flash_bank *bank, int set, int first, int la return ERROR_OK; } +/* see contib/loaders/flash/stellaris.s for src */ + static const uint8_t stellaris_write_code[] = { /* 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 */ diff --git a/src/flash/nor/str7x.c b/src/flash/nor/str7x.c index 069e90c2..3a74d353 100644 --- a/src/flash/nor/str7x.c +++ b/src/flash/nor/str7x.c @@ -406,6 +406,8 @@ static int str7x_write_block(struct flash_bank *bank, uint8_t *buffer, struct arm_algorithm armv4_5_info; int retval = ERROR_OK; + /* see contib/loaders/flash/str7x.s for src */ + static const uint32_t str7x_flash_write_code[] = { /* write: */ 0xe3a04201, /* mov r4, #0x10000000 */ diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c index cfe6a777..1e71753e 100644 --- a/src/flash/nor/str9x.c +++ b/src/flash/nor/str9x.c @@ -364,6 +364,8 @@ static int str9x_write_block(struct flash_bank *bank, struct arm_algorithm armv4_5_info; int retval = ERROR_OK; + /* see contib/loaders/flash/str9x.s for src */ + static const uint32_t str9x_flash_write_code[] = { /* write: */ 0xe3c14003, /* bic r4, r1, #3 */ -- cgit v1.2.3