[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] clarification on gcc

From: Pink Boy
Subject: Re: [avr-gcc-list] clarification on gcc
Date: Mon, 24 Jun 2013 14:33:08 -0700 (PDT)

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]