summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-25 02:47:15 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-25 02:47:15 +0100
commitf66483699517a8c8e1b12bf52518c84d77a252f9 (patch)
treeadf0da78d67ac1116cbe59f13baa46cd62cdc047 /arch/arm
parent5a597d99c4fa249ff2e097356ee709c3f9724640 (diff)
Adding copy of the mutable rom data into its position in ram, and fixing makefiles to have a proper dependency tree on the libraries.
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/lpc17xx/startup.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/startup.s b/arch/arm/lpc17xx/startup.s
index ff58b7b..47a2bdf 100644
--- a/arch/arm/lpc17xx/startup.s
+++ b/arch/arm/lpc17xx/startup.s
@@ -9,6 +9,9 @@
//*** <<< Use Configuration Wizard in Context Menu >>> ***
*/
+ .cpu cortex-m3
+ .syntax unified
+
/*
// <h> Stack Configuration
@@ -125,6 +128,16 @@ __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
LDR R0, =SystemInit
BLX R0
LDR R0,=_start