This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Where does RL-RTX store function return addresses?

Hi Everyone.

I am a little confused about something.
Let's Suppose I'm running some concurrent tasks in RL-RTX. and let's say one of those tasks is calling a chain of functions ( a function that calls a function that calls another function).

I have 2 questions:
1. Where are the return addresses stored before jumping to the function instruction? Is it stored on the task's stack?

2. if it is stored on the task's stack, then is this (size of the return addresses) taken into account when the linker calculates "Maximum stack depth" and "Stack usage" stored in the html file in the output directory? or is that only the automatic variables?

Thank you very much in advance.

Parents
  • There are several different types of stacks.

    1. the default system mode stack (which is defined in the startup file)
    2. the default user mode stack (which is defined in the startup file)
    3. the default user/system mode stack for interrupt service routines
    4. The RTX kernel system needs one stack space for the task that is currently in the RUNNING state
    5. The RTX kernel system needs one stack space for the os_idle_demon
    6. The RTX kernel system needs several stack space for the tasks

    I guess that,
    the context save of a task / an interrupt service routine is not counted by Linker
    the hidden stack usage of RTX kernel system is not counted by Linker

Reply
  • There are several different types of stacks.

    1. the default system mode stack (which is defined in the startup file)
    2. the default user mode stack (which is defined in the startup file)
    3. the default user/system mode stack for interrupt service routines
    4. The RTX kernel system needs one stack space for the task that is currently in the RUNNING state
    5. The RTX kernel system needs one stack space for the os_idle_demon
    6. The RTX kernel system needs several stack space for the tasks

    I guess that,
    the context save of a task / an interrupt service routine is not counted by Linker
    the hidden stack usage of RTX kernel system is not counted by Linker

Children