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

RTX166, Prevent /Analyze possible stack overflow

Hello,
I use RTX166 on my system (20 tasks).
How can i check Task Stack busy level to prevent a possible stack overflow?

Operating system manual say:
"Register R0 is stack pointer"
I will check Run-time R0 value to find max value.
but I think is much better to use a Source Code Analyzer
like:
http://www.absint.com/stackanalyzer
but it doesn't work with Keil.
Can you suggest me a stack analyzer for my system?

Best Regards

Parents
  • It is a good idea.

    Reading from manual, standard task use a common working stack area;

    So when there is a context change the runnig task save stack somewhere (I don't understand where) and a waked-up task use working stack area.

    So I can check saved stack and/or running stack.

    I think is better to test saved stacks becouse the runnig stack have this problem:

    In case a task 1 use stack at 90%
    and task 2 take control and use stack at 20%
    the copy of task 2 stack on working area
    clean the action of task 1.

    Somebody know where are mapped stacks saved?

    FM
    Regards

Reply
  • It is a good idea.

    Reading from manual, standard task use a common working stack area;

    So when there is a context change the runnig task save stack somewhere (I don't understand where) and a waked-up task use working stack area.

    So I can check saved stack and/or running stack.

    I think is better to test saved stacks becouse the runnig stack have this problem:

    In case a task 1 use stack at 90%
    and task 2 take control and use stack at 20%
    the copy of task 2 stack on working area
    clean the action of task 1.

    Somebody know where are mapped stacks saved?

    FM
    Regards

Children