hi all:
I met a problem of interrupt when I was transplanting ecos to mips r3k board.. Stack base corrupt - i: 0 80104868: 00 00 00 00 64 39 C0 BF FD FF FF FF FF FF 7F FF |....d9..........| 80104878: 1C 00 00 00 00 00 00 00 0A 00 00 00 1C 00 00 00 |................| ASSERT FAIL: <3>thread.inl[119]void Cyg_HardwareThread::check_stack() Stack base
corrupt
ASSERT FAIL: <3>[119]void Cyg_HardwareThread::check_stack() Stack base corrupt

sometimes the problem can be:

ASSERT FAIL: <46F8>sched.cxx[176]static void Cyg_Scheduler::unlock_inner() Bad current thread ASSERT FAIL: <46F8>[176]static void Cyg_Scheduler::unlock_inner() Bad current thread

I modified the source code like this..(in vector.S)
    hal_interrupt_stack_call_pending_DSRs
   ...............
    FUNC_START(hal_interrupt_stack_call_pending_DSRs)
       mfc0    t0,status                       # get status register value
       la      v0,__interrupt_stack            # v0 = interrupt stack
      add v0,v0,1024          //added by me...
      ...............
   FROM:
# lva k0,mipsreg_pc(sp) # K0 = return PC # lsp sp,sp # load SP TO:
   lw      sp,0(sp)               # load SP
   nop
   lw      k0,0x7c(sp)             # K0 = return PC

the reason I modified as above is that case can make sure the stack is correct..but after the program is runing...the stack is corrupted..:(

any ideas? thanks in advance

jet

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to