改S文件
This commit is contained in:
parent
c7b78edbf8
commit
e4ac1a31ca
@ -62,40 +62,67 @@ Reset_Handler:
|
|||||||
ldr sp, =_estack /* set stack pointer */
|
ldr sp, =_estack /* set stack pointer */
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
/* Copy the data segment initializers from flash to SRAM */
|
||||||
ldr r0, =_sdata
|
movs r1, #0
|
||||||
ldr r1, =_edata
|
b LoopCopyDataInit
|
||||||
ldr r2, =_sidata
|
|
||||||
movs r3, #0
|
|
||||||
b LoopCopyDataInit
|
|
||||||
|
|
||||||
CopyDataInit:
|
CopyDataInit:
|
||||||
|
ldr r3, =_sidata
|
||||||
|
ldr r3, [r3, r1]
|
||||||
|
str r3, [r0, r1]
|
||||||
|
adds r1, r1, #4
|
||||||
|
|
||||||
|
LoopCopyDataInit:
|
||||||
|
ldr r0, =_sdata
|
||||||
|
ldr r3, =_edata
|
||||||
|
adds r2, r0, r1
|
||||||
|
cmp r2, r3
|
||||||
|
bcc CopyDataInit
|
||||||
|
|
||||||
|
/* Copy from flash to CCMRAM */
|
||||||
|
ldr r0, =_sccmdata
|
||||||
|
ldr r1, =_eccmdata
|
||||||
|
ldr r2, =_siccmdata
|
||||||
|
movs r3, #0
|
||||||
|
b LoopCopyCcmInit
|
||||||
|
CopyCcmInit:
|
||||||
ldr r4, [r2, r3]
|
ldr r4, [r2, r3]
|
||||||
str r4, [r0, r3]
|
str r4, [r0, r3]
|
||||||
adds r3, r3, #4
|
adds r3, r3, #4
|
||||||
|
LoopCopyCcmInit:
|
||||||
LoopCopyDataInit:
|
|
||||||
adds r4, r0, r3
|
adds r4, r0, r3
|
||||||
cmp r4, r1
|
cmp r4, r1
|
||||||
bcc CopyDataInit
|
bcc CopyCcmInit
|
||||||
|
/* End of copy to CCMRAM */
|
||||||
|
|
||||||
|
ldr r2, =_sccm_bss
|
||||||
|
b LoopFillZeroCcm
|
||||||
|
/* Zero fill the ccm bss segment. */
|
||||||
|
FillZeroCcm:
|
||||||
|
movs r3, #0
|
||||||
|
str r3, [r2], #4
|
||||||
|
|
||||||
|
LoopFillZeroCcm:
|
||||||
|
ldr r3, = _eccm_bss
|
||||||
|
cmp r2, r3
|
||||||
|
bcc FillZeroCcm
|
||||||
|
/* End of zero fill to CCMRAM */
|
||||||
|
|
||||||
|
ldr r2, =_sbss
|
||||||
|
b LoopFillZerobss
|
||||||
/* Zero fill the bss segment. */
|
/* Zero fill the bss segment. */
|
||||||
ldr r2, =_sbss
|
|
||||||
ldr r4, =_ebss
|
|
||||||
movs r3, #0
|
|
||||||
b LoopFillZerobss
|
|
||||||
|
|
||||||
FillZerobss:
|
FillZerobss:
|
||||||
str r3, [r2]
|
movs r3, #0
|
||||||
adds r2, r2, #4
|
str r3, [r2], #4
|
||||||
|
|
||||||
LoopFillZerobss:
|
LoopFillZerobss:
|
||||||
cmp r2, r4
|
ldr r3, = _ebss
|
||||||
bcc FillZerobss
|
cmp r2, r3
|
||||||
|
bcc FillZerobss
|
||||||
|
|
||||||
/* Call the clock system intitialization function.*/
|
/* Call the clock system intitialization function.*/
|
||||||
bl SystemInit
|
bl SystemInit
|
||||||
/* Call static constructors */
|
/* Call static constructors */
|
||||||
bl __libc_init_array
|
/* bl __libc_init_array */
|
||||||
/* Call the application's entry point.*/
|
/* Call the application's entry point.*/
|
||||||
bl entry
|
bl entry
|
||||||
bx lr
|
bx lr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user