"Optimize for size"
Hello,
I have got a project that must not exceed the size of 4k bytes.
With Crossworks for ARM vs. 2.0.3 the file size was 3887 bytes with the following settings:
Enable Unused Symbol Removal YES
Optimization Level Optimize for size
Keep Symbols _vectors
After upgrading to vs. 2.1.1 the property NO COMMON as been set to NO as suggested in an earlier request.
The file size now is 8611 bytes even though the properties above have not been modified.
Does anybody have a similar experience? And if so, is there a solution for that?
Henry
-
Hello Michael,
now that I set Printf Supported, Scanf Supported and DebugIO Supported to NO the file has been considerable reduced to 3971 bytes (3887 before). That solved my problem. Thanks for that very fast response! Rowley`s support is really excellent.
What still surprised me a bit is that the file generated with
THUMB Flash Release (4047 Bytes) is bigger than that generated with THUM Flash Debug (3971 Bytes). I would have expected it the other way round.
Regards,
Henry
-
Perhaps this is the explanation for different file sizes:
I first set Printf Supported and Scanf Supported to NO and compiled the project. The file then was still too big. In a second step I set DebugIO Supported to NO and got a file size < 4k, but with different sizes for both configurations. As I did not modify any file between those 2 steps, I suppose that the object files have not been rebuilt. Would that be a possible reason?
When I applied the new property settings to the original project from the archive, the resulting file size for debug and release configuration were the same.
Henry
Please sign in to leave a comment.
Comments
4 comments