diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-26 20:38:24 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-26 20:38:24 +0100 |
commit | 855847de577f0949a6e557aac23a12fd66b8afd3 (patch) | |
tree | 17b6f24be7326e56e990c81bd840057ec3f89ab6 /arch/arm | |
parent | 6e0848ca5aca48d83d31bbaa4728c63cad04d6cb (diff) |
Meh, it seems I suck at ARM assembly. Doing this by calling memcpy for now, we'll see later if I can write a proper full ASM version of it.
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/lpc17xx/startup.s | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/lpc17xx/startup.s b/arch/arm/lpc17xx/startup.s index ecab24e..6ad4127 100644 --- a/arch/arm/lpc17xx/startup.s +++ b/arch/arm/lpc17xx/startup.s @@ -128,16 +128,18 @@ __cs3_interrupt_vector_cortex_m: .type __cs3_reset_cortex_m, %function __cs3_reset_cortex_m: .fnstart + LDR R0, =__rom_data_begin LDR R1, =__rom_data_end LDR R2, =__ram_data_begin - B rom_to_ram_copy_check -rom_to_ram_copy_loop: - LDR R3, [R0], #4 - STR R3, [R2], #4 -rom_to_ram_copy_check: - CMP R1, R0 - BCC rom_to_ram_copy_loop + + MOV R3, R0 + SUBS R4, R1, R0 + MOV R1, R3 + MOV R0, R2 + MOV R2, R4 + BL memcpy + LDR R0, =SystemInit BLX R0 LDR R0,=_start |