I've compiled the Freescale USB stack (v4.0.2) as a library, and I'd like to determine how much target space it is consuming in my test application. The linker map file for the target application isn't exactly forthcoming. (Maybe I'm looking in the wrong place?) How do I determine how much target space a compiled library is consuming? Thanks.
Solved! Go to Solution.
Hi Jim,
I'm not sure it will directly tell you the compiled size of the entire library, as the entire library would not normally be included in your application. The linking process would select only those modules that are required by your application, so the library's map file gives you the size of each of those modules.
If you think that you will be using every module, I think you would need to add-up the size of each module in the library. The alternative is to look at the map from your final application after it is linked with the library. The size of the library file on disk might give you a rough idea of the size of the code inside.
Hi Jim,
I'm not sure it will directly tell you the compiled size of the entire library, as the entire library would not normally be included in your application. The linking process would select only those modules that are required by your application, so the library's map file gives you the size of each of those modules.
If you think that you will be using every module, I think you would need to add-up the size of each module in the library. The alternative is to look at the map from your final application after it is linked with the library. The size of the library file on disk might give you a rough idea of the size of the code inside.
Hi Mark. Thanks for the feedback.
Mark Hotchkiss wrote:
The linking process would select only those modules that are required by your application, so the library's map file gives you the size of each of those modules.
Is that to say that a map file should be generated when the library is built? In my project's linker output settings I have the Generate Link Map and Always Keep Map options selected, but my library projects do not seem to generate a map file.
Hi Jim,
I have never used codewarrior's linker to build a library, but the software prior to codewarrior allowed for something more like an index. It couldn't really be considered a map, as no addresses would be assigned, but it did list the module names and each module's code size.
Later, I may look at the current linker manual to see what it has.
Thanks for all the help, Mark. I went through the map file generated by my test application and added up all the pertinate module sizes.