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.

跳至解决方案
1,008 次查看
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 解答
798 次查看
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 回复数
799 次查看
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 项奖励
回复
798 次查看
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 项奖励
回复