Discussion forum for the BasicX family of microcontroller chips.
|
How do I measure the usage of the stack allocated for a task (in a multitasking situation)? What commands should I use? Maybe you already discussed the matter , please point me to the appropriate msg. Is it also possible to measure the stack of the "primary task"? I mean the one belonging to the Sub Main() routine TIA Stefano |
|
|
|
for each task stack the only way I know of is to look in the mpp file for the start address of the stack. have another task spit that data out to a comport. the highest level that has changed is as high as the stack is going. for the main stack there is a stack pointer. Byte SPL Stack Pointer Low Byte SPH Stack Pointer High have a sub keep track of the high and the low values of the pointer. that will tell you what is required for your main stack. --- wrote: > How do I measure the usage of the stack allocated for a task (in a > multitasking situation)? > What commands should I use? > Maybe you already discussed the matter , please point me to the > appropriate msg. > Is it also possible to measure the stack of the "primary task"? I > mean the one belonging to the Sub Main() routine > > TIA > Stefano > ------------------------ Yahoo! Groups Sponsor > ---------------------~-~> > Become a member FREE at http://www.searchdatabase.com?Offer=yahoo5 > today. > Save time finding the best Database Development and > Management information available on the Internet. > Our targeted search engine and dedicated editorial staff "cut out the > clutter" by aggregating the best links and the most relevant database > news for you > every day. > http://us.click.yahoo.com/_w3RtC/rGiCAA/bT0EAA/CYAVlB/TM > ---------------------------------------------------------------------_- > > ===== Tony Brenke North Tacoma, WA __________________________________________________ |