This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New ethernet driver for the Samsung S3C4510


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]