This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

430移植ucosii求助



编译没问题,就是debug时出现Wed Nov 06, 2013 22:15:13: The stack pointer for stack 'Stack' (currently Memory:0x23E) is outside the stack range (Memory:0x80C to Memory:0xA00)
我按照网上的说法在选项里加大了堆栈空间,还是不行啊。

  • 你好!

    你用的哪个型号的430?stack设置为多少?

  • Hardy Hu 说:

    你好!

    你用的哪个型号的430?stack设置为多少?

    149。ucos也是下载的149移植的版本。然后设置我是按照网上的说法,先看map文件最大堆栈是124字节,然后设置的是200。

  • Hardy Hu 说:

    你好!

    你用的哪个型号的430?stack设置为多少?

    我一步一步看最后发现是在运行 OSStartHighRdy这个函数末尾的出栈后,出现的错误。

                        OSStartHighRdy
                call     #OSTaskSwHook

                mov.b    #1, &OSRunning         ; kernel running

                mov.w    SP, &OSISRStkPtr       ; save interrupt stack              

                mov.w    &OSTCBHighRdy, R13     ; load highest ready task stack
                mov.w    @R13, SP

                POPALL                          ; pop all registers
                 
                reti                            ; emulate return from interrupt

  • 149的uCOSII网上很多移植成功的例子。可以下载看看。