I already know C/C++ well enough on Linux OS. My question is three fold:
- If I learn programming concepts using avr-gcc then what type of program or what type of application one can develop? I mean is it that avr-gcc is only used for programming Atmel's AVR micro-controller or I get benefit of learning to develop applications for other micro-controller / devices? Is avr-gcc compiler famous from perspective of development in embedded system world?
If you are programming on Linux, you likely are using GCC there. GCC supports multiple different front ends (C, C++, Fortran, Ada, Objective C, Objective C++, Go, and Java), and many different machines. In my 25+ years of working on GCC, I have worked on IBM/Motorola PowerPC, Intel/AMD x86, various chips using the MIPS instruction set, Fujitsu FRV-500, TI TMS320C80, Mitsubishi M32RX, Mitsubishi D30V, Mitsubishi D10V, National NS32K, and Motorola/Data General 88100. On my Arduino Uno, Digispark, Trinket, Gemma I use avr-gcc because those processors use the AVR microprocessor, and on my Teensy 3.0, I use the arm-gcc.
Note, the Arduino IDE actually uses avr-gcc/arm-gcc underneath the covers, so it is a matter of whether you are dealing with a GUI (Arduino) or command-line/make (the AVR development system from ATmega).
The IDE does use GCC underneath the covers, but it has frozen on the 4.3.2 release of GCC that is now several major versions out of date (the current released version is 4.8.1, and we soon will be having a feature freeze for 4.9.0). This means you are not able to use the C++11 features that some people now want to use.
If you feel more comfortable with either command line/make environments or using the Eclipse IDE, you could switch to using those. Lets see, here is a link I saved about using Eclipse: http://eclipse.baeyens.it/. Here are Makefile instructions: GitHub - sudar/Arduino-Makefile: Makefile for Arduino sketches. It defines the workflows for compiling code, flashing it to Arduino and even communicating through Serial..
IMHO, the IDE tries to be too helpful to newbies, in that it tries (and succeeds most but not all of the time) at putting forward references to functions. However, I feel a major short coming of the IDE is that it breaks using conditional compilation. For example, on the Uno you use i2c via the Wire functions, while on the ATtiny85 systems (digispark, trinket, gemma, etc.) there isn't enough room for the full Wire support, so they use TinyWireM. However, the IDE tries to bring in the Wire library on ATtiny85 systems and TinyWireM on the Uno and gets compilation errors.
While GCC is the most popular choice for embedded and Linux programming, there are other compiler choices out there, such as LLVM, which is another freely available compiler, and some compilers that you pay for, such as Metrowerks that I worked at briefly.