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.

OMAP4 M3 stack overflow

Other Parts Discussed in Thread: SYSBIOS

Hello,

I'm running syslink-2.00.09.29 in OMAP4430 dual Cortex-M3 (Ducati) and I'm getting the following error:

[0][ 21.57773] [t=0x00000002:36185e46] ti.sysbios.knl.Task: ERROR: line 490: E_stackOverflow: Task 0x80040060 stack overflow.
[0][ 21.57890] ti.sysbios.knl.Task: line 490: E_stackOverflow: Task 0x80040060 stack overflow.
[0][ 21.57896] xdc.runtime.Error.raise: terminating execution

Sometimes, the M3 crashes and it reboots. Sometimes, I'm getting the message above.

I have tried to add Program.stack = 0x1200; in the ipu.cfg file but it doesn't seem to change anything. How can I avoid this stack overflow? Can I read the current stack size? What is the maximum stack size possible? My application is not very simple but there is nothing really special - just a bunch of global variables and a lot of code.

Many thanks in advance.

  • Program.stack controls how big the Hwi stack is. This is the stack used by ISR threads.

    The error you're getting is due to a Task stack overflowing.

    The default Task stack size for the M3 is 2048 bytes.

    To increase the default Task stack size, add the following to your config script:

        Task.defaultStackSize = 4096; /* increasing from default of 2048 bytes */

    Once you've found a stack size that resolves the error, you can use CCS and ROV to view the Task Detailed View to determine how much stack has been used by each task. Then you can adjust your stack sizes accordingly.

    Alan

  • It seems to work! Very frustrating story as I wasted a lot of time - initially, the corruption was so big that M3 was resetting without any message.

    Thank you very much.

    Optional bonus question: I'm on OMAP4430 + M3. Is there something similar to CCS / ROV. I compile everything in command line and I load the M3 through Cortex-A9 remoteproc. I'm wondering if there is a good way to debug OMAP44x0 M3...