EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

anybody know a good C compiler for pic10/12/16 ??

Started by Andre August 16, 2012
I am using HighTch Picc ( LITE ) I am retired and can't afford paying 
+/- 1000 � for the picc PRO.
The LITE version loose about 40% in no optimisation and I can't fit all 
my code in a pic16f648a.
I have been googling a while but I didn't find any free compiler ( no 
such thing as pic-gcc )
I won't loose a lot by moving to another micro, ATMEL avr seems 
interesting, there is avr-gcc.
any suggestions, idea
Many thanks in advances
On 8/16/2012 2:03 AM, Andre wrote:
> I am using HighTch Picc ( LITE ) I am retired and can't afford paying > +/- 1000 � for the picc PRO. > The LITE version loose about 40% in no optimisation and I can't fit all > my code in a pic16f648a. > I have been googling a while but I didn't find any free compiler ( no > such thing as pic-gcc ) > I won't loose a lot by moving to another micro, ATMEL avr seems > interesting, there is avr-gcc. > any suggestions, idea > Many thanks in advances
I played with the SDCC compiler for the PIC. I gave up early when I couldn't find a lot of macros/subroutines for typical functions. Went back to PicBasic Pro. Life is too short to write all the functions I already have...or to learn the quirks of C...
On 16/08/2012 11:03, Andre wrote:
> I am using HighTch Picc ( LITE ) I am retired and can't afford paying > +/- 1000 � for the picc PRO. > The LITE version loose about 40% in no optimisation and I can't fit all > my code in a pic16f648a. > I have been googling a while but I didn't find any free compiler ( no > such thing as pic-gcc ) > I won't loose a lot by moving to another micro, ATMEL avr seems > interesting, there is avr-gcc. > any suggestions, idea > Many thanks in advances
If you are happy moving to a different microcontroller, then do so. Microchip PICs have a few good points (such as long-term availability), but the cpu itself is completely brain-dead. It is very difficult to write a good compiler for them (thus they are expensive) - and the code users have to write to get efficient object code is a mess of special keywords. Hobby users might like the DIP packages of PICs, but software developers are always happy to leave them behind. AVRs are a good choice for small 8-bit devices. The avr-gcc toolchain is free, supported by Atmel (it is integrated into their IDE, and Atmel pay for some of the work on it), and generates good code. MSP430s are another architecture to look at - and again, there is a good gcc port. You might also want to consider moving towards Cortex-M devices if you want more processing power - free (or very cheap) gcc-based toolchains are available for most families.
Andre wrote:

> I am using HighTch Picc ( LITE ) I am retired and can't afford paying > +/- 1000 € for the picc PRO. > The LITE version loose about 40% in no optimisation and I can't fit all > my code in a pic16f648a. > I have been googling a while but I didn't find any free compiler ( no > such thing as pic-gcc ) > I won't loose a lot by moving to another micro, ATMEL avr seems > interesting, there is avr-gcc. > any suggestions, idea > Many thanks in advances
I've mentioned <http://www.sourceboost.com/> here before. The compiler costs $0 for a limited capacity version (free download), and a single-seat unlimited professional version is $150, IIRC. A client of mine uses the compiler and bought a couple of pro licenses. ISTR only one wrinkle concerning the sizeof operator. My preference is for gcc toolchains on non-PIC controllers, but there is that option. Mel.
On 16/08/2012 10:03, Andre wrote:
> I am using HighTch Picc ( LITE ) I am retired and can't afford paying > +/- 1000 &#4294967295; for the picc PRO. > The LITE version loose about 40% in no optimisation and I can't fit all > my code in a pic16f648a. > I have been googling a while but I didn't find any free compiler ( no > such thing as pic-gcc ) > I won't loose a lot by moving to another micro, ATMEL avr seems > interesting, there is avr-gcc. > any suggestions, idea > Many thanks in advances
I've been using the CCS compiler for the PIC18 (also supports the smaller parts) for several years and have got good results with it. http://www.ccsinfo.com It's not exactly ANSI C, and has some quirks, but given the architecture that it's targeting, it does a pretty good job. Martin
Hi Andre,

Definitely try CC5X. There is free edition too, its only limitation
is less optimization. CC5X produces very compact and fast code.
I am using it for years already.
It supports all of the PIC10/12/16 range and more.

Details:
http://www.bknd.com/

HTH,
Wolfgang


-- 
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
On 8/16/2012 3:03 AM, Andre wrote:
> I am using HighTch Picc ( LITE ) I am retired and can't afford paying > +/- 1000 &#4294967295; for the picc PRO. > The LITE version loose about 40% in no optimisation and I can't fit all > my code in a pic16f648a. > I have been googling a while but I didn't find any free compiler ( no > such thing as pic-gcc ) > I won't loose a lot by moving to another micro, ATMEL avr seems > interesting, there is avr-gcc. > any suggestions, idea > Many thanks in advances
Why do you need the pic16f648a chip ? Program Memory (KB) 7 CPU Speed (MIPS) 5 RAM Bytes 256 Data EEPROM (bytes) 256 Digikey price 1 ea $ 3.04 Try PIC16F1847-I/P Program Memory (KB) 14 CPU Speed (MIPS) 8 RAM Bytes 1,024 Data EEPROM (bytes) 256 Digikey price 1 ea $ 2.10 With all the newer versions from Microchip, you can find a higher capacity chip for less. This is whats nice about PIC family processors. Run out of room, get the next higher model, save money. Now, if you are building 1000s of units where each penny is counted....... Good Luck hamilton
On Thursday, August 16, 2012 5:52:00 AM UTC-5, Martin wrote:
> On 16/08/2012 10:03, Andre wrote: > > > I am using HighTch Picc ( LITE ) I am retired and can't afford paying > > > +/- 1000 &#65533; for the picc PRO. > > > The LITE version loose about 40% in no optimisation and I can't fit all > > > my code in a pic16f648a. > > > I have been googling a while but I didn't find any free compiler ( no > > > such thing as pic-gcc ) > > > I won't loose a lot by moving to another micro, ATMEL avr seems > > > interesting, there is avr-gcc. > > > any suggestions, idea > > > Many thanks in advances > > > > I've been using the CCS compiler for the PIC18 (also supports the > > smaller parts) for several years and have got good results with it. > > > > http://www.ccsinfo.com > > > > It's not exactly ANSI C, and has some quirks, but given the architecture > > that it's targeting, it does a pretty good job.
I'll put in a second vote for CCS. I've been using it for quite a few years as well and it does produce really compact code once you learn some of the oddities. (For example there's an "int1" data type which actually declares a one bit variable which gets set/cleared using single BSF/BCF instructions) If you want to use the IDE instead of the command line, try to get the old version 3.249 instead of the newer 4.xxx since that IDE is so incredibly buggy it's virtually unusable. The compiler itself is good in both versions though.

The 2024 Embedded Online Conference