how to use the optimization of the codewarrior

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

how to use the optimization of the codewarrior

573件の閲覧回数
lebronji
Contributor I

hello all,

      I have a question that a program with the level 2 of optimization commad.The version of the program runs on the same 10 hardware platforms, of which there is a board program does not run for a while. This version of program optimization option is level 2. But when I choose the level of optimization level 0. This version of the process can be normal operation does not appear stuck, the function is normal.

the figure:the optimization as show:

pastedImage_1.png

I have a few questions,

(1) codewarrior optimization options optimization code how to view the assembly language?

(2)  whether the project is recommended to use optimization options; (3) Some people think that codewarrior optimization options could introduce a bug so do not recommend Use, is it reasonable? (4) My project has entered a small batch test, 500 boards only a board appears such a situation, whether I need to cancel the optimization options. Is this necessary?

i hope your advice.

thanks.

ラベル(1)
1 返信

334件の閲覧回数
martin_kovar
NXP Employee
NXP Employee

Hello,

1) For assembly code, right click somewhere in C file and select Disassemble.

pastedImage_1.png

2) If you use higher optimization, your code will be smaller, but also it will be more difficult to debug it and compiling will be slower. There is a description under each optimization level, so you can read, what optimizations are done.

3) It is possible that high level optimization will create some bug in the code. Unfortunately any compiler is flawless. 

4) In case your code does not work as expected with optimization, I recommend you set optimization off and do not use it (if it is possible).

Hope it helps. In case you have any other questions, please feel free to write me back.

Regards,

Martin