[En-Nut-Discussion] Thread Stack High-Tide Monitor
Harald Kipp
harald.kipp at egnite.de
Mon Oct 1 09:29:16 CEST 2007
The list doesn't pass attachments. The source archive is available at
http://www.ethernut.de/arc/?C=M;O=D
Filename: jb-thread-high-tide-mon.zip
Harald
Jared Broad schrieb:
> Following up on my earlier post regarding monitoring the thread stack I
> thought I would post our solution. The following code is a high-tide
> mark tester which fills the buffer with 0xFEEDABBA and then when the
> stack check routine is called it counts the instances of this code and
> displays a percentage used.
>
> Application.c
> => This routine needs to be included in your application
> => TRACE() is our RS232 comm's routine, you can delete/replace with your
> own.
> =>This function counts the number of FEEDABBA's
> => Our application will use this routine to return true if stack is OK.
>
> Nut\arch\avr\os\ context_gcc.c
> => Insert new file, rebuild NutOS.
> => Provides global for stack test to access number of threads
> => Generates initial 0xFEEDABBA buffer
>
> Courtesy of Dave Marshall & Jared Broad =)
>
>
More information about the En-Nut-Discussion
mailing list