Show file size on console

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

Show file size on console

897件の閲覧回数
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 返答(返信)

776件の閲覧回数
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 件の賞賛

776件の閲覧回数
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 件の賞賛

776件の閲覧回数
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 件の賞賛