On 2013-01-07 12:22 AM, Xiaofan Chen wrote: >> Why not use xc32 itself? It is now available under Windows, Linux >> and Mac OS X. Okay, the optimization is not as good as >> the full version after the evaluation time out, but the basic >> gcc optimization will still be there. I am using clang and LLVM at the moment. I really like the concept behind LLVM. Clang reads standard C code, then outputs LLVM bytecode, which is then optimized. LLVM is dynamically retargetable, so it is simple to output mips32r2 assembler code. This is where GNU binutils comes in. `as` compiles the mips32r2 code into object files which are then linked by `ld`. The last piece of the puzzle is to try and get `as` or `ld` to put static config data at the specified address in the linker script. I'm sure it can be done, but I just don't know how. I don't know where and how to specify the static data so that it can be placed at the proper address in the hex image. >> If not, what about build xc32 (or C32) compiler by yourself using >> the source codes? >> Eg: >> http://www.microchip.com/forums/m692454.aspx >> http://www.microchip.com/forums/m579695.aspx >> http://www.microchip.com/forums/m460901.aspx >> >> Technically you may still not able to use Microchip header files >> and library files, but you can install xc32 under Linux and >> the use those files. I have considered it, but I really like LLVM and only one last, tiny thing needs to be done to provide a completely free toolchain. I don't want to have to rely on Microchip to provide optimization when LLVM's bytecode optimizer is quite good already and only improving. There are plenty of small C libraries for embedded use already so the libraries aren't a big deal. The headers are merely definitions of addresses and names which can be reordered, changed up a bit by an automatic script and labelled as GNU GPL. No big deal. The entirety of the data is in the datasheet anyway, so you can't really stick a license on that anyway. > So a fully open source toolchain will be to use xc32 open > source toolchain and then ported another library (eg: > newlib or uclibc or things like that) to the open source > toolchain. I doubt that there will be many audiences > now that xc32 works under Linux and Mac OS X, > albeit will less optimization. But even if you build > another library, the optimization may not be good > as the xc32 libraries (some of them are from proprietary > sources -- eg: MIPS). >=20 > Ref: http://www.microchip.com/forums/tm.aspx?&m=3D364626 >=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .