How To Generate A Map File When Building A Library For MPCXXX

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

How To Generate A Map File When Building A Library For MPCXXX

3,081件の閲覧回数
scottobrien
NXP Employee
NXP Employee

Is there a way to get a Map file generated when creating a Library as opposed to an application?

I ask, because there is a customer attempting to create a small Library for MPC5604P using 4 C files, and the Library is ending up at 55K of code.  

Was looking for a way to see what exactly being included in the output.

Thanks,
Scott O

0 件の賞賛
返信
1 返信

3,061件の閲覧回数
stanish
NXP Employee
NXP Employee

Hi Scott,

I'm affraid you cannot generate map file for a library since  .map file is generated by the linker.

When building a static library there is no linking stage involved. Library is just archive of compiled object code (without final addresses assigned).

Alternative method for static library inspection is in my opinion disassembly listing.

You can do it directly in CodeWarrior by right click on .a file and select "Disasssembly" in the context menu.

stanish_0-1611913438921.png

Please make sure the library project does not include any other library. If this is the case all its members are probably included in the final library. This could be the reason of such a bulky lib.

Also please turn on the highest optimization level for the compiler + size optimization. This should reduce the code size of the lib.

Hope it helps.

Stan

 

0 件の賞賛
返信