version 1.5, 2007/11/12 15:49:18 |
version 1.7, 2007/11/12 23:40:42 |
|
|
*/ |
*/ |
|
|
/* load .data addr */ |
/* load .data addr */ |
ldr r1, Asdata |
ldr r1, Aflash_sdata |
|
|
/* load end of FLASH */ |
/* load end of FLASH */ |
ldr r2, Aedata |
ldr r2, Aflash_edata |
|
|
/* load addr in sram */ |
/* will copy data in sram starting from that addr */ |
ldr r3, Asram |
ldr r3, Asram_sdata |
|
|
/* copy data in sram */ |
/* |
|
* Copy data in sram |
|
*/ |
loop: |
loop: |
ldr r4, [r1], #4 /* fetch from flash */ |
ldr r4, [r1], #4 /* fetch from flash, increment flash_sdata */ |
str r4, [r3], #4 /* store to sram */ |
str r4, [r3], #4 /* store to sram, increment sram_sdata */ |
cmp r1, r3 /* compare with end of flash */ |
cmp r1, r2 /* compare with flash_edata */ |
bls loop |
blo loop |
|
|
/* |
/* |
* Setup an IRQ stack |
* Setup an IRQ stack |
|
|
/* set system stack pointer */ |
/* set system stack pointer */ |
ldr sp, Asysstack |
ldr sp, Asysstack |
|
|
b main |
bl main |
/* NOTREACHED */ |
/* NOTREACHED */ |
|
|
_vector_undef: |
_vector_undef: |
|
|
_vector_fiq: |
_vector_fiq: |
nop |
nop |
|
|
Asdata: |
Aflash_sdata: |
.word 0x0000f000 |
.word 0x0000f000 |
|
|
Aedata: |
Aflash_edata: |
.word 0x0000ffff |
.word 0x0000ffff |
|
|
Asram: |
Asram_sdata: |
.word 0x00200000 |
.word 0x00200000 |
|
|
/* last word of the physical memory */ |
/* last word of the physical memory */ |
Asysstack: |
Asysstack: |
.word 0x00203fff |
.word 0x00203ffc |
|
|
Airqstack: |
Airqstack: |
.word 0x00203c00 |
.word 0x00203c00 |