lab2: optimize image copying to RAM

This commit is contained in:
ІО-23 Шмуляр Олег 2025-02-10 13:09:17 +02:00
parent 9f8f207e4b
commit 1a6d8232a4
1 changed files with 4 additions and 2 deletions

View File

@ -9,8 +9,10 @@
vtable: vtable:
.word __stack_start .word __stack_start
.word __hard_reset__+1 .word __hard_reset__+1
.align 2
v2_img_start: v2_img_start:
.incbin "lab1_v2.bin" .incbin "lab1_v2.bin"
.align 2
v2_img_end: @ ==__hard_reset__ v2_img_end: @ ==__hard_reset__
__hard_reset__: __hard_reset__:
@ -46,8 +48,8 @@ bootload_v2:
ldr.n r3, =__ram_start ldr.n r3, =__ram_start
copy_loop: copy_loop:
ldrh r2, [r0], #2 ldr r2, [r0], #4
strh r2, [r3], #2 str r2, [r3], #4
cmp.n r0, r1 cmp.n r0, r1
bne.n copy_loop bne.n copy_loop