Gcc version 4.9.4 vs. 4.6.4

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I use Gcc V4.6.4 to compile one project and get an .elf file which is 33000KB.
While I use Gcc V4.9.4 to compile the same project, the output .elf file is only 9500KB.
The trouble is that after loading the .elf file to a demo board, the software behavior is also different.
I want to know the major difference between Gcc V4.6.4 and Gcc V4.9.4.
The datasheet of V4.6.4 has 730 pages while V4.9.4 has about 900 pages.
It's hard to compare them.
0 Likes
2 Replies
Not applicable
"the same project" means not only code but also settings/optimazitionItems... are all the same.
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
Hi Yue,

Yue wrote:
"the same project" means not only code but also settings/optimazitionItems... are all the same.


I don't know what the notable differences are between these two versions but the size drop seems significant. At this point I would recommend the following:


  • Run tricore-size for both projects. Without command line options it will give you the size of sections .text, .data and .bss. You'd expect those to be about the same between both projects. You can also add command line option -A to see the size for all sections.
  • Compare mapfiles for both projects. These are divided into several blocks and I'd be taking a look at the ones called "discarded input sections" and "memory configuration". The first offers clues as to sections that are being removed in one project and perhaps not in the other. The latter can perhaps show differences in memory consumption between both projects.
  • Compare both projects in terms of command line options. From your description I get the impression you glanced over your IDE settings and found them to be the same. Did you also take a look at the resulting command line options? Those of interest are "TriCore C Compiler" and "TriCore C linker" as demonstrated below. You'd need to compare those between both projects.


3253.attach


3254.attach



Hopefully this will bring you a little closer to the truth. You also wrote that your resulting application doesn't behave as it should. Did you spent some time debugging? What were you able to conclude from that?

Best regards,


Henk-Piet Glas
Principal Technical Specialist
0 Likes