Compiler optimization no longer works for Eclipse IDE

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiler optimization no longer works for Eclipse IDE

Contributor III

Using Codewarrior Eclipse IDE version 10.6.  Programming a 56f8367 with the USB Tap.


Due to a legacy code issue, I have a soft limit on the number of blocks I can use for programming space.

We recently just passed that mark. Now, I am sure there are many things I can do in the code to make it more efficient, but I tried to play around with the compiler optimization settings to see how much this would buy me.


Under the Optimization menu, I changed it to Size and Optimization Level 1. This dramatically decreased the size of the code and would be a great help. I was also able to load and test this and successful tested a large set of the functionality.


However, I pressed my luck and increased the optimization level to 4. When I did this, the program no longer ran. It would compile, and I could load it into the unit, but I would immediately crash. It looks like it crashed on a long division, if that helps at all.

Anyway, I decided that I would just back off back down to Level 1 as it would have been more than enough. However, THAT stopped working too. It would crash in the same way. I tried programming a different unit, I even tried a different project (the same code, with just a few different #defines) and none of them work either. Even if I turn Optimization Level to "Off" and set it to "size" my program still crashes in the same way. The only way I can get it to work now is to set it to "Speed" and "Off."


I am working with a repository, so I have another guy who can check out the same exact version of code I am working with, and he is able to compile with Optimization Level 1 and Size.


It seems like setting it to Level 4 broke my ability to optimize it at all. . .I can even set it to Size at all!


I am wondering if there is something that Cleaning the project does not actually clean where something about the optimization is getting stored which is why I am no longer able to optimize successfully even though I was able to do so before.


Any ideas?

Labels (1)
Tags (2)
0 Kudos
1 Reply

NXP Employee
NXP Employee

Could you please changed it to Size and Optimization Level 1, then rebuild the project. Then compare its output S-record file and MAP file with your colleague's? Since he is also using Size and Optimization Level 1, they should be same.  If not, what's the difference between them?

Fiona Kuang

Technical Information & Commercial Support


Note: If this post answers your question, please click the Correct Answer button. Thank you!


0 Kudos