For floating calculations you can check libfp (which comes with libc and links with -lfp flag). This is not broadly tested, yet works for most (my :) applications. This will dramatically reduce stack usage for floats.
As for stack checking... Compile your sources with -S flag, then grep on "frame size" - this will show max stack required (excluding libraries of course). And another way - do the same as on 8031. ~d On Friday 28 March 2003 14:08, Saso Zbontar wrote: > Dmitry, > > thanks for prompt answer, I found out two minutes > after I posted a mail how to do that. I am using 166 bytes > of bss, but I am overlaping my variables with stack (using > over 90 bytes for stack as far I was able to found with GDB tool) > I am doing some floating calculations :-) > Is there any way or tool to calculate the amount of stack size > the program is using? > > On 8031 I `ve done that with some extra lines > of program in timer interrupt, just to transfer > stack pointer to a variable which you can check > after some time of running the program, but i believe > it has to be easier way to do it on MSP430. > > Regards > Saso > > ----- Original Message ----- > From: Saso Zbontar > To: [email protected] > Sent: Wednesday, March 26, 2003 3:31 PM > Subject: Ram usage of MSP430 > > > Hi, > > How to find out how much RAM is used on target > processor when I compile the program or to find out > how much RAM has the compiler reserved for variables > defined in my program. For example: according to my > calculations I am using about 120 bytes of RAM on MSP430f413 > but something odd hapens when i run the program. I think some > variables are overlaping. Stack is set to default value ( 0x0300 ) > > Any Ideas? > > Regards Saso -- /******************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314 ********************************************************************/
