Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

ModusToolbox™ General

Andreas_Heder
Level 2
First like received 5 questions asked 10 sign-ins
Level 2
 
sorry for reposting, but the original post is marked as "solved" and i can not replay to this.
 
The problem is not solved for me.

It looks like I have no influence on the optimization level when i change the:

"CFLAGS="  -Og,-O0 ,... and so on. in the make file. What i have to do exactly? 

Change the Make file, save, recompile all ? Or i do missing something?

 

Do you have a step by step manuel to change optimization level?

 

for example: the "test" var is always optimized out: --> for my understanding this must not happen with -O0

int main(void)
{
cy_rslt_t result;
uint8_t test = 0;

/* Initialize the device and board peripherals */
result = cybsp_init() ;
if (result != CY_RSLT_SUCCESS)
{
CY_ASSERT(0);
}

/* Enable global interrupts */
__enable_irq();

while(1)
{
test ++;

}
}

 

 

 

0 Likes
1 Solution
RodolfoGL
Employee
250 sign-ins 5 comments on KBA First comment on KBA
Employee

If you want to use a custom optimization, set "CONFIG=Custom" in the makefile.

View solution in original post

2 Replies
RodolfoGL
Employee
250 sign-ins 5 comments on KBA First comment on KBA
Employee

If you want to use a custom optimization, set "CONFIG=Custom" in the makefile.

Andreas_Heder
Level 2
First like received 5 questions asked 10 sign-ins
Level 2

Hey, thank you, now it work. Perfect.

0 Likes