I want to optimize a specific function of c code to 0 in m52259 codewarrior.

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

I want to optimize a specific function of c code to 0 in m52259 codewarrior.

ソリューションへジャンプ
958件の閲覧回数
santoshkubasad
Contributor I

Hello I want to optimize specific function to 0 optimiation. Please let me know the syntax for it. I tried

 

#pragma GCC push_options

#pragma optimization_level 0

void fun()

{

----

-----

}

#pragma GCC pop_options

 

Not sure whether it is correct syntax or not. Please help me. Thanks

ラベル(1)
0 件の賞賛
返信
1 解決策
748件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Santosh:

Sorry for the time with no responses.

Please try with the next syntax:

#pragma optimization_level 0

void fun()

{

//.....

}

#pragma optimization_level reset

This should work.


Regards!,
Jorge Gonzalez

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

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
749件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Santosh:

Sorry for the time with no responses.

Please try with the next syntax:

#pragma optimization_level 0

void fun()

{

//.....

}

#pragma optimization_level reset

This should work.


Regards!,
Jorge Gonzalez

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

0 件の賞賛
返信
748件の閲覧回数
santoshkubasad
Contributor I

Hello Jorge,

     Thanks for the reply, issue solved, but recently i tried to update codwarrior to version10.6 and MQX to 4.0.2 when I create a new sample project of existing example project I am getting lot of compiler errors. Do I need any extra patch or any software to get the program executed. I have also attached the snapshot of the example project for your reference. Please guide me. Thankscw10.6.jpg

0 件の賞賛
返信