Several questions about the IDE and compiler

Hi all

In an effort to better understand the IDE and compiler for the Arduino, I have a few questions which I'm hoping someone can answer.

1) The actual C language, is that parsed to avr-gcc and/or avr-cpp where it is compiled and the IDE is in essence just a text editor?

2) Is it possible to add other AVR chips to the menu Tools-->Boards (in the IDE) and the IDE then sends the appropriate processor options to the compiler (assuming point 1 above is correct)? The idea here being that I'm toying with the idea of making a really small Arduino board based on the Tiny2313 or even one of the 8 pin types.

Thanks in advance.

  1. The IDE is mostly a text editor, BUT…

a) It adds things (especially #include <Arduino.h>) to your file. This is helpful for beginners but can cause confusing error messages and can get in the way of experienced C programmers. This is part of the reason why I switched to Eclipse.

b) It provides automatic download of the code to the target.

  1. It is possible to add other AVR chips. I don’t know how myself, but this has been discussed previously in the Arduino forums. I believe that there is a boards.txt file that gets modified. Whatever the file, create a backup FIRST before modifying!

Good Luck!

1) The actual C language, is that parsed to avr-gcc and/or avr-cpp where it is compiled and the IDE is in essence just a text editor?

Yes, and no. The IDE adds function prototypes and header files, and a main() to your sketch. It also merges all .ino files into one .cpp file. In addition, it creates a temporary build directory and copies files to there.

Is it possible to add other AVR chips to the menu Tools-->Boards (in the IDE) and the IDE then sends the appropriate processor options to the compiler (assuming point 1 above is correct)?

Yes, it's possible. I've never done it, so I can't tell you how.

Thank you vaj4088 and PaulS for your replies.

The boards.txt file is exactly what I'm looking for and since the IDE calls avrdude to do the actual compiling and avrdude does support AVRs like the tiny85, it should be relatively straight forward. I'm not too bothered with a (USB) bootloader as for my application, the ISP option is perfect as I have an ATMEL AVRISP MKII programmer (STK500 protocol) which avrdude supports.