Compiled Library Size on Target Image

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Compiled Library Size on Target Image

ソリューションへジャンプ
785件の閲覧回数
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.

ラベル(1)
0 件の賞賛
1 解決策
595件の閲覧回数
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.

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
596件の閲覧回数
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.

0 件の賞賛
595件の閲覧回数
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 件の賞賛
595件の閲覧回数
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 件の賞賛
595件の閲覧回数
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 件の賞賛