On Sun, Feb 6, 2011 at 9:58 PM, Olin Lathrop wr= ote: > Oli Glaser wrote: >> More that they took a free compiler, removed (most of) the >> optimisations > > That doesn't make sense. =A0I expect that the extra optimizations are the= ones > that are specific to their chip, and therefore didn't exist in the compil= er > they started with. > Actually the C32 license gives some hints about the relation of C32 and GCC. ************ The assembler, binary utilities, compiler, and linker are covered by GPL. =93libgcc.a=94 and =93libgcov.a=94 library files are derived from FSF code = governed by the GPL provided with a binary linking exception clause. The Standard Library Files are derived from software developed by the Company, MIPS Technologies, and/or the University of California, Berkeley and its contributors. **************************** As for the other libraries, they are the IP of Microchip and its suppliers (especially MIPS). They are covered by proprietary licenses. Microchip complies with the GPL by providing the source codes which are covered by GPL. As for the optimization limitation, I believe it comes from the library but I do not know the exact mechanism. The compiler itself can be built free and can have certain optimizations built-in GCC. The following threads may not be fully applicable now but may still shed some light on this issue. http://www.microchip.com/forums/tm.aspx?m=3D292995 http://www.microchip.com/forums/m364626.aspx http://www.microchip.com/forums/m460901.aspx Since Microchip's header files are not covered by GPL and some of the source codes for the libraries are not available (even for the paid version), you will not be able to build the compiler exactly as Microchip's. You can see that to build the C32 compiler from the GPL source, you have to use "--without-headers". That is the key here. To build a fully open-souce C compiler for PIC32, you have to port newlib or other open-source C library to PIC32. It is quite similar situation for commercial GCC for ARM MCUs. Vendors like Code Red, Rowley Associates (CrossWorks) and others base their compiler on GCC but provide their own C libraries instead of glibc/newlib. Microchip C32 is not really more expensive than them. The free GCC ARM compilers seem to be based on newlib mostly. newlib has its own license as well (not GPL). http://sourceware.org/newlib/COPYING.NEWLIB --=20 Xiaofan --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .