Show file size on console

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

Show file size on console

916 次查看
sokolbiba
Contributor I

Hi every one,

I am trying to show the source files size when building the project. Is there any command to MCUXpresso to make this in an automated way for every project? It would be nice to have all the object files listed and their size.

Regards,

Sokol

标签 (1)
0 项奖励
3 回复数

795 次查看
BlackNight
NXP Employee
NXP Employee

Hi Sokol,

yes, you can use the size utility in a postbuild step for this:

pastedImage_1.png

See Listing Code and Data Size for each Source File with GNU and Eclipse | MCU on Eclipse .

Another way would to see what is actually linked would be to use the nm utility with MCUXpresso IDE as shown in Listing Code and Data Size with GNU nm in Eclipse | MCU on Eclipse 

I hope this helps,

Erich

0 项奖励

795 次查看
sokolbiba
Contributor I

Hi Eric,

Thank you for your reply. I have done it in that way and there is en error in the console. It is unable to read the files in different directories that excist inside the source directory. Please have a look at the image below. I want this to be a general command. I do not want to change the command for every project in order to show files size for different projects.

Regards,

Sokol

0 项奖励

795 次查看
BlackNight
NXP Employee
NXP Employee

Hi Sokol,

you have to tell the size (GNU Binary Utilities: size ) tool where the object files are. It cannot find them in a magical way. So if your directories are different, you have to tell it where it is. If that is not ok for you, you could write a script which goes recursively through the direcories and calls 'size'.

I hope this helps,

Erich

0 项奖励