Compiled Library Size on Target Image

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Compiled Library Size on Target Image

跳至解决方案
988 次查看
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 解答
798 次查看
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 回复数
799 次查看
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 项奖励
回复
798 次查看
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 项奖励
回复
798 次查看
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 项奖励
回复
798 次查看
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 项奖励
回复