This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: New ethernet driver for the Samsung S3C4510
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: amit dot goel at st dot com
- Cc: ecos-devel at sources dot redhat dot com
- Date: Wed, 02 Jul 2003 05:20:24 +0100
- Subject: Re: New ethernet driver for the Samsung S3C4510
- References: <H000011505bae371.1053925962.dlx99.dlh.st.com@MHS>
amit.goel@st.com wrote:
Hi,
Is there a way by which I can calculate the worst case stack size
being utilized in my embedded application.
I am using arm-elf-gcc for compilation.
Is there any tool which can help in doing that.
Did you get a reply to this? If not, the answer is that you can try
enabling the CDL option CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT and
reading the option's description there. Then try and provoke your thread
to produce its worst case.
But you have to understand where this worst case happens which can be
difficult (it depending on things like the size of automatic stack
variables), and then also determine what effect interrupts will have on
your system. Although by default if you are using a separate interrupt
stack (which is the default) you only have to worry about adding the space
of one interrupt save context on there. You can use the
CYGNUM_HAL_STACK_INTERRUPT_SIZE macro defined in <cyg/hal/hal_arch.h> for
this.
Yes it is difficult, and adding a fudge factor just in case is recommended
if you can too!
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine