projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag '1.2.0' into debian
[fw/stlink]
/
flashloaders
/
stm32lx.s
diff --git
a/flashloaders/stm32lx.s
b/flashloaders/stm32lx.s
index 799d1345cc3fbff8a044b2468f399dff7e160add..bb8f7c93f6ad77b703b3aa25a59f4eb5f131e5ee 100644
(file)
--- a/
flashloaders/stm32lx.s
+++ b/
flashloaders/stm32lx.s
@@
-34,27
+34,25
@@
.global write
/*
.global write
/*
- r0 -
destination
address
- r1 -
source
address
+ r0 -
source
address
+ r1 -
destination
address
r2 - count
*/
r2 - count
*/
- // Set 0 to r3
- movs r3, #0
// Go to compare
// Go to compare
- b
.n
test_done
+ b test_done
write_word:
// Load one word from address in r0, increment by 4
write_word:
// Load one word from address in r0, increment by 4
- ldr.w ip, [r
1
], #4
+ ldr.w ip, [r
0
], #4
// Store the word to address in r1, increment by 4
// Store the word to address in r1, increment by 4
- str.w ip, [r
0
], #4
- //
Increment r3
-
adds r3
, #1
+ str.w ip, [r
1
], #4
+ //
Decrement r2
+
subs r2
, #1
test_done:
test_done:
- //
Compare r3 and
r2
- cmp r
3, r2
+ //
Test
r2
+ cmp r
2, #0
// Loop if not zero
bcc.n write_word
// Loop if not zero
bcc.n write_word