Find class/function contribution to final code size

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

Find class/function contribution to final code size

983 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Sat Jul 25 06:23:52 MST 2015
Hello everyone,

i'm using LPCXpresso 7.8 together with an LPC11C24 to develop an C++ application using a quite large library (nominal footprint of 22k). In addition to that I wrote a sort of HAL for the various peripherals that are going to be used.
Unfortunately when I try to compile the software I end up with the flash overflow error, even in Release build with -Os enabled on compiler, linker (link-time optimization enabled as well).
I therefore thought of optimizing everything by looking into the .map file in order to find out how much each class/function/header contributes to the code size.
Is there any documentation of the .map file format used by the toolchain or - better yet - a better way of investigating that?
0 项奖励
回复
3 回复数

977 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Sun Jul 26 15:19:05 MST 2015

Quote: R2D2
Disassemble the complete executable  :O



How would I be able to get the sizes from the individual parts, especially after optimization? :)



Quote: TheFallGuy
You might also try the symbol viewer. I think this shows function sizes.



I will check both on Monday and see what I can get. Thanks so far!
0 项奖励
回复

977 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Jul 25 14:47:02 MST 2015
You might also try the symbol viewer. I think this shows function sizes.
0 项奖励
回复

977 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sat Jul 25 07:47:47 MST 2015

Quote: miccio
....a better way of investigating that?



Disassemble the complete executable  :O

https://www.lpcware.com/content/faq/lpcxpresso/disassembling-objects-and-executables
0 项奖励
回复