I am trying to use the built in library delay.h and getting the following warning:
(using AVR Studio 4.13 and winavr-20070525)
c:/winavr-20070525/bin/../avr/include/util/delay.h:89:3: warning: #warning "Compiler optimizations disabled; functions from
won't work as designed"
Although it's giving a warning that it may not work as desired but the delay functions of delay.h are working properly in this case.
I had gone through some of the posts and found that changing the complier optimization from -O0 to -0s and adding the library libm.a would remove this.
After doing this it removes the warning but the program doesn't work as intended..i.e. the flow of the program changes..
So, is there anything i am missing out while adding the library libm.a??