> Date: Thu, 19 Apr 2012 08:37:00 -0400
> From: Doug Carlson <carl...@cs.jhu.edu>
> Subject: [Mspgcc-users] Reserving stack space at compile time?
> To: mspgcc-users@lists.sourceforge.net
> Message-ID:
> <cadrink_icog8vlrwspc50at-eknztfcpbxstdvpertgea3c...@mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Howdy.
> I recently ran into an issue with my program stack growing into the
> statically-allocated variables in the .bss section due to some
> overenthusiastic use of printf's. Looking through the archives, I found
> this
> discussion<
> http://www.mail-archive.com/mspgcc-users@lists.sourceforge.net/msg10178.html
> >
> regarding
> general stack protection techniques.
>
> Two questions, which may be more general gcc/ld-related than msp-specific
>
> 1. While it's impossible in the general case to determine the maximum stack
> size that a program will use, is there any mspgcc setting (or standalone
> tool) that can handle the simple cases that dominate in MCUs (no recursion,
> no function pointers, no nested ISRs) and spit out a maximum stack depth?
>
>
Hi, I had earlier written a stack analysis tool for mspgcc compiled
programs for my own use.
I put it up on google code for anyone to download and use.
The link is http://code.google.com/p/stkchk/
What can it do?
Analyze the call tree of a program and report the stack usage of a function
(by default "main") and its children.
Distinguish between direct function calls and indirect function calls (via
function pointers).
Indirect calls can be resolved if the user provides addition information on
the command line.
Detect recursion both direct (f() -> f()) and indirect (f()-> g()->f()),
and report it.
Thanks
RJ
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users