stlink-common: Update STM32L0 and STM32L1 loader ABI
[fw/stlink] / flashloaders / stm32l0x.s
index 9fc44468f5efdcd1fc61eab992d5e8884335870e..6c863c64aef7a869251c872675d319b5b767210b 100644 (file)
@@ -34,8 +34,8 @@
     .global write
 
 /*
-    r0 - destination address
-    r1 - source address
+    r0 - source address
+    r1 - destination address
     r2 - count
 */
 
@@ -46,9 +46,9 @@
 
 write_word:
     // Load one word from address in r0, increment by 4
-    ldr    r4, [r1]
+    ldr    r4, [r0]
     // Store the word to address in r1, increment by 4
-    str    r4, [r0]
+    str    r4, [r1]
     // Increment r3
     adds    r3, #1
        adds    r1, #4