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.

Stack size configuration ineffective

Other Parts Discussed in Thread: SYSBIOS

I am trying to set the TSK stack size in cfg file but that seems to be ineffective. I get following warnings

 

warning: ti.bios.MEM: "/sim/scratch_a0850441/Centaurus/mfp_3_21_07_26_2011/bios_6_32_02_39/packages/ti/bios/MEM.xs", line 360: ti.bios.MEM : Cannot change xdc.cfg.Program.stack. Parameter changed elsewhere
warning: ti.bios.TSK: "/sim/scratch_a0850441/Centaurus/mfp_3_21_07_26_2011/bios_6_32_02_39/packages/ti/bios/TSK.xs", line 361: ti.bios.TSK : Cannot change ti.sysbios.knl.Task defaultStackSize. Parameter changed elsewhere
warning: ti.bios.TSK: "/sim/scratch_a0850441/Centaurus/mfp_3_21_07_26_2011/bios_6_32_02_39/packages/ti/bios/TSK.xs", line 361: ti.bios.TSK : Cannot change ti.sysbios.knl.Task idleTaskStackSize. Parameter changed elsewhere

What could be going wrong?

  • What these warnings are saying is that in your .cfg file it appears that you are changing certain config parameters in two different places.

    I believe the MEM.xs is in reference to MEM.stack.  Are you changing this in your .cfg file?  And then are you also changing Program.stack?

    The TSK.xs is in reference to TSK.defaultStackSize and TSK.idleTaskStackSize.  Are you trying to change these?  Are you also trying to change: Task.defaultStackSize and Task.idleTaskStackSize?

    You should only change these in one place...I would recommend using the newer modules like Task and Program.

    Judah

  • thanks. I am attaching my cfg file here. I ma not able to follow what you wrote as defining twice. Can you look at the file and let me know what am I missing?6237.devnodeServer.txt

  • Can you try removing this line:

        Task.defaultStackSize = 8192;

    and replace with:

        TSK.STACKSIZE = 8192;

    Reason is that you are using the legacy modules ('ti.bios.tconf') but changing in the new SYSBIOS modules.  This should get rid of the warning with the defaultStackSize.  Make sure you are also not setting Program.stack or Program.argSize or Task.idleTaskStackSize anywhere in files included in *.cfg.

    Judah

     

  • I added

    var TSK         = xdc.useModule('ti.sysbios.knl.Task');

    TSK.STACKSIZE = 8192;

    But I get the following error

    ./../../mkrel/arm/makeeco.mk:180: no file name for `-include'
    js: "./devnodeServer.cfg", line 147: XDC runtime error: ti.sysbios.knl.Task: no element named 'STACKSIZE'

  • You are using the wrong module.  Try this:

    var TSK = xdc.useModule('ti.bios.TSK');

    TSK.STACKSIZE = 8192;

    Judah

  • Thanks. This has got rid of the first error (MEM and prog stack related). How do I get rid of the other two?

  • sachinpdesai said:

    warning: ti.bios.MEM: "/sim/scratch_a0850441/Centaurus/mfp_3_21_07_26_2011/bios_6_32_02_39/packages/ti/bios/MEM.xs", line 360: ti.bios.MEM : Cannot change xdc.cfg.Program.stack. Parameter changed elsewhere
    warning: ti.bios.TSK: "/sim/scratch_a0850441/Centaurus/mfp_3_21_07_26_2011/bios_6_32_02_39/packages/ti/bios/TSK.xs", line 361: ti.bios.TSK : Cannot change ti.sysbios.knl.Task defaultStackSize. Parameter changed elsewhere
    warning: ti.bios.TSK: "/sim/scratch_a0850441/Centaurus/mfp_3_21_07_26_2011/bios_6_32_02_39/packages/ti/bios/TSK.xs", line 361: ti.bios.TSK : Cannot change ti.sysbios.knl.Task idleTaskStackSize. Parameter changed elsewhere

    Which of the three did it get rid of?

    If you are not setting the specified paramter explicitly in those warnings then I don't think you will be able to get rid of the remaining warnings.  The warnings is warning that the settings by the legacy config modules 'MEM' and 'TSK' will be overwritten by the underlying real SYSBIOS modules 'Program' and 'Task'.  I do agree that if the user doesn't  explicitly set these parameters, no warning should be issued.  I will file an enhancement on this.  Meanwhile, does your stack make sense now?  Does your program work?

    Judah

  • thanks. I have got rid of the first error. However my program still does not work. It crashes with following error observed in CCS

     

    t=0x0016b3ac] [tid=0x0] xdc.runtime.Main: Welcome to devnodeServer's main()
    [t=0x1c2a4f1f:1c2a4f1f] [tid=0x0] ti.sysbios.knl.Task: ERROR: line 330: E_stackOverflow: Task 0x8b108568 stack overflow.
    ti.sysbios.knl.Task: line 330: E_stackOverflow: Task 0x8b108568 stack overflow.
    xdc.runtime.Error.raise: terminating execution

  • The stack overflow error basically means the program is using memory passed the top of the stack.  How we determine this is, the stack is filled with a special value something like 0xBEBEBEBE.  Whenever the top of the stack has a value other than our special marker, we throw this error.

    Using ROV you should be able to determine which Stack overflowed.  Once you do that, you should determine how the stack overflowed.  Was it a bad write that landed at the very top of the stack or did the stack really overflow because of valid function calls.

    The address 0x8b108568  is the Task object.  You should be able to use ROV to see where the stack is for this Task instance.

    Judah

  • Thanks Judah,

    Can you point me to resources that will let me know how to use ROV? I have never used it before.

    Sachin