2009-04-09 14:43:20 +08:00
|
|
|
.extern CopyBootToRAM
|
|
|
|
|
2009-08-27 12:25:34 +08:00
|
|
|
.section .startup,"ax"
|
|
|
|
.code 32
|
|
|
|
.align 0
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-27 12:25:34 +08:00
|
|
|
.global flashstart
|
|
|
|
flashstart:
|
2009-04-09 14:43:20 +08:00
|
|
|
b Reset
|
|
|
|
b UndefinedInstruction
|
|
|
|
b SoftwareInterrupt
|
|
|
|
b PrefetchAbort
|
|
|
|
b DataAbort
|
|
|
|
b Reserved
|
|
|
|
b Irq
|
|
|
|
b Fiq
|
|
|
|
|
|
|
|
Reset:
|
2009-08-31 22:52:59 +08:00
|
|
|
ldr sp, .stack_end @ initialize stack pointer to top of RAM
|
2009-04-09 14:43:20 +08:00
|
|
|
bl CopyBootToRAM @ copy bootloader to RAM (in case the
|
|
|
|
@ user re-flashes the bootloader)
|
2009-08-31 22:52:59 +08:00
|
|
|
ldr r3, .bootphase2_start @ start address of RAM bootloader
|
2009-04-09 14:43:20 +08:00
|
|
|
bx r3 @ jump to it
|
|
|
|
|
2009-08-31 22:52:59 +08:00
|
|
|
.stack_end:
|
|
|
|
.word _stack_end
|
|
|
|
.bootphase2_start:
|
|
|
|
.word __bootphase2_start__
|
|
|
|
|
2009-04-09 14:43:20 +08:00
|
|
|
Fiq:
|
|
|
|
b Fiq
|
|
|
|
UndefinedInstruction:
|
|
|
|
b UndefinedInstruction
|
|
|
|
SoftwareInterrupt:
|
|
|
|
b SoftwareInterrupt
|
|
|
|
PrefetchAbort:
|
|
|
|
b PrefetchAbort
|
|
|
|
DataAbort:
|
|
|
|
b DataAbort
|
|
|
|
Reserved:
|
|
|
|
b Reserved
|
|
|
|
Irq:
|
|
|
|
b Irq
|