mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
lib/cmsis/stm32: Load ram function section.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
6ac86edc64
commit
89f8bf5366
@ -70,6 +70,23 @@ Reset_Handler:
|
||||
/* Call the clock system initialization function.*/
|
||||
bl SystemInit
|
||||
|
||||
/* Copy RAM functions from flash to ITCM */
|
||||
ldr r0, =_ram_function_start // Destination start (RAM)
|
||||
ldr r1, =_ram_function_end // Destination end (RAM)
|
||||
ldr r2, =_ram_function_flash // Source start (Flash)
|
||||
movs r3, #0
|
||||
b LoopCopyRamFunc
|
||||
|
||||
CopyRamFunc:
|
||||
ldr r4, [r2, r3]
|
||||
str r4, [r0, r3]
|
||||
adds r3, r3, #4
|
||||
|
||||
LoopCopyRamFunc:
|
||||
adds r4, r0, r3
|
||||
cmp r4, r1
|
||||
bcc CopyRamFunc
|
||||
|
||||
/* Copy the data segment initializers from flash to SRAM */
|
||||
ldr r0, =_sdata
|
||||
ldr r1, =_edata
|
||||
|
||||
Loading…
Reference in New Issue
Block a user