Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | Measuring Stack usage

Discussion forum for the BasicX family of microcontroller chips.

Measuring Stack usage - Author Unknown - May 14 2:53:00 2001

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





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Measuring Stack usage - Tony Brenke - May 14 3:03:00 2001

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

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )