Keil Logo

Stack Management

RTX51 Tiny maintains a stack for each task using only the internal memory (IDATA) of the 8051. When a task is running, it is given the maximum amount of stack space possible. When a task switch occurs, the previous task stack is shrunk and relocated and the stack for the current task is expanded and relocated.

The following figure illustrates the layout of internal memory for an example application with three separate tasks.

The ?STACK symbol denotes the starting address of the stack. In this example, objects located below the stack include global variables, registers, and bit-addressable memory. The remaining memory is used for the task stacks. The top of memory may be specified in the configuration.

  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.