PDA

View Full Version : nee pic c compiler



@vijay@
March 4th, 2008, 02:39 AM
im looking for a good pic c compiler ; that will be able to support 18F series
there are many for windows , but im unable to find any good ones for linux
i have seen picc for hi-tech , but its very costly i prefer a free one :)

thanx in advance

fedex1993
March 4th, 2008, 03:33 AM
there is gcc i use that for compiling C programs
sudo apt-get install build-essentials i think it is once you install it type man gcc

geraldm
March 4th, 2008, 04:33 AM
sdcc is GPL-2.0 (LPGL by file), and free. It may take a bit of an effort to become familiar with using it. The pic18F* files are more clearly indicated in SRCTOPDIR/device/include/pic16/ directory. They are experimental, and incomplete, but there are quite a few chips already in there.
http://sdcc.sourceforge.net

Gerald

@vijay@
March 6th, 2008, 02:05 AM
thanx sdcc
whr can i get good examples for sdcc ;
if i have a c code written in different compiler say mikroc ; does sdcc compile it?

geraldm
March 6th, 2008, 06:39 AM
You might find some answers in the mailing list on sourceforge
https://sourceforge.net/forum/forum.php?forum_id=1864&et=0
That would be the best place to answer questions about sdcc.

I doubt there is a good comparison for C compilers. Try it and see.

Gerald

KaeseEs
March 6th, 2008, 04:44 PM
I was in a similar boat about 2 months ago, as I was looking for a Linux-based C compiler that targeted the 8051 family (I had been using the crappy trial Keil compiler in a W32 environment). I found that SDCC works well, although you will likely have to alter header files that include non-ANSI C (register definitions &c.)