Use for loop in STM32F1 stub and compile with -Os.
This commit is contained in:
parent
41256e3c2a
commit
12e313dab9
|
@ -25,10 +25,9 @@
|
|||
void __attribute__((naked))
|
||||
stm32f1_flash_write_stub(uint16_t *dest, uint16_t *src, uint32_t size)
|
||||
{
|
||||
while (size) {
|
||||
for (int i; i < size; i += 2) {
|
||||
FLASH_CR = FLASH_CR_PG;
|
||||
*dest++ = *src++;
|
||||
size -= 2;
|
||||
while (FLASH_SR & FLASH_SR_BSY)
|
||||
;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
0x4613, 0xE010, 0x4A0D, 0x2401, 0x6014, 0x4602, 0x1C90, 0x460C, 0x1CA1, 0x8824, 0x8014, 0x3B02, 0xBF00, 0x4A09, 0x6812, 0xF002, 0x0201, 0x2A00, 0xD1F9, 0x2B00, 0xD1EC, 0x4B05, 0x681B, 0xF003, 0x0314, 0x2B00, 0xD000, 0xBE01, 0xBE00, 0xBF00, 0x2010, 0x4002, 0x200C, 0x4002,
|
||||
0x2300, 0x4293, 0x4C09, 0xD20A, 0x4D09, 0x2601, 0x602E, 0x5ACD, 0x52C5, 0x6825, 0xF015, 0x0F01, 0xD1FB, 0x3302, 0xE7F1, 0x6823, 0xF013, 0x0F14, 0xD000, 0xBE01, 0xBE00, 0xBF00, 0x200C, 0x4002, 0x2010, 0x4002,
|
Loading…
Reference in New Issue