Memory listing from gcc

I've read the F manuals and I'm still no wiser... anyone know how I can get a memory usage listing from gcc (I'm using msp430-gcc)? I've tried

-fmem-report, doesn't not do nowt.

Paul Burke

Reply to
Paul Burke
Loading thread data ...

How about the "size" command? Or you can get detailed listings with objdump. Both of these operate on the compiled object files.

--

John Devereux
Reply to
John Devereux

You can get a map from the Linker: is that what you mean by a "usage listing"?

Reply to
David R Brooks

Generally you can't --- because it's not the job of gcc to decide about memory usage. That's done by the linker. Get a map file, and/or run 'size' or 'objdump' on the resulting files.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

If you're looking for assembly listings try adding

-Wa,-ahlms=myfile.lst

to the gcc compilation command line.

If you're looking for the big picture after linking, get a linker map by adding

-Wl,-Map=myfile.map,--cref

to the gcc command line performing the final link.

If the module cross-reference produces too much output, use the simpler form

-Wl,-Map=myfile.map

Please do not put any extra spaces in the switches or they will be misunderstood by the toolchain.

HTH

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.