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
已解决! 转到解答。
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
I guess after quick glanze that the size is around 116kB :smileywink:
Regards,
c0170
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
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.
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
I guess after quick glanze that the size is around 116kB :smileywink:
Regards,
c0170
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.
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