Re: clarification on gcc

Pink Boy <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <[email protected]>
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
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.