How to change optimize level for one function in codewarrior11?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to change optimize level for one function in codewarrior11?

跳至解决方案
3,174 次查看
Wangerxi
Contributor II

I tried use 

#pragma GCC push_options

#pragma GCC optimize("O0")

/*my code function*/

#pragma GCC pop_options

 

after compiled the warning:#pragma GCC target is not supported for this machine [-Wpragmas]

 

Is there any other solutions?

0 项奖励
回复
1 解答
3,098 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi,

 Please try the following code for function optimization.

__attribute__((optimize("O0")))void func(void)
{
/* Your code*/
}

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time. 

------------------------------------------------------------------------------ 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
3,163 次查看
Wangerxi
Contributor II

Chip number is S9KEA64

0 项奖励
回复
3,099 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi,

 Please try the following code for function optimization.

__attribute__((optimize("O0")))void func(void)
{
/* Your code*/
}

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time. 

------------------------------------------------------------------------------ 

0 项奖励
回复
3,167 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

HI

What's your chip part number? please let us know thus we can assign right engineer for your issue.

Thanks,

Jun Zhang

0 项奖励
回复