Page 1 of 1
ch debugger plugin - stack info
Posted: Sun Jun 24, 2012 9:29 am
by pito
Hi, is there a short explanation how is the relationship between these stack parameters in the chibios/rt plugin's "Threads" window, pls ?

- stack debug.jpg (15.19 KiB) Viewed 2716 times
Re: ch debugger plugin - stack info
Posted: Sun Jun 24, 2012 10:38 am
by Giovanni
Address is the base address of the Working Area where the Thread structure is located.
Stack is the current position of the stack pointer.
StkLimit is the stack limit.
StkUnused is an estimation of the unused stack area.
Giovanni
Re: ch debugger plugin - stack info
Posted: Sun Jun 24, 2012 12:23 pm
by pito
So roughly
StkUnused ~ Stack - StkLimit
With main it gives a bigger StkUnused, though. Therefore I asked..
Thanks, p.
PS: the time values are in ms I guess.
Re: ch debugger plugin - stack info
Posted: Sun Jun 24, 2012 1:21 pm
by Giovanni
No, it is not so simple.
The unused stack is the area starting from StkLimit whose filler value has not been altered, regardless of the current stack position.
Giovanni