View previous topic :: View next topic |
Author |
Message |
nehallove
Joined: 16 Jan 2008 Posts: 61
|
Optimization Level Doesn't change ... |
Posted: Thu Mar 28, 2013 7:01 pm |
|
|
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.
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
|
|
Posted: Thu Mar 28, 2013 7:05 pm |
|
|
compiler version is
IDE version 4.139 _________________ nehal |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Mar 28, 2013 7:54 pm |
|
|
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
|
|
Posted: Fri Mar 29, 2013 1:20 pm |
|
|
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 |
|
|
|