How to compile binaries for PIC32?
Sébastien GRENIER
sebastien.grenier7@free.fr
Tue Jul 13 13:44:00 GMT 2010
By the way...it's about a "patched" source tree available from Microchip,
with 3.4.4 version of GCC.
Things may have changed since this old topic.
-----Message d'origine-----
De : gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]De la
part de Sébastien GRENIER
Envoyé : mardi 13 juillet 2010 08:37
à : Philip Herron; Michelle Konzack
Cc : GCC Help
Objet : RE: How to compile binaries for PIC32?
You may find additionnal information here :
http://www.microchip.com/forums/tm.aspx?m=292995
This is a discussion thread on Microchip support forum about one trying to
build GCC for its dev platform.
You'll find in the topic some information about how to configure binutils /
gcc to build them for PIC32 code generation.
You can obtain a compiler this way, but this won't provide you with a std C
lib ready to use. You'll have to complete the job by yourself at that level.
Hope that will help you.
Sebastien.
-----Message d'origine-----
De : gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]De la
part de Philip Herron
Envoyé : lundi 12 juillet 2010 06:08
à : Michelle Konzack
Cc : GCC Help
Objet : Re: How to compile binaries for PIC32?
Hey there
On 11 July 2010 22:53, Michelle Konzack <linux4michelle@tamay-dogan.net>
wrote:
> Currently I am evaluating the Microchip PIC32MX795F512L-80I/PF  and  hit
> some problems with MPLAB under VMWare (crash all the time).
>
> OK, since MPLAB is using pic-gcc.exe, I like to know, which  version  of
> gcc (and parameters) plus additinal tools  I  have  to  use  to  compile
> binaries for PIC32.
I am not quite sure what MPLAB is, but it sounds like one of those dev
kits for micro-controllers which are usually just scripts over a
pre-compiled version of gcc.
It doesn't matter what version of gcc it is. Its the way gcc is setup.
If your compiling code for a micro-controller you need a
cross-compiler. What happens is if you invoke gcc on a source file, if
your using debian gcc it will generate code for you host system.
To generate code for that micro-controller you need to compile your
own version of GCC and set the --target in the configure and you will
also need a binutils setup so as and ld, assemble and link for that
target correctly. Though if this sounds too painful you may want to
look into a scratchbox
* http://www.scratchbox.org/
which is a thing designed for cross compilation and testing
environments and runs qemu for you to test code etc.
But if you want to find out more on compiling gcc for a target and
therefore cross compiler you can Google about on some options but i am
sure its documenting on the website some where its a matter of
pointing --with-ld = with-as = --target= etc.. are the main options i
think of the top of my head but i am sure some more people here have
more experience with that! :)
Hope this helps, let us know how you get on!
--Phil
More information about the Gcc-help
mailing list