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.

RTOS/TM4C123GH6PM: execution graph and some use case question

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi Champs,

My customer has question about "exclusive size" and " inclusive sizes". Could you please tell me what do "exclusive sizes" and "inclusive sizes" mean?

Also they found the stack peak size is too big. Is there any way to reduce it ? please see below picture for stack peak size. It is RTOS ObjecView stackPeak:task0Fun 268.

when I try to enable execution graph, it showed that missed UIA. Could you please tell me where I can set UIA ? I use pwmled_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT project.

Could you please tell me is there any document/link to teach how to use stack usage and ROV?

Thanks for your reply in advance

  • Hi Lisa,

    Lisa Ding said:
    Could you please tell me what do "exclusive sizes" and "inclusive sizes" mean?

    Could you give some context for this?

    Lisa Ding said:
    Is there any way to reduce it ?

    Yes. When the task is created, the size of the stack is specified in the Task_Params structure that is passed into the Task_create (or Task_construct) API. If you don't set the value in the initialized parameter structure, the default value is used. The default value is controlled by the Task.defaultStackSize value in the .cfg. If it is not set, it has some default value that is dependent on the device (which is 512 for most devices). Here is an example of setting the stack size during runtime

    Task_Params taskParams;

    Task_Params_init(&taskParams);
    taskParams.stackSize = THREADSTACKSIZE;
    taskParams.priority = 1;
    consoleHandle = Task_create((Task_FuncPtr)consoleThread, &taskParams, &eb);

    Lisa Ding said:
    Could you please tell me where I can set UIA ?

    In TI-RTOS there are some UIA examples. The easiest way to enable it is to add the following into the .cfg file. This will enable basic logging that System Analyzer can look at when the target is stopped.

    BIOS.logsEnabled = true;

    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');

    The LoggingSetup module has more configuration options, but the default settings will get you up and running. You can refer to the API reference doc (cdoc) for more details.

    Here's a training video that goes over some debugging features with TI-RTOS: 

    Todd

  • Hi Todd,

    thanks for your reply. My customer would like to know how to reduce stackPeak size.  I think this size is related with function call. If customer reduce local variable then it should be able to reduce stackPeak size. Am i right? 

    Also customer would like to know execution graph. Because there are 3 tasks in his project, however, execution graph only show 2 tasks. It missed one task. Could you please tell me does each task should appear on execution graph? Or execution graph only show what you running now? In below picture, it missed AnalogInputHandle in execution graph. thanks! 

  • Lisa Ding said:
    My customer would like to know how to reduce stackPeak size.  I think this size is related with function call. If customer reduce local variable then it should be able to reduce stackPeak size.

    Yes, potentially local variables are placed on the stack so putting large buffers is generally frowned upon. Your customer can watch this video which talks about stacks. Depending on which compiler they are using, there are some nice tools to help identify large stack usage: 

    The Execution Graph is based off the Log records on the target. So if there is no activity by a task in the Log records, the Execution graph does not know about it. A common problem is that the log buffer is too small. By default it wraps once it is full. Making it larger allows more records. If they are using LoggingSetup in the .cfg, they can simply increase the size of the buffers.

    Todd

  • Hi Todd,

    thanks for your reply. I will pass it to customer.