Forums

Which PIC18 C Compiler?

Started by Talal Itani July 8, 2004
Hello,

I currently have an ICD2 from Microchip.  I use it to develop PIC16 code
using the MPLAB debugger and assembler.  I need to move to the PIC18 parts
and C language, but I am struggling figure out the development tools to get.
Do you have any experience with the CCS compiler running with MPLAB and
ICD2? ($175 solution)

Thanks,
Talal


"Talal Itani" <titani@airmail.net> wrote in message
news:cckb50$cl9@library2.airnews.net...
> Hello, > > I currently have an ICD2 from Microchip. I use it to develop PIC16 code > using the MPLAB debugger and assembler. I need to move to the PIC18 parts > and C language, but I am struggling figure out the development tools to
get.
> Do you have any experience with the CCS compiler running with MPLAB and > ICD2? ($175 solution)
Where I used to work we used the Hi-Tech compiler for the PIC18, and had relatively few problems. The Microchip compiler was unusable. They have probably improved it. Leon -- Leon Heller, G1HSM http://www.geocities.com/leon_heller
In comp.arch.embedded Talal Itani <titani@airmail.net> wrote:
> Hello, > > I currently have an ICD2 from Microchip. I use it to develop PIC16 code > using the MPLAB debugger and assembler. I need to move to the PIC18 parts > and C language, but I am struggling figure out the development tools to get. > Do you have any experience with the CCS compiler running with MPLAB and > ICD2? ($175 solution) >
If you're going for C on the PIC18, the only professional-quality solution is the IAR compiler. It's expensive, but you get what you pay for. Microchip's compiler lags it significantly on code density and quality, and (IMHO) CCS takes too many liberties with the standard to actually be called C. It's a C subset with some semantic differences and some PIC-specific enhancements. This might not matter to you if you're just using it instead of assembler to save the hassle of low-level programming, but if you have any interest in migrating C code to/from the PIC, IAR is the one and only choice. pete -- pete@fenelon.com "there's no room for enigmas in built-up areas"
On Thu, 8 Jul 2004 15:34:43 -0500, the renowned "Talal Itani"
<titani@airmail.net> wrote:

>Hello, > >I currently have an ICD2 from Microchip. I use it to develop PIC16 code >using the MPLAB debugger and assembler. I need to move to the PIC18 parts >and C language, but I am struggling figure out the development tools to get. >Do you have any experience with the CCS compiler running with MPLAB and >ICD2? ($175 solution) > >Thanks, >Talal
Try Hi-Tech's compiler. You can download a limited-time demo that is almost entirely functional from their web site (I think you have to register). It's < $1K. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Pete Fenelon <pete@fenelon.com> writes:
> If you're going for C on the PIC18, the only professional-quality > solution is the IAR compiler.
I respectfully disagree. The Hitech C compiler for the PIC18 seems to be professional and of very high quality.
In comp.arch.embedded Eric Smith <eric-no-spam-for-me@brouhaha.com> wrote:
> Pete Fenelon <pete@fenelon.com> writes: >> If you're going for C on the PIC18, the only professional-quality >> solution is the IAR compiler. > > I respectfully disagree. The Hitech C compiler for the PIC18 seems to > be professional and of very high quality.
It isn't proper C though, it gets the semantics of automatic variables wrong (treats them like statics rather than allocating on the stack) and you therefore can't write reentrant code with it. (At least, you couldn't last time I looked). Yes, it's a better product than CCS. But it's not a serious C compiler. pete -- pete@fenelon.com "there's no room for enigmas in built-up areas"
...also try the CCS compiler...  www.ccs-info.com

Maybe the "non-standard" C is adequate for your needs.  I've been using CCS
compilers for years with success.  I've never found any of the
"non-standard" issues to be major show-stoppers in my applications.  CCS is
also looking at customer feedback for improvements in their compiler (as
witnessed by the inclusion of a "real" sprintf() function as opposed to the
work-around they had listed in their examples of the previous versions).

I don't know if the CCS compiler will run with the ICD2 but I do know it
will integrate with the MPLAB environment.  The 6-pin (telco connector)
pinout of the CCS debug module conforms with the ICD2 pinout for pins 1
through 5.  Pin 6 is also picked up in the CCS debugger as going to the B3
pin of the target.  Pin 6 is a no-connect in the ICD2.

Basic bottom line is many time or size-limited versions exist out there.
Try them all and pay for the one you want to use.

Best of luck.

Dave

"Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> wrote in message
news:9rhre056npaf5uc9sntjtvtjo6tbdrd4ui@4ax.com...
> On Thu, 8 Jul 2004 15:34:43 -0500, the renowned "Talal Itani" > <titani@airmail.net> wrote: > > >Hello, > > > >I currently have an ICD2 from Microchip. I use it to develop PIC16 code > >using the MPLAB debugger and assembler. I need to move to the PIC18
parts
> >and C language, but I am struggling figure out the development tools to
get.
> >Do you have any experience with the CCS compiler running with MPLAB and > >ICD2? ($175 solution) > > > >Thanks, > >Talal > > Try Hi-Tech's compiler. You can download a limited-time demo that is > almost entirely functional from their web site (I think you have to > register). It's < $1K. > > Best regards, > Spehro Pefhany > -- > "it's the network..." "The Journey is the reward" > speff@interlog.com Info for manufacturers:
http://www.trexon.com
> Embedded software/hardware/analog Info for designers:
http://www.speff.com
Apologies for the incorrect web address...

www.ccsinfo.com (no dash)...


"starfire" <starfire151@cableone.net> wrote in message
news:10erq24rrok78fd@corp.supernews.com...
> ...also try the CCS compiler... www.ccs-info.com > > Maybe the "non-standard" C is adequate for your needs. I've been using
CCS
> compilers for years with success. I've never found any of the > "non-standard" issues to be major show-stoppers in my applications. CCS
is
> also looking at customer feedback for improvements in their compiler (as > witnessed by the inclusion of a "real" sprintf() function as opposed to
the
> work-around they had listed in their examples of the previous versions). > > I don't know if the CCS compiler will run with the ICD2 but I do know it > will integrate with the MPLAB environment. The 6-pin (telco connector) > pinout of the CCS debug module conforms with the ICD2 pinout for pins 1 > through 5. Pin 6 is also picked up in the CCS debugger as going to the B3 > pin of the target. Pin 6 is a no-connect in the ICD2. > > Basic bottom line is many time or size-limited versions exist out there. > Try them all and pay for the one you want to use. > > Best of luck. > > Dave > > "Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> wrote in message > news:9rhre056npaf5uc9sntjtvtjo6tbdrd4ui@4ax.com... > > On Thu, 8 Jul 2004 15:34:43 -0500, the renowned "Talal Itani" > > <titani@airmail.net> wrote: > > > > >Hello, > > > > > >I currently have an ICD2 from Microchip. I use it to develop PIC16
code
> > >using the MPLAB debugger and assembler. I need to move to the PIC18 > parts > > >and C language, but I am struggling figure out the development tools to > get. > > >Do you have any experience with the CCS compiler running with MPLAB and > > >ICD2? ($175 solution) > > > > > >Thanks, > > >Talal > > > > Try Hi-Tech's compiler. You can download a limited-time demo that is > > almost entirely functional from their web site (I think you have to > > register). It's < $1K. > > > > Best regards, > > Spehro Pefhany > > -- > > "it's the network..." "The Journey is the
reward"
> > speff@interlog.com Info for manufacturers: > http://www.trexon.com > > Embedded software/hardware/analog Info for designers: > http://www.speff.com > >
"Eric Smith" <eric-no-spam-for-me@brouhaha.com> wrote in message
news:qhk6xe86wr.fsf@ruckus.brouhaha.com...
> Pete Fenelon <pete@fenelon.com> writes: > > If you're going for C on the PIC18, the only professional-quality > > solution is the IAR compiler. > > I respectfully disagree. The Hitech C compiler for the PIC18 seems to > be professional and of very high quality.
I will share some of my experience with HiTech. Maybe 8.20 PL1 was just unfortunate version; I had the following problems: * the firmware was split into 2 independent modules, bootloader and application code. I needed to reserve certain memory, but compiler was ignoring the command line options for that and happily generated variables in restricted zones, i.e. colliding with bootloader. The workaround was to assign them spefic address: static u16 MmcRoot @ 0x204; /* MMC: first sector of root directory */ static u8 MmcRootSz @ 0x207; /* MMC: size of root directory */ * 32 bit expression in function call did not work, I had to pull it out into temporary var: LogMmc = LogSec + LogFile; /* compiler does not compile expression */ /* inside function call properly */ zseek(FLOG,LogMmc); * And I recall that in one case it "forgot" to switch the bank. Cannot locate the snippet though. Otherwise it is a good compiler. I cannot compare it, because I used CCS only for significantly simpler projects. Roman

Pete Fenelon wrote:

> In comp.arch.embedded Eric Smith <eric-no-spam-for-me@brouhaha.com> wrote: > > Pete Fenelon <pete@fenelon.com> writes: > >> If you're going for C on the PIC18, the only professional-quality > >> solution is the IAR compiler. > > > > I respectfully disagree. The Hitech C compiler for the PIC18 seems to > > be professional and of very high quality. > > It isn't proper C though, it gets the semantics of automatic variables > wrong (treats them like statics rather than allocating on the stack) > and you therefore can't write reentrant code with it. (At least, you > couldn't last time I looked). > > Yes, it's a better product than CCS. But it's not a serious C compiler. > > pete > -- > pete@fenelon.com "there's no room for enigmas in built-up areas"
Actually Putting Variables on the stack is not a C requirement. It is just the most common implementation. If you are writing reentrant code on a small 8 bit cpu, you are looking for trouble (i.e. slow and big). If you want pure ANSI C you will trade it for code size. my $0.02