How to change optimize level for one function in codewarrior11?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change optimize level for one function in codewarrior11?

Jump to solution
3,178 Views
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 Kudos
Reply
1 Solution
3,102 Views
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. 

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

View solution in original post

0 Kudos
Reply
3 Replies
3,167 Views
Wangerxi
Contributor II

Chip number is S9KEA64

0 Kudos
Reply
3,103 Views
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 Kudos
Reply
3,171 Views
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 Kudos
Reply