Size of MQX compiled image

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

Size of MQX compiled image

ソリューションへジャンプ
1,299件の閲覧回数
panpwr
Contributor IV

Hello,

 

I am using Keil IDE & MQX 4.0 for my K60, which has a 512KB Program Flash.

When looking at my *.axf file (my compiled image, I assume), I see that its size is 494KB.

is that considered reasonable for an MQX application which includes features such as RTCS (TCP/IP, Sockets, DNS, DHCP), UARTs, SPI port, lightweight events, and a small application with few threads?

 

Of course, I don't expect an accurate answer, but just to see whether it is in the reasonable boundaries, or am I doing something really wrong (since I am almost out of program Flash memory...)

 

Thanks!

Lior.

Original Attachment has been moved to: ng_brg_twrk60d100m.map.zip

タグ(4)
1 解決策
883件の閲覧回数
c0170
Senior Contributor III

Hello panpwr,

have you checked the sizes in your map file?

Total RO  Size (Code + RO Data)           109240 ( 106.68kB)
Total RW  Size (RW Data + ZI Data)          8188 (   8.00kB)
Total ROM Size (Code + RO Data + RW Data) 109748 ( 107.18kB)

Here's link how to read these sizes

ARM Information Center

I guess after quick glanze that the size is around 116kB :smileywink:

Regards,

c0170

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
883件の閲覧回数
c0170
Senior Contributor III

Hello panpwr,

could you share your map file? At least sizes which are printed in map file generated by KEIL. There are many steps you can "squeeze" your application.

How did you find out size is 494KB? Do you use optimizations? What's the level? Is option checked - One elf file per function? What I have experienced, not always linker removed symbols which I considered to be not used, even with option One elf file per function enabled.

Do you use standard libs or microlibs (which might save some space as well)?

I recommend reading this document available on KEIL website:

http://www.keil.com/appnotes/files/apnt202.pdf

Regards,

c0170

883件の閲覧回数
panpwr
Contributor IV

Hey c0170, thanks for your answer.


I've looked at the generated *.axf image file in my release folder, and noticed its 494KB size.

I've also attached the map file to the original message.


I do not use any optimizations (I use the default setup). I've tried to reduce size by excluding the "Browse Information", but the image was reduced by only 2KB.


I downloaded the optimization document, and I will read it, but a general question regarding optimizations - is a space optimization usually not a trade-off of processing speed? Since this is my basic assumption (and please correct me if I am wrong), I do not tend to use optimizations.


If you could see anything unusual (using my map file), or a big code-space "hog", I would be very glad & thankful! :smileyhappy:


Thank you,

Lior.



0 件の賞賛
返信
884件の閲覧回数
c0170
Senior Contributor III

Hello panpwr,

have you checked the sizes in your map file?

Total RO  Size (Code + RO Data)           109240 ( 106.68kB)
Total RW  Size (RW Data + ZI Data)          8188 (   8.00kB)
Total ROM Size (Code + RO Data + RW Data) 109748 ( 107.18kB)

Here's link how to read these sizes

ARM Information Center

I guess after quick glanze that the size is around 116kB :smileywink:

Regards,

c0170

0 件の賞賛
返信
883件の閲覧回数
panpwr
Contributor IV

Hey c0170, thanks for your answer.


Indeed, I've seen these "Total" sizes.

However, since the *.axf file is 494KB, I thought I should sum these totals and add some more "sizes", in order to reach the final code size.

When I worked with TI processors, the generated file was a simple HEX file, and its size was pretty straightforward.. So why in this case, the *.axf file is so huge?


Thanks,

Lior.

0 件の賞賛
返信
883件の閲覧回数
c0170
Senior Contributor III

Hello panpwr,

because that binary file contains much more than what just goes into flash, like debug informations, symbol tables and many more information for IDE :smileywink:  Play with the settings which are mentioned in KEIL document how to optimize and you'll see how much space you can squeeze with different options enabled.

Regards,

c0170