|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2011-5-20 21:25:18
|
显示全部楼层
;//========================栈空间定义===========================================
SECTION CSTACK:DATA:ROOT(2)
DATA
CSTACK_BASE
DS8 __ICFEDIT_size_cstack__
CSTACK_TOP
SECTION SVC_STACK:DATA:ROOT(2)
DATA
SVC_STACK_BASE
DS8 __ICFEDIT_size_svcstack__
SVC_STACK_TOP
SECTION IRQ_STACK:DATA:ROOT(2)
DATA
IRQ_STACK_BASE
DS8 __ICFEDIT_size_irqstack__
IRQ_STACK_TOP
SECTION FIQ_STACK:DATA:ROOT(2)
DATA
FIQ_STACK_BASE
DS8 __ICFEDIT_size_fiqstack__
FIQ_STACK_TOP
SECTION UND_STACK:DATA:ROOT(2)
DATA
UND_STACK_BASE
DS8 __ICFEDIT_size_undstack__
UND_STACK_TOP
SECTION ABT_STACK:DATA:ROOT(2)
DATA
ABT_STACK_BASE
DS8 __ICFEDIT_size_abtstack__
ABT_STACK_TOP
LDR R0,=UND_STACK_BASE
MSR CPSR_c, #Mode_UND|I_Bit|F_Bit
MOV SP, R0
LDR R0,=ABT_STACK_BASE
MSR CPSR_c, #Mode_ABT|I_Bit|F_Bit
MOV SP, R0
LDR R0,=FIQ_STACK_BASE
MSR CPSR_c, #Mode_FIQ|I_Bit|F_Bit
MOV SP, R0
LDR R0,=FIQ_STACK_BASE
MSR CPSR_c, #Mode_IRQ|I_Bit|F_Bit
MOV SP,R0
LDR R0,=SVC_STACK_BASE
MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit
MOV SP,R0
LDR R0,=SVC_STACK_BASE
MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit
MOV SP,R0
LDR R0,=CSTACK_TOP
MSR CPSR_c, #Mode_USR
MOV SP,R0
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ {section CSTACK};
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ {section SVC_STACK};
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ {section IRQ_STACK};
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ {section FIQ_STACK};
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ {section UND_STACK};
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ {section ABT_STACK}; |
|