No there is no real way to do this from my experience (especially not at 
compile time). I did have success with using an empty function after my flash 
writer and then doing pointer arithmetic to find the size of the flash func, eg

void A()
{
...
}

void B()
{}

//find size of A
sizeofA = B - A; //something like that

I didn't feel safe doing this though so in the end I just ended up starting at 
A and copying as much data as I could fit in my buffer because it doesn't 
matter if you copy far too much, better to be safe than sorry.

- Wayne
--
Wayne Uroda
Senior Engineer
Grabba International

Sent via BlackBerry

-----Original Message-----
From: Rick Jenkins <[email protected]>
Date: Sat, 14 Nov 2009 14:34:11 
To: <[email protected]>
Subject: [Mspgcc-users] Size of functions

Does msp430-gcc provide any systematic way, such as a generated symbol, from
which a C source file can determine the size of a function? I have a function
for field reprogramming, which is moved to RAM before use, and need to know
how many words to move.
--
Rick Jenkins <[email protected]>
Hartman Technica           http://www.hartmantech.com
Phone +1 (403) 230-1987
221 35 Avenue. N.E., Calgary, Alberta, Canada T2E 2K5

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to