Compiled Library Size on Target Image

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiled Library Size on Target Image

Jump to solution
251 Views
jimfell
Contributor III

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.

Labels (1)
0 Kudos
1 Solution
61 Views
rocco
Senior Contributor II

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.

View solution in original post

0 Kudos
4 Replies
62 Views
rocco
Senior Contributor II

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.

View solution in original post

0 Kudos
61 Views
jimfell
Contributor III

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.

0 Kudos
61 Views
rocco
Senior Contributor II

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.

0 Kudos
61 Views
jimfell
Contributor III

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.

0 Kudos