mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-15 10:47:52 -06:00
lib: Add bossac 1.9 code to lib directory
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
79632878ac
commit
2b9124f3c0
36 changed files with 6287 additions and 0 deletions
47
lib/bossac/src/WordCopyArm.asm
Normal file
47
lib/bossac/src/WordCopyArm.asm
Normal file
|
@ -0,0 +1,47 @@
|
|||
.global start
|
||||
.global stack
|
||||
.global reset
|
||||
.global dst_addr
|
||||
.global src_addr
|
||||
.global words
|
||||
|
||||
.text
|
||||
.thumb
|
||||
.align 0
|
||||
|
||||
start:
|
||||
ldr r0, dst_addr
|
||||
ldr r1, src_addr
|
||||
ldr r2, words
|
||||
b check
|
||||
|
||||
copy:
|
||||
ldmia r1!, {r3}
|
||||
stmia r0!, {r3}
|
||||
sub r2, #1
|
||||
|
||||
check:
|
||||
cmp r2, #0
|
||||
bne copy
|
||||
|
||||
@ Fix for SAM-BA stack bug
|
||||
ldr r0, reset
|
||||
cmp r0, #0
|
||||
bne return
|
||||
ldr r0, stack
|
||||
mov sp, r0
|
||||
|
||||
return:
|
||||
bx lr
|
||||
|
||||
.align 0
|
||||
stack:
|
||||
.word 0
|
||||
reset:
|
||||
.word 0
|
||||
dst_addr:
|
||||
.word 0
|
||||
src_addr:
|
||||
.word 0
|
||||
words:
|
||||
.word 0
|
Loading…
Add table
Add a link
Reference in a new issue