version 1.2, 2007/11/09 11:46:25 |
version 1.5, 2007/11/12 15:49:18 |
|
|
_vector_reset: |
_vector_reset: |
/* |
/* |
* Will enter here just right after RESET. |
* Will enter here just right after RESET. |
* Set up stack and call main. |
* Relocate .data & .bss into SRAM, set up stack and call main. |
*/ |
*/ |
|
|
|
/* load .data addr */ |
|
ldr r1, Asdata |
|
|
|
/* load end of FLASH */ |
|
ldr r2, Aedata |
|
|
|
/* load addr in sram */ |
|
ldr r3, Asram |
|
|
|
/* copy data in sram */ |
|
loop: |
|
ldr r4, [r1], #4 /* fetch from flash */ |
|
str r4, [r3], #4 /* store to sram */ |
|
cmp r1, r3 /* compare with end of flash */ |
|
bls loop |
|
|
/* |
/* |
* Setup an IRQ stack |
* Setup an IRQ stack |
*/ |
*/ |
|
|
_vector_fiq: |
_vector_fiq: |
nop |
nop |
|
|
|
Asdata: |
|
.word 0x0000f000 |
|
|
|
Aedata: |
|
.word 0x0000ffff |
|
|
|
Asram: |
|
.word 0x00200000 |
|
|
/* last word of the physical memory */ |
/* last word of the physical memory */ |
Asysstack: |
Asysstack: |
.word 0x00203fff |
.word 0x00203fff |
|
|
Airqstack: |
Airqstack: |
.word 0x00201000 |
.word 0x00203c00 |
|
|