projects
/
my-code
/
arm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74be977
)
only copy the data section if code resides in flash
author
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Mon, 17 Sep 2007 14:05:58 +0000
(16:05 +0200)
committer
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Mon, 17 Sep 2007 14:05:58 +0000
(16:05 +0200)
betty/startup.s
patch
|
blob
|
history
diff --git
a/betty/startup.s
b/betty/startup.s
index
d6b0184
..
dc43ab6
100644
(file)
--- a/
betty/startup.s
+++ b/
betty/startup.s
@@
-102,12
+102,15
@@
handle_reset:
ldr r0, =stack_limit
mov sl, r0
- # copy data section
+ # copy data section
(only if we are in flash <=> _etext = _data)
ldr r1, =_etext
ldr r2, =_data
ldr r3, =_edata
+ cmp r1, r2
+ beq start_of_c_code
+
copy_data_loop:
cmp r2, r3
@@
-117,6
+120,8
@@
copy_data_loop:
# jump to c code
+start_of_c_code:
+
adr lr, loop_forever
mov r0, #0
mov r1, #0