X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6658905f18a1eebc148836f26c731dea9c1377dc..fa03a110e92f32a0bbe247c511b332fb5cc99d4e:/bootrom/flash-reset.s?ds=sidebyside

diff --git a/bootrom/flash-reset.s b/bootrom/flash-reset.s
index afb658a4..64134033 100644
--- a/bootrom/flash-reset.s
+++ b/bootrom/flash-reset.s
@@ -1,11 +1,11 @@
 .extern CopyBootToRAM
     
-.text
-.code 32
-.align 0
+.section .startup,"ax"
+         .code 32
+         .align 0
 
-.global start
-start:
+.global flashstart
+flashstart:
     b       Reset
     b       UndefinedInstruction
     b       SoftwareInterrupt
@@ -16,12 +16,17 @@ start:
     b       Fiq
 
 Reset:
-    ldr     sp,     = 0x0020FFF8	@ initialize stack pointer to top of RAM
+    ldr     sp,     .stack_end	@ initialize stack pointer to top of RAM
     bl      CopyBootToRAM			@ copy bootloader to RAM (in case the
     								@ user re-flashes the bootloader)
-    ldr     r3,     = 0x00200000	@ start address of RAM bootloader
+    ldr     r3,     .bootphase2_start	@ start address of RAM bootloader
     bx      r3						@ jump to it
 
+	.stack_end:
+	.word _stack_end
+	.bootphase2_start:
+	.word __bootphase2_start__
+
 Fiq:
     b       Fiq
 UndefinedInstruction: