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.

How to increase defaultStackSize in c6runlib?

Other Parts Discussed in Thread: SYSBIOS

I'm developing the application whose GUI is Qt and its algorithm is compiled by c6runlib.

My application is successfully lauched,

But, when my application calls the function compiled by c6runlib, the following error is occuring.

"ti.sysbios.knl.Task: line 330: E_stackOverflow: Task 0x98c023b8 stack overflow."

So, I want to increase defaultStackSize of c6runlib.

How to increase defaultStackSize of c6runlib?

 

 

  • You have two choices for static setting of the defaultTaskSize value of the ti.sysbios.knl.Task module In the C6run build directory, there is a file dsp_libs/os/sysbios6/C6Run.cfg which provides the base SysBios6 configuration for SysBios-based platforms.  In that file you can add the following somewhere after the "var Task" line:

    Task.defaultStackSize = <insert size in bytes here>;

    Alternatively, you should also be able to modify the platforms/<platform name>/sysbios6.xs file and insert both lines:

    var Task = xdc.useModule('ti.sysbios.knl.Task');
    Task.defaultStackSize = <insert size in bytes here>;

    After one of the above changes, you would need to reconfigure for your desired platform and rebuild the back-end libraries and then rebuild any applications built using the c6run tools

    The first option above would affect every SysBios platform, while the second would only affect the platform <platform name>. 

    However, I suggest you try and figure out why you are running out of stack space and possibly alter your code to avoid that.  The default stack size for a task is 2KB, and unless you are allocating lots of local variables, that typically is sufficient unless you have very deep nesting of function calls.

    Regards, Daniel