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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2,227 Views
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 Kudos
Reply
1 Reply

2,207 Views
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 Kudos
Reply