FAQ: Questions related to stack size in UCOS

Document created by Kader.M Employee on Nov 21, 2017
Version 1Show Document
  • View in full screen mode

    How to compute the required stack size to run a task smoothly.?

A certain amount of stack space is required over and above that required by the task itself. You can get an idea of how much stack space you are using at any moment by looking at the RTOS Status window (Window -> Show View -> Other -> Debug -> RTOS Status). The current stack pointer and the stack top and bottom can be seen for each current task. You will probably need to allocate at least 400 bytes more than what you think your task uses during its processing.


    Is enabling the cache will affect the size of the stack size we are using for creating a task.?

    No. Enabling cache doesn't change the stack size requirements.


    How to debug the uC/OS source code in CCES?

As uCOS code is included as source code in your project, you can set breakpoints and single-step as usual. More useful advice, if you are not already using it, is to view the RTOS Status window as described above.