ch debugger plugin - stack info

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

ch debugger plugin - stack info

Post 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
stack debug.jpg (15.19 KiB) Viewed 2712 times
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ch debugger plugin - stack info

Post 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
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: ch debugger plugin - stack info

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ch debugger plugin - stack info

Post 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
Post Reply