• -O0 No optimization. This is the same as not specifying any optimization.
• -01 Optimize. Reduces code size and execution time without performing any
optimizations that take a great deal of compilation time.
• -O2 Optimize even more. avr-gcc performs almost all optimizations that don't involve a
space-time tradeoff.
• -O3 Optimize yet more. This level performs all optimizations at -O2 along with -finline-
functions and -frename-registers.
• -Os Optimize for size. Enables all -O2 optimizations that don't increase code size. It also
performs further optimizations designed to reduce code size.
For more information on optimization, see the 'man' pages for avr-gcc.
Important: During the coding choose appropriate optimization option. If you feel that code is
not working properly as it should be then turn off all optimization by selecting optimization
option as "-O0". Once you know that your code is properly working then you can incrementally
increase optimization level.
We suggest that always use optimization level as "-O0" at the beginner level.
8. Make sure that in the External Tools, proper path for avr-gcc.exe and make.exe are given and
press ok.
Now we are ready to write our first code.
© NEX Robotics Pvt. Ltd. and ERTS Lab IIT Bombay, INDIA
SPARK V ATMEGA16 Hardware Manual
Figure 4.23
55
Need help?
Do you have a question about the SPARK V ATMEGA16 and is the answer not in the manual?