pounder_test/src/startup.S

29 lines
581 B
ArmAsm

.cfi_sections .debug_frame
# .thumb
.section .text.pre_init, "ax"
.globl __pre_init
.type __pre_init,%function
.thumb_func
.cfi_startproc
__pre_init:
# Analogous to cortex-m-rt Reset code for .data copying.
# Initialise .itcm code. `__sitcm`, `__siitcm`, and `__eitcm` come from the
# linker script. Copy from r2 into r0 until r0 reaches r1.
ldr r0,=__sitcm
ldr r1,=__eitcm
ldr r2,=__siitcm
1:
cmp r1, r0
beq 2f
# load 1 word from r2 to r3, inc r2
ldm r2!, {r3}
# store 1 word from r3 to r0, inc r0
stm r0!, {r3}
b 1b
2:
dsb
isb
bx lr
.cfi_endproc