Unfortunately it's not that easy.

Normally, this could (I don't say 'should') give the correct function size. 
But then, there are several things that may affect this.
Depending on optimization level, there might be common code
across functions which belongs to two functions.
Or direct assembly code performs jumps.
Then there may inlined constant data between functions, such as
text constants passed to printf and such.
The MSP supports position independent code, that mean it is possible
to access data relative to the current program counter.
There is not neccessarily a global symbol indicating hte position
of this kind of 'inline' data, so it would add to the function size.

The map file won't reflect all of this.

Unfortunately I don't have a solution for this problem.

IIRC, the compiler generates some administrative metacode
to provide this kind of information to the linker, you you might
find the required information somehwere in the gloabal list or elf file,
but I'm no expert for the metafile formats.

JMGross

----- Ursprüngliche Nachricht -----
Von: [email protected]
Gesendet am: 15 Nov 2010 06:54:11

I am using GCC compiler for MSP430 V4.4.3 to compiler my s/w.

After compilation and linking I get a map file but I am not sure how to
get the function size.

For example, in the attached map file if I want to know the size of
function "t_run_test" ,then how should I measure it?

Is it ok, if I just deduct the address of "t_run_test" from the address
of next function shown in the map file, to get the size of "t_run_test"?


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to