How to change optimize level for one function in codewarrior11?

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

How to change optimize level for one function in codewarrior11?

ソリューションへジャンプ
1,828件の閲覧回数
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 解決策
1,752件の閲覧回数
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 返答(返信)
1,817件の閲覧回数
Wangerxi
Contributor II

Chip number is S9KEA64

0 件の賞賛
1,753件の閲覧回数
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 件の賞賛
1,821件の閲覧回数
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 件の賞賛