CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Optimization Level Doesn't change ...

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
nehallove



Joined: 16 Jan 2008
Posts: 61

View user's profile Send private message

Optimization Level Doesn't change ...
PostPosted: Thu Mar 28, 2013 7:01 pm     Reply with quote

I have some issues with the code which led me the to think that it might be optimization issues.

I tried to set the optimization to zero or some other value by putting following syntax in main.h file.

Code:

#OPT 0


But when i go to main.sym file it still says following

Compiler Settings:
Processor: PIC16F1825
Pointer Size: 16
ADC Range: 0-65535
Opt Level: 9
Short,Int,Long: UNSIGNED: 1,8,16
Float,Double: 32,32
ICD Provisions: Yes
Enhanced 16: Yes

Any idea why it still says that optimization level is 9?

Thank you.
_________________
nehal
nehallove



Joined: 16 Jan 2008
Posts: 61

View user's profile Send private message

PostPosted: Thu Mar 28, 2013 7:05 pm     Reply with quote

compiler version is
IDE version 4.139
_________________
nehal
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 28, 2013 7:54 pm     Reply with quote

You should always post a test program. Example:
Code:

#include <16F1825.h>
#opt 0
#fuses INTRC_IO, NOWDT
#use delay(clock=4M)

//==================================
void main()   
{


while(1);
}

Compile that program and see if you get the same results.
nehallove



Joined: 16 Jan 2008
Posts: 61

View user's profile Send private message

PostPosted: Fri Mar 29, 2013 1:20 pm     Reply with quote

Thank you very much. I was putting that in main.h. But when i put it in main.c it works. All other fuses are in main.h and it works. It is weird that why it doesn't work in main.h.
_________________
nehal
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group