Codewarrior 6.3 vs Codewarrior 10.1 compiler

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

Codewarrior 6.3 vs Codewarrior 10.1 compiler

ソリューションへジャンプ
2,560件の閲覧回数
gustavod
Contributor III

Hi everyone,

 

Anyone knows why Codewarrior 10.1 compiler for Coldfire V1 generates much bigger code than Codewarrior 6.3 compiler?

 

I have both projects with the same code and the same optimization level (1 - smaller code size). The code generated by Codewarrior 6.3 is around 46KBytes and the code generated by Codewarrior 10.1 is around 60KBytes

 

I have attached the MAP files of both projects. You can look at functions and see that code generated by CodeWarrior 10.1 is bigger.

 

Regards,

Gustavo

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,880件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hello,

I think I have found your problem: you missed to enable 'Register Coloring', 'Instruction scheduling' and 'Peephole' optimizations in MCU10.1. You have them enabled in 6.3, but not in 10.1.

 

I replicated this on my side, and with above optimizations enabled the code size in my f_mount() was reduced from 0x52.

to 0x2d. So this should make the difference you expect.

 

BK

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
1,880件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hard to tell from the map file only. I suggest that you pick one function (e.g. f_mount) and create a disassembly listing for both compilers.

There is for sure one big change from 6.3 to 10.1 projects (ColdFire): the library model has changed. But I think this is not the main reason. I think somehow your 10.1 options are not to the same optimization level as in 6.3.

Check if you have the same code and data model (e.g. far/near, etc) and as well if the stack frames (-A6) are the same.

You find these settings in 10.1 under the project settings > C/C++ Build > Settings > ColdFire Compiler > Processor.

 

BK

0 件の賞賛
返信
1,880件の閲覧回数
gustavod
Contributor III

Hi BlackNight,

 

Thank you by your help, but i think that all configs are the same. I have attached the images and the disassembly for both compilers of the ff.c file.

 

Regards,

Gustavo

0 件の賞賛
返信
1,880件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Could you check the ff_disassembly_CW10.1.txt? it is an empty file in the zip file?

 

BK

0 件の賞賛
返信
1,881件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hello,

I think I have found your problem: you missed to enable 'Register Coloring', 'Instruction scheduling' and 'Peephole' optimizations in MCU10.1. You have them enabled in 6.3, but not in 10.1.

 

I replicated this on my side, and with above optimizations enabled the code size in my f_mount() was reduced from 0x52.

to 0x2d. So this should make the difference you expect.

 

BK

0 件の賞賛
返信
1,880件の閲覧回数
gustavod
Contributor III

Thank you very much BK. Now both codes are in the same size. On monday i will try the Code Warrior 10.1 code in my board, but i think that everything will work.

 

Best regards,

Gustavo

0 件の賞賛
返信
1,880件の閲覧回数
gustavod
Contributor III

Forgive me BK. Now i posted the right files.

 

Regards,

Gustavo

0 件の賞賛
返信