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 find the stack usage of cc2650 at run time.

Other Parts Discussed in Thread: CC2650

Hi i am using cc2650 BLE. and IAR arm7.4 IDE. i want to check the run time Stack usage in iar. stack usage for idividual task(simpleBLEcentral,BLEIPC task,....).

Please letme know is there any option to find the stack usage other than patern writing or map file.

I tried the graphical representation( using stack window) but that also not giving the exact stack usage. that is showing red before starting the program.

  • Hi Suhair,
    Can you send a screenshot of your Task view in the ROV window? What do you mean by not the exact stack usage? Also it'll help to know what product and versions you're using.

    Thanks,
    Moses
  • I am using iar embedded work bench for arm 7.40.1.8472. i couldnt able to update the screen shot here.

     is there any option to find the stack usage of individual task stack( like simpleBLEcentral...).

     

    while creating each task we are assigning the stack. how to verify that how mach stack is used by individual task in run time? see the below code

     

    void SimpleBLECentral_createTask(void)
    {
      Task_Params taskParams;
       
      // Configure task
      Task_Params_init(&taskParams);
      taskParams.stack = sbcTaskStack;
      taskParams.stackSize = SBC_TASK_STACK_SIZE;
      taskParams.priority = SBC_TASK_PRIORITY;
     
      Task_construct(&sbcTask, SimpleBLECentral_taskFxn, &taskParams, NULL);
    }

     

     

  • Hi Suhair,
    ROV (which is part of TI-RTOS) enables you to view Task data such as the stack usage. Here is a wiki that talks more about the TI-RTOS integration with IAR and how to use ROV.

    Quick hint: On the menu bar, click on TI-RTOS and select Task to bring up a detailed view of the Tasks with information like the stack usage.

    Regards,
    Moses