本帖最后由 alphal 于 2011-7-14 23:02 编辑
我用IAR6.0建了个简单LPC2378+UCOSII的工程,debug的时候总是在执行BSP_Init中Tmr_TickInit函数时进入__prefetch_handler死掉了。并debug时堆栈有报错。我的cstartup.s从IAR自带的Example中copy过来的(非含UCOSII的工程中)。Linker中Memory及stack堆栈设置如图。
也不明白如图中的memory及stack设置,“'SVC_STACK' (currently 0x40002E68) is outside the stack range (0x400043F8 to 0x400045F8) ”中的地址怎么能算出来?
debug时报错如下:
Thu Jul 14, 2011 21:24:30: The stack pointer for stack 'SVC_STACK' (currently 0x40002E68) is outside the stack range (0x400043F8 to 0x400045F8)
Thu Jul 14, 2011 21:30:04: The stack pointer for stack 'SVC_STACK' (currently 0x40002E50) is outside the stack range (0x400043F8 to 0x400045F8)
Thu Jul 14, 2011 21:30:04: The stack pointer for stack 'IRQ_STACK' (currently 0x40004708) is outside the stack range (0x400045F8 to 0x400046F8)
Thu Jul 14, 2011 21:30:15: The stack pointer for stack 'SVC_STACK' (currently 0x40002E50) is outside the stack range (0x400043F8 to 0x400045F8) |