Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from zyp/master
Added flash loader stub for F2/F4.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.global start | ||
.syntax unified | ||
|
||
@ r0 = source | ||
@ r1 = target | ||
@ r2 = wordcount | ||
@ r3 = flash_base | ||
@ r4 = temp | ||
|
||
start: | ||
ldr r3, flash_base | ||
next: | ||
cbz r2, done | ||
ldr r4, [r0] | ||
str r4, [r1] | ||
|
||
wait: | ||
ldrh r4, [r3, #0x0e] | ||
tst.w r4, #1 | ||
bne wait | ||
|
||
add r0, #4 | ||
add r1, #4 | ||
sub r2, #1 | ||
b next | ||
done: | ||
bkpt | ||
|
||
.align 2 | ||
|
||
flash_base: | ||
.word 0x40023c00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters