为什么这样程序能运行(lpc2292):
;/* 分配堆栈空间 */ AREA MyStacks, DATA, NOINIT, ALIGN=2 SpaceForWriteflash SPACE 0x400 SpaceForStackUsr SPACE USR_STACK_LEGTH * 4 StackUsr SPACE USR_STACK_LEGTH * 4 ;UsrStackSpace StackUsr//0x100 StackUnd SPACE UND_STACK_LEGTH * 4 StackAbt SPACE ABT_STACK_LEGTH * 4 ;Stack spaces for Suspend Mode 中止义模式堆栈空间 StackFiq SPACE FIQ_STACK_LEGTH * 4 ;Stack spaces for Fast Interrupt reQuest Mode 快速中断模式堆栈空间 StackIrq SPACE IRQ_STACK_LEGTH * 4 ;Stack spaces for Interrupt ReQuest Mode 中断模式堆栈空间 StackSvc SPACE SVC_STACK_LEGTH * 4
但如下却不正常:
StackUsr DCD UsrStackSpace StackUnd DCD UndtStackSpace StackAbt DCD AbtStackSpace StackFiq DCD FiqStackSpace StackIrq DCD IrqStackSpace StackSvc DCD SvcStackSpace ;/* 分配堆栈空间 */ AREA MyStacks, DATA, NOINIT, ALIGN=2 SpaceForWriteflash SPACE 0x400 SpaceForStackUsr SPACE USR_STACK_LEGTH * 4 UsrStackSpace SPACE USR_STACK_LEGTH * 4 ;UsrStackSpace StackUsr//0x100 UndtStackSpace SPACE UND_STACK_LEGTH * 4 AbtStackSpace SPACE ABT_STACK_LEGTH * 4 ;Stack spaces for Suspend Mode 中止义模式堆栈空间 FiqStackSpace SPACE FIQ_STACK_LEGTH * 4 ;Stack spaces for Fast Interrupt reQuest Mode 快速中断模式堆栈空间 IrqStackSpace SPACE IRQ_STACK_LEGTH * 4 ;Stack spaces for Interrupt ReQuest Mode 中断模式堆栈空间 SvcStackSpace SPACE SVC_STACK_LEGTH * 4
调试一直在如下转圈: _zero_loop [0xe2555004] subs r5,r5,#4 000001c0 [0x24847004] strcs r7,[r4],#4 000001c4 [0x8afffffc] bhi _zero_loop
|