Parthasaradhi Nayani sez,

>What are the differences between GCC and AVR-GCC save for the libraries? GCC 
>is supposed to cross compile for various processors so if I have a source 
>file, can I not compile this source file using regular GGC say on Linux by 
>using appropriate switches like selecting an AVR controller (-mcu = mega64)? 
>Thank you for your time.

The gcc tool chain is a cross compiler.

I'm unsure about historical and technical reasons for this, but when you
 build gcc tools you specify the target + OS to produce binaries for.  So you 
have a different versions depending on the host OS and the Target.  Runs on one 
processor and OS, produces binaries for another processor and OS.  Most of the 
time it's the same processor and OS.  I have built a gcc cross compiler on 
Linux and 
produces Windows binaries and that works.

The AVR parts are all very similar to each other.  The differences having to do 
with memory sizes, pinouts, and peripherals.  So that constitutes one target 
with a bunch of flavors.  So the -mcu=mega64 switch is there mostly I think for 
small optimizations, and so the linker knows how to layout the binary in 
memory.  And which startup library to link in.

Matt
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to