Keil Logo

System Stack Size

To determine the required size of the system stack, you may:

  1. Halt program execution at the main entry point and fill the memory area allocated to the system stack with a constant value (such as 0xA5).
  2. Execute all functions and interrupts in your application. Try to be as complete as possible. You may use the code coverage analysis in the µVision Debugger to make sure you have executed all functions.
  3. Calculate the number of bytes that were changed (from your constant value). This indicates the number of bytes of the stack that were used.

Note

  • The C16x architecture provides system stack overflow and underflow traps. You may add the TRAPS.C file (located in the \KEIL\C166\LIB\ folder) to your project to detect these interrupts.
  • The system stack must be large enough to execute the most complex interrupts in your system and have at least 40 bytes (20 words) of space remaining.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.